Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cdnm

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdnm

CDN Manager

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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.

Known Issues

  • Currently limited to stylesheet links using unpkg. URLs must be in the form unpkg.com/:package@:version/:file for now (each section is mandatory).
  • HTML files will be reformatted by cdnm update. The full DOM structure and rendering should be preserved, but the source code will likely have line break or white space changes.

Installation

  1. Install Node 8 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


  Options:

    -V, --version  output the version number
    -h, --help     output usage information


  Commands:

    list <path>    list CDN dependencies in HTML file
    update <path>  update CDN dependencies in HTML file

FAQs

Package last updated on 02 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc