Commit 18bfe640d83ecfcd034b49601b5ee5247dfe6222
add section on cherry-picking the pull function
Thomas Jensen committed on 8/30/2016, 12:48:16 PMParent: 48f11ee4bbabe3ee3bf0c9e02f75c39456e53582
Files changed
README.md | changed |
README.md | ||
---|---|---|
@@ -303,8 +303,22 @@ | ||
303 | 303 | Pull streams don't come with their own buffering mechanism, but [there are ways |
304 | 304 | to get around this](https://github.com/dominictarr/pull-stream-examples/blob/master/buffering.js). |
305 | 305 | |
306 | 306 | |
307 | +## Minimal bundle | |
308 | + | |
309 | +If you need only the `pull` function from this package you can reduce the size | |
310 | +of the imported code (for instance to reduce a Browserify bundle) by requiring | |
311 | +it directly: | |
312 | + | |
313 | + | |
314 | +```js | |
315 | +var pull = require('pull-stream/pull') | |
316 | + | |
317 | +pull(random(), logger()) | |
318 | +``` | |
319 | + | |
320 | + | |
307 | 321 | ## Further Examples |
308 | 322 | |
309 | 323 | - [dominictarr/pull-stream-examples](https://github.com/dominictarr/pull-stream-examples) |
310 | 324 | - [./docs/examples](./docs/examples.md) |
Built with git-ssb-web