Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

cdnm (CDN Manager)

npm version Build Status

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 are planned.

Installation

  1. Install Node 4 or newer.
  2. npm install --global cdnm

Example

<!doctype html>
<html lang="en">
  <head>
    <title>Hello, world!</title>
    <link rel="stylesheet" href="https://unpkg.com/juggernaut@2.1.0/index.js">
  </head>
  <body>Hello, world!</body>
</html>

cdnm update fixture.html

<!doctype html>
<html lang="en">
  <head>
    <title>Hello, world!</title>
    <link rel="stylesheet" href="https://unpkg.com/juggernaut@2.1.1/index.js">
  </head>
  <body>Hello, world!</body>
</html>

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

About

Manage dependencies through CDN URLs in HTML files.

Resources

License

Sponsor this project

 

Packages

No packages published
You can’t perform that action at this time.