@@ -22,25 +22,17 @@ All examples in these documents will assume `testdouble` is available as `td`.
2222
2323### For use in Browsers
2424
25- The most recent release (not master itself) is always available on the master
26- branch of the git repo, to make it easier to fetch the browser distribution of
27- testdouble.js
25+ When we publish new versions of testdouble.js, we also generate a browser build
26+ of the library that's ready to be used in browsers, which you'll find in
27+ "dist/testdouble.js" of the installed package. This distribution will also
28+ define a ` td ` global variable, so you can use the library without necessitating
29+ any kind of module system in your test build.
2830
29- #### curl
31+ #### via npm
3032
31- The easiest way to fetch testdouble is to curl it:
32-
33- ```
34- $ curl https://raw.githubusercontent.com/testdouble/testdouble.js/master/dist/testdouble.js -o test/helpers/testdouble.js
35- ```
36-
37- And then just check it into source control. It may be old-fashioned, but it
38- still works.
39-
40- #### npm
41-
42- You can also install testdouble from npm and then copy, move, symlink, or point
43- your front-end build tool at it:
33+ Most people manage their front-end dependencies these days with ` npm ` , so most
34+ commonly we'd expect people to pull down testdouble.js by installing it with npm
35+ and pointing whatever front-end build tool they use to it.
4436
4537```
4638$ npm install --save-dev testdouble
@@ -49,11 +41,17 @@ $ npm install --save-dev testdouble
4941And then find the browser distribution of the library in
5042` node_modules/testdouble/dist/testdouble.js ` .
5143
44+ #### via unpkg
5245
46+ You can also just fetch the latest (or any) version of the library from
47+ the unpkg CDN. You can even curl it:
5348
5449```
50+ $ curl -L https://unpkg.com/testdouble/dist/testdouble.js
5551```
5652
53+ And then just check it into source control. It may be old-fashioned, but it
54+ still works.
5755
5856## Configuring testdouble.js Setting up in your test suite
5957
0 commit comments