docs: merge docs from next to master

This commit is contained in:
Pat Cavit 2017-03-24 15:36:53 -07:00
parent 2a61e17332
commit 33aa1fa735
19 changed files with 285 additions and 72 deletions

View file

@ -40,6 +40,14 @@ Streams are NOT bundled with Mithril's core distribution. To include the Streams
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-stream"></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(...)`).
---
### Signature