You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cdnJS](https://github.com/cdnjs/cdnjs) is the repository mirroring all scripts on `cdnjs.cloudflare.com`, created and maintained by [Thomas Davis](https://twitter.com/neutralthoughts), [Ryan Kirkman](https://twitter.com/ryan_kirkman) and [Pete Cooper](http://twitter.com/petecooper)
5
+
[cdnjs](https://github.com/cdnjs/cdnjs) is the repository mirroring all scripts on `cdnjs.cloudflare.com`, created and maintained by [Thomas Davis](https://twitter.com/neutralthoughts), [Ryan Kirkman](https://twitter.com/ryan_kirkman) and [Pete Cooper](http://twitter.com/petecooper)
6
6
7
7
We will host any version of any library, subject to popularity and licence permissions.
8
8
@@ -14,11 +14,11 @@ Please raise a pull request for an older version of a library if your site still
14
14
15
15
## Adding a new or updating an existing library
16
16
17
-
cdnJS relies on user-submitted pull requests and automatic updating via `npm` to populate and update libraries. To add a new library, or update an existing library outside of `npm`, start by [forking the cdnJS repo](https://github.com/cdnjs/cdnjs/fork) to your own GitHub account.
17
+
cdnjs relies on user-submitted pull requests and automatic updating via `npm` to populate and update libraries. To add a new library, or update an existing library outside of `npm`, start by [forking the cdnjs repo](https://github.com/cdnjs/cdnjs/fork) to your own GitHub account.
18
18
19
19
If you're adding/modifying outside of the GitHub browser interface, for example on the command line or with the GitHub desktop application, you will need to additionally install `node` locally. For more information on installing `node`, please refer to [nodejs.org](http://nodejs.org).
20
20
21
-
When you have forked the cdnJS repo, add your library to it. Libraries are stored in the `ajax/libs` directory. Each library has its own subdirectory of `ajax/libs` and each version of the library has its own subdirectory of the library directory name, for example:
21
+
When you have forked the cdnjs repo, add your library to it. Libraries are stored in the `ajax/libs` directory. Each library has its own subdirectory of `ajax/libs` and each version of the library has its own subdirectory of the library directory name, for example:
22
22
23
23
```
24
24
/ajax/libs/jquery/2.0.0/
@@ -30,7 +30,7 @@ You should consider the following when adding to or updating the library:
30
30
31
31
* Filenames should **not** include a version number and be **lowercase**. This is OK: `useful.min.js`, but this is not: `useful-2.0.1.min.js`.
32
32
33
-
* JavaScript & CSS files should be minified to reduce network and browser overhead. If the library doesn't already provide a minified version, cdnJS's preferred JavaScript minifier is [UglifyJS](http://marijnhaverbeke.nl/uglifyjs"UglifyJS")
33
+
* JavaScript & CSS files should be minified to reduce network and browser overhead. If the library doesn't already provide a minified version, cdnjs's preferred JavaScript minifier is [UglifyJS](http://marijnhaverbeke.nl/uglifyjs"UglifyJS")
34
34
35
35
* If you are updating a library, please try to maintain consistency with the existing file and directory structure. There will be occasions, particularly with major version increments, where this is not practical. If there are significant changes in the file structure, please note this in your pull request.
36
36
@@ -45,7 +45,7 @@ If you're updating the library outside of `npm` or the GitHub browser, you shoul
45
45
46
46
If you run `npm test` and see no errors, all is well; resolve any errors before you raise your pull request and re-run `npm test` to ensure everything works.
47
47
48
-
You may see a warning about a missing readme file - you can ignore this. Libraries on cdnJS do not require a readme file.
48
+
You may see a warning about a missing readme file - you can ignore this. Libraries on cdnjs do not require a readme file.
49
49
50
50
## Pull request pre-flight checks
51
51
@@ -68,13 +68,13 @@ Please include the following in your pull request:
68
68
* How you found the version of the script (e.g., `Source: https://github.com/example/releases/1.2.3.zip`)
69
69
* Evidence of popularity if the GitHub numbers don't indicate popularity.
70
70
71
-
Providing the origin of your files is very helpful as the cdnJS project is peer-reviewed.
71
+
Providing the origin of your files is very helpful as the cdnjs project is peer-reviewed.
72
72
73
73
## Enabling `npm` auto update
74
74
75
75
__We are currently in the process of converting as many libraries to NPM auto update as possible. For a bit of fun, cdnjs will send you **$5 USD in Bitcoin for each library you convert to NPM auto-update**. If you could tag your pull request with [BC] and throw your Bitcoin address in the commit, we will send your payment through as soon as possible. If you would like to keep your BC address private, send an email to thomasalwyndavis@gmail.com with the details.__
76
76
77
-
cdnJS automatically updates libraries that are known to be hosted on `npm` e.g., Lodash. This auto-update script runs every 15 minutes.
77
+
cdnjs automatically updates libraries that are known to be hosted on `npm` e.g., Lodash. This auto-update script runs every 15 minutes.
78
78
79
79
To add an `npm` hook to a library, update the `package.json` with configuration details and submit your pull request. An example configuration:
80
80
@@ -89,7 +89,7 @@ To add an `npm` hook to a library, update the `package.json` with configuration
89
89
```
90
90
91
91
*`npmName` should map to the name of the library on `npm`
92
-
*`npmFileMap` is a list of files to take from the `npm` tarball and host on cdnJS
92
+
*`npmFileMap` is a list of files to take from the `npm` tarball and host on cdnjs
93
93
*`basePath` will be ignored when copying over to the CDN
94
94
*`files` is a pattern matcher allowing selection of multiple files
95
95
@@ -109,7 +109,7 @@ The above example looks in the tarball whose structure might look like this:
109
109
|__README.md
110
110
```
111
111
112
-
The auto-update process will look for `dist` inside the named tarball and copy all the JavaScript file to cdnJS, minus the `dist` path. The resulting files in cdnJS will be:
112
+
The auto-update process will look for `dist` inside the named tarball and copy all the JavaScript file to cdnjs, minus the `dist` path. The resulting files in cdnjs will be:
113
113
114
114
```
115
115
|__ajax
@@ -128,13 +128,13 @@ The auto-update process will look for `dist` inside the named tarball and copy a
128
128
129
129
## API
130
130
131
-
You can search cdnJS via our API:
131
+
You can search cdnjs via our API:
132
132
133
133
```
134
134
http://api.cdnjs.com/libraries
135
135
```
136
136
137
-
Without any query parameters it will return the name and main file URL of every library on cdnJS. To search, use:
137
+
Without any query parameters it will return the name and main file URL of every library on cdnjs. To search, use:
0 commit comments