Skip to content

Commit 8f3b107

Browse files
Update readme (#505)
* Update readme
1 parent 1c352c5 commit 8f3b107

File tree

3 files changed

+113
-33
lines changed

3 files changed

+113
-33
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Other changes
9090
* Add package.exports (#433)
9191
* add js extension to imports (#436)
9292
* Inject package version during build instead of importing it from package(#434)
93-
* Rename JSDOC Reference website to URL-GEN instead of Base (#432)
93+
* Rename JSDOC Reference website to URL-Gen instead of Base (#432)
9494
* Remove dependency on lodash.clonedeep (#429)
9595

9696
1.0.0-beta.5 / 2021-09-01

README.md

Lines changed: 111 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,79 @@
1-
# Welcome
1+
Cloudinary URL-Gen SDK
2+
=========================
3+
[![Build Status](https://api.travis-ci.com/cloudinary/js-url-gen.svg?branch=master)](https://app.travis-ci.com/github/cloudinary/js-url-gen)
4+
## About
5+
The Cloudinary URL-Gen SDK allows you to quickly and easily integrate your application with Cloudinary.
6+
Effortlessly optimize and transform your cloud's assets.
27

3-
## About this project
8+
This SDK can also be used with [popular frontend frameworks](https://cloudinary.com/documentation/sdks/js/frontend-frameworks/index.html).
49

5-
This project enables you to create Cloudinary URLs for your images and videos.
6-
Using this SDK, you can apply advanced transformations to your images and videos.
10+
### Additional documentation
11+
This Readme provides basic installation and usage information.
12+
For the complete documentation, see the [URL-Gen SDK Guide](https://cloudinary.com/documentation/javascript_integration) and the [URL-Gen Reference](https://cloudinary.com/documentation/sdks/js/url-gen/index.html).
13+
14+
15+
## Table of Contents
16+
- [Key Features](#key-features)
17+
- [Version Support](#Version-Support)
18+
- [Installation](#installation)
19+
- [Usage](#usage)
20+
- [Setup](#Setup)
21+
- [Transform and Optimize Assets](#Transform-and-Optimize-Assets)
22+
- [Generate Image and Video URLs](#Generate-Image-and-Video-URLs)
23+
- [Transpilation](#Transpilation)
24+
- [Testing with Jest](#Testing-with-jest)
25+
- [Contributions](#Contributions)
26+
- [Get Help](#Get-Help)
27+
- [Additional Resources](#Additional-Resources)
28+
29+
## Key Features
30+
- [Transform image](https://cloudinary.com/documentation/javascript_image_transformations) assets (links to docs).
31+
- [Transform video](https://cloudinary.com/documentation/javascript_video_transformations) assets (links to docs).
32+
33+
34+
## Version Support
35+
36+
### Note!
37+
This SDK is cross-platform, but only the node versions are worth mentioning
38+
39+
| SDK Version | Node 10 | Node 12 |Node 14 | Node 16 |
40+
|---------------|------------|----------|----------|----------|
41+
| 1.x | V | V | V | V |
742

8-
This SDK can also be used with [popular frontend frameworks](https://cloudinary.com/documentation/sdks/js/frontend-frameworks/index.html).
943

10-
## Help & Examples
11-
- [Getting started](https://cloudinary.com/documentation/sdks/js/url-gen/tutorial-gettingStarted.html)
12-
- [Annotated Code Examples](https://cloudinary.com/documentation/sdks/js/url-gen/tutorial-annotatedExamples.html)
13-
- [Configuration](https://cloudinary.com/documentation/sdks/js/url-gen/tutorial-configuration_.html)
1444

1545
## Installation
46+
### Install using your favorite package manager (yarn, npm)
47+
```bash
48+
npm install @cloudinary/url-gen
49+
```
1650
```bash
17-
npm install @cloudinary/url-gen
51+
yarn add @cloudinary/url-gen
1852
```
1953

20-
## Simple usage
54+
## Usage
55+
### Setup
2156
```javascript
22-
2357
// Import the Cloudinary class
2458
import {Cloudinary} from '@cloudinary/url-gen';
2559

2660
// Create your instance
2761
const cld = new Cloudinary({
28-
cloud: {
29-
cloudName: 'demo'
30-
},
31-
url: {
32-
secure: true // force https, set to false to force http
33-
}
62+
cloud: {
63+
cloudName: 'demo'
64+
},
65+
url: {
66+
secure: true // force https, set to false to force http
67+
}
3468
});
69+
```
70+
71+
72+
### Transform and Optimize Assets
73+
- [See full documentation](https://cloudinary.com/documentation/javascript_image_transformations)
74+
```javascript
75+
// Create a new instance if you haven't
76+
const cld = new Cloudinary({/*...*/})
3577

3678
// Let's create a new image
3779
const myImage = cld.image('sample');
@@ -43,26 +85,21 @@ myImage.resize(Resize.scale().width(100).height(100));
4385
const myURL = myImage.toURL();
4486
console.log(myURL);
4587
// https://res.cloudinary.com/demo/image/upload/c_scale,w_100,h_100/sample
46-
4788
```
4889

49-
### More examples and documentation
50-
- [Cloudinary Documentation](https://cloudinary.com/documentation/javascript2_integration)
51-
- [SDK Reference](https://cloudinary.com/documentation/sdks/js/url-gen/index.html)
52-
- [Use with a Frontend Framework](https://cloudinary.com/documentation/sdks/js/frontend-frameworks/index.html)
53-
54-
### Additional links
55-
- [React SDK](https://www.npmjs.com/package/@cloudinary/react)
56-
- [Angular SDK](https://www.npmjs.com/package/@cloudinary/angular)
90+
### Generate Image and Video URLs
91+
- Use cld.image() to generate image URLs and transformations
92+
- Use cld.video() to generate video URLs and transformations
5793

94+
### File upload
95+
This SDK does not provide file upload functionality, however there are [several methods of uploading from the client side](https://cloudinary.com/documentation/javascript_image_and_video_upload).
5896

5997
### Transpilation
6098
@cloudinary/url-gen is shipped as untranspiled ES6 code.
61-
@cloudinary/url-gen is optimized around bundle size, as such we do not transpile our distributed modules,
99+
@cloudinary/url-gen is optimized around bundle size, as such we do not transpile our distributed modules,
62100
we leave the decision of what browsers to support, and what transpilations to apply, to you, the user.
63101

64102
### Testing with Jest
65-
66103
As mentioned above, we're shipping @cloudinary/url-gen with ES6 code, as this provides great tree-shaking potential.
67104
it also requires a few adjustments when testing.
68105

@@ -76,11 +113,11 @@ In jest.config, you'll need to add these lines to allow babel to transpile our c
76113
}
77114
```
78115
Make sure to install babel-jest:
79-
`npm install babel-jest`
116+
`npm install babel-jest`
80117

81118
You'll also need to ensure you have a babel.config.js file (and not a .babelrc), and that
82119
it's configured properly to transpile code,
83-
120+
84121
*As an example*:
85122
```js
86123
module.exports = {
@@ -89,3 +126,46 @@ module.exports = {
89126
]
90127
};
91128
```
129+
130+
## Contributions
131+
- Clone this repository
132+
- Create a fork
133+
- Make your changes
134+
- Run tests locally `npm run test`
135+
- Build project locally `npm run build`
136+
- Push your changes
137+
- Await a review from the maintainers
138+
139+
140+
## Get Help
141+
If you run into an issue or have a question, you can either:
142+
- [Open a Github issue](https://github.com/cloudinary/js-url-gen/issues) (for issues related to the SDK)
143+
- [Open a support ticket](https://cloudinary.com/contact) (for issues related to your account)
144+
145+
Additional resources can be found here:
146+
- [Getting started](https://cloudinary.com/documentation/sdks/js/url-gen/tutorial-gettingStarted.html)
147+
- [Annotated Code Examples](https://cloudinary.com/documentation/sdks/js/url-gen/tutorial-annotatedExamples.html)
148+
- [Setup & Configuration](https://cloudinary.com/documentation/sdks/js/url-gen/tutorial-configuration_.html)
149+
150+
151+
## About Cloudinary
152+
Cloudinary is a powerful media API for websites and mobile apps alike, Cloudinary enables developers to efficiently manage, transform, optimize, and deliver images and videos through multiple CDNs. Ultimately, viewers enjoy responsive and personalized visual-media experiences—irrespective of the viewing device.
153+
154+
155+
## Additional Resources
156+
- [React SDK](https://www.npmjs.com/package/@cloudinary/react)
157+
- [Angular SDK](https://www.npmjs.com/package/@cloudinary/angular)
158+
- [Use with a Frontend Framework](https://cloudinary.com/documentation/sdks/js/frontend-frameworks/index.html)
159+
- [Cloudinary Transformation and REST API References](https://cloudinary.com/documentation/cloudinary_references): Comprehensive references, including syntax and examples for all SDKs.
160+
- [MediaJams.dev](https://mediajams.dev/): Bite-size use-case tutorials written by and for Cloudinary Developers
161+
- [DevJams](https://www.youtube.com/playlist?list=PL8dVGjLA2oMr09amgERARsZyrOz_sPvqw): Cloudinary developer podcasts on YouTube.
162+
- [Cloudinary Academy](https://training.cloudinary.com/): Free self-paced courses, instructor-led virtual courses, and on-site courses.
163+
- [Code Explorers and Feature Demos](https://cloudinary.com/documentation/code_explorers_demos_index): A one-stop shop for all code explorers, Postman collections, and feature demos found in the docs.
164+
- [Cloudinary Roadmap](https://cloudinary.com/roadmap): Your chance to follow, vote, or suggest what Cloudinary should develop next.
165+
- [Cloudinary Facebook Community](https://www.facebook.com/groups/CloudinaryCommunity): Learn from and offer help to other Cloudinary developers.
166+
- [Cloudinary Account Registration](https://cloudinary.com/users/register/free): Free Cloudinary account registration.
167+
- [Cloudinary Website](https://cloudinary.com)
168+
169+
170+
## Licence
171+
Released under the MIT license.

jsdoc.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"search": true,
3131
"monospaceLinks": true,
3232
"systemColor": "#3448C5",
33-
"systemName": "Cloudinary URL-GEN (JS)",
33+
"systemName": "Cloudinary URL-Gen (JS)",
3434
"systemLogo": "./__DOCS__/resources/navLogo.png",
3535
"systemSummary": "@cloudinary/url-gen",
3636
"favicon": "./__DOCS__/resources/favico.png",

0 commit comments

Comments
 (0)