<p>npmcdn is a CDN for packages that are published via <ahref="https://www.npmjs.com/">npm</a>. Use it to quickly and easily load files using a simple URL like <code>https://npmcdn.com/package@version/path/to/file</code>.</p>
<p>You may also use a <ahref="https://docs.npmjs.com/cli/dist-tag">tag</a> or <ahref="https://docs.npmjs.com/misc/semver">version range</a> instead of a fixed version number, or omit the version/tag entirely to use the <code>latest</code> tag.</p>
<p>If you omit the file path, the <ahref="https://docs.npmjs.com/files/package.json#main">main module</a> will be served. This is especially useful for loading libaries that publish a UMD build as their main module.</p>
<p>You may use the special <code>/bower.zip</code> file path in packages that contain a <code>bower.json</code> file to dynamically generate a zip file that Bower can use to install the package.</p>
<p><strong>Please note: <em>We do NOT recommend JavaScript libraries use Bower.</em></strong> Bower places additional burdens on JavaScript package authors for little to no gain. npmcdn is intended to make it easier to publish code, not harder, so Bower support will be removed in January 2017. Please move to npm for installing packages and stop using Bower before that time. See <ahref="https://github.com/mjackson/npm-http-server#bower-support">here</a> for our rationale.</p>
<td>The name of the field in <ahref="https://docs.npmjs.com/files/package.json">package.json</a> to use as the main entry point when there is no file path in the URL (e.g. <code>?main=browser</code>).</td>
<p>For npm package authors, npmcdn relieves the burden of publishing your code to a CDN in addition to the npm registry. All you need to do is include your <ahref="https://github.com/umdjs/umd">UMD</a> build in your npm package (not your repo, that's different!).</p>
<p>You can do this easily using the following setup:</p>
<ul>
<li>Add the <code>umd</code> (or <code>dist</code>) directory to your <code>.gitignore</code> file</li>
<li>Add the <code>umd</code> directory to your <ahref="https://docs.npmjs.com/files/package.json#files">files array</a> in <code>package.json</code></li>
<li>Use a build script to generate your UMD build in the <code>umd</code> directory when you publish</li>
<p>If you think this is useful, I'd love to hear from you. Please reach out to <ahref="https://twitter.com/mjackson">@mjackson</a> with any questions/concerns.</p>