standardize cdn links in docs (#2416)

- consistently use @next and explicit path
This commit is contained in:
Daniel Loomer 2019-05-27 11:58:11 -04:00 committed by Isiah Meadows
parent 61af23de24
commit 9b38e41fd6
4 changed files with 6 additions and 6 deletions

View file

@ -46,7 +46,7 @@ var Stream = require("mithril/stream")
You can also download the module directly if your environment does not support a bundling toolchain:
```markup
<script src="https://unpkg.com/mithril@next/stream"></script>
<script src="https://unpkg.com/mithril@next/stream/stream.js"></script>
```
When loaded directly with a `<script>` tag (rather than required), the stream library will be exposed as `window.m.stream`. If `window.m` is already defined (e.g. because you also use the main Mithril script), it will attach itself to the existing object. Otherwise it creates a new `window.m`. If you want to use streams in conjunction with Mithril as raw script tags, you should include Mithril in your page before `mithril/stream`, because `mithril` will otherwise overwrite the `window.m` object defined by `mithril/stream`. This is not a concern when the libraries are consumed as CommonJS modules (using `require(...)`).