Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2
Assemble plugin that adds convenience methods for working with streams, like `toStream`, which pushes a view collection into a vinyl stream.
License
assemble/assemble-streams
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Assemble pipeline plugin for pushing views into a vinyl stream.
Install withnpm:
$ npm install --save assemble-streams
This plugin can be used withassemble,verb or any other application based ontemplates.
varassemble=require('assemble');varstreams=require('assemble-streams');// create your applicationvarapp=assemble();// register the pluginapp.use(streams());// use the plugin on appapp.toStream('pages').pipe(app.dest('site/'));// use the plugin on a collectionapp.pages.toStream().pipe(app.dest('site/'));// use the plugin on a viewapp.pages.getView('home').toStream().pipe(app.dest('site/'));
See thetests for more examples.
Push a view collection into a vinyl stream.
Params
collection{String}: Name of the collection to push into the stream.- {Function}: Optionally pass a filter function to use for filtering views.
returns{Stream}
Example
app.toStream('posts',function(file){returnfile.path!=='index.hbs';})
Push a view collection into a vinyl stream.
Params
- {Function}: Optionally pass a filter function to use for filtering views.
returns{Stream}
Example
app.posts.toStream(function(file){returnfile.path!=='index.hbs';})
Push the current view into a vinyl stream.
returns{Stream}
Example
app.pages.getView('a.html').toStream().on('data',function(file){console.log(file);//=> <Page "a.html" <Buffer 2e 2e 2e>>});
- assemble-loader: Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with…more |homepage
- assemble-render-file: Assemble plugin for rendering views in a vinyl pipeline. |homepage
- assemble: Get the rocks out of your socks! Assemble makes you fast at creating web projects…more |homepage
Pull requests and stars are always welcome. For bugs and feature requests,please create an issue.
| Commits | Contributor |
|---|---|
| 34 | jonschlinkert |
| 21 | doowb |
(This project's readme.md is generated byverb, please don't edit the readme directly. Any changes to the readme must be made in the.verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme&& verbRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install&& npmtest
Jon Schlinkert
Copyright © 2017,Jon Schlinkert.MIT
This file was generated byverb-generate-readme, v0.4.2, on February 11, 2017.
About
Assemble plugin that adds convenience methods for working with streams, like `toStream`, which pushes a view collection into a vinyl stream.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.