Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hints on using NPM based CDNs #1520

Merged
merged 2 commits into from
Aug 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ via [npm](https://github.com/npm/npm)

$ npm install sinon

or via sinon's browser builds available for download on the [homepage](http://sinonjs.org/releases/).
or via sinon's browser builds available for download on the [homepage](http://sinonjs.org/releases/). There are also [NPM based CDNs]((http://sinonjs.org/releases#npm-cdns) one can use.

## Usage

20 changes: 20 additions & 0 deletions docs/releases.html
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@

<div class="head-page">
<h1>Releases</h1>
In addition to our download page, you can also <a href="#npm-cdns">use a NPM based CDN</a> for your convenience.
</div>

<div class="in-content releases">
@@ -32,3 +33,22 @@ <h1>Releases</h1>
{% endfor %}
</ul>
</div>


<div>
<h2 id="npm-cdns">Using NPM based CDNs</h2>
<p>
There are now several CDNs that are backed by NPM,
which means that you can have auto-updated scripts.
Examples of such free providers are
<a href="http://jsdelivr.com">jsDelivr</a>,
<a href="https://unpkg.com">UNPKG</a> and
<a href="https://cdnjs.com">cdnjs</a>.
</p>
<p>
Their adressing schemes vary, but an example
url such as <a href="https://cdn.jsdelivr.net/npm/sinon@3/pkg/sinon.js">https://cdn.jsdelivr.net/npm/sinon@3/pkg/sinon.js</a>
would download the latest browser bundle of Sinon 3.
</p>

</div>
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -85,6 +85,8 @@
"README.md"
],
"main": "./lib/sinon.js",
"cdn": "./pkg/sinon.js",
"jsdelivr": "./pkg/sinon.js",
"engines": {
"node": ">=0.1.103"
}