https://github.com/nickserv/cdnm
Manage dependencies through CDN URLs in HTML files.
https://github.com/nickserv/cdnm
Last synced: about 1 year ago
JSON representation
Manage dependencies through CDN URLs in HTML files.
- Host: GitHub
- URL: https://github.com/nickserv/cdnm
- Owner: nickserv
- License: isc
- Created: 2017-09-29T23:06:57.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2023-03-10T13:00:42.000Z (over 3 years ago)
- Last Synced: 2025-07-04T08:47:36.676Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.08 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cdnm (CDN Manager)
[](https://badge.fury.io/js/cdnm)
Manage dependencies through CDN URLs in HTML files. Makes maintaining
dependencies in HTML files almost as easy as using a package manager, but
without relying on a module bundler. Provides the convenience of package manager
commands like `npm ls` and `npm update` while automatically maintaining CDN URLs
with version constraints in existing HTML files. Useful for projects that depend
on packages provided by CDNs which are backed by package managers like npm.
## Supported CDNs
Currently only npm-based CDNs are supported, though [other
CDNs](https://github.com/nickmccurdy/cdnm/issues/4) are planned.
- [unpkg](https://unpkg.com)
- [jsDelivr for npm](https://www.jsdelivr.com/) (combine endpoint is unsupported)
- [bundle.run](https://bundle.run/)
## Installation
1. Install Node 12 or newer.
2. `npm install --global cdnm`
## Example
```html
Hello, world!
Hello, world!
```
```cdnm update fixture.html```
```html
Hello, world!
Hello, world!
```
## Help
```
Usage: cdnm [options] [command]
CDN Manager: Manage dependencies through CDN URLs in HTML files.
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
list [path] list dependencies
outdated [path] list outdated dependencies
package [path] write package.json file for dependencies
update [path] update dependencies
```