README
Welcome
About this project
This project enables you to create Cloudinary URLs for your images. Using this SDK, you can apply advanced transformations to your images.
What is this project for?
This project comes to replace and modernize our existing JS offering, and it's part of a larger effort in Cloudinary.
You can read more about the project here:
Key Features
- ESM packages, import only what you need
- Declarative Syntax
- Fully typed for excellent IDE support
- Easy to write, easy to read.
Installation
npm install @cloudinary/base
Usage
Testing with Jest
@cloudinary/base is shipped with ES6 code by default, while this provides great tree-shaking potential, it also requires a few adjustments
In jest.config, you'll need to add these lines to allow babel to transpile our code.
{
"transform": {
"node_modules/@cloudinary/base": "babel-jest"
},
"transformIgnorePatterns": ["/node_modules/(?!@cloudinary/base)"]
}
Make sure to install babel-jest:
npm install babel-jest
You'll also need to ensure you have a babel.config.js file (and not a .babelrc), and that it's configured properly to transpile code,
As an example:
module.exports = {
"presets": [
"@babel/preset-env"
]
};
Progress report
We're currently working on implementing all the wide range of features and possible transformations.
We've created a progress report that visualizes our efforts:
https://cloudinary.github.io/cloudinary-js-base/public/progress/cloudinary-base-progress-report.html
Interested in Cloudinary?
Feel free to visit our more mature SDKs: