Push template collections in a vinyl stream.
Based on assemble-push, by @doowb
npm i template-push --save
var push = require('template-push');
Returns a function that takes the current instance of app.
Params
app {Object}: Instance of app.returns {Function}: Factory function used to build a stream.Example
var app = require('your-app');
var appPush = require('template-push')(app);
Returns a stream that pushes a collection of templates onto a stream as vinyl file objects.
Params
name {String}: Name of the collection to push into the stream.returns {Stream}: Stream used in piping objects through.Example
// create a new arbitrary template type (collection)
app.create('foo', {isRenderable: true});
// Load `foo` templates
app.foo('about-app.md', {content: '...'});
// push the `foo` collection into the stream to be rendered
app.task('default', function () {
appPush('foo').pipe(app.dest('dist/'));
});
Install dev dependencies:
npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on April 27, 2015.