🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

template-push

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

template-push

Push template collections in a vinyl stream.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

template-push NPM version

Push template collections in a vinyl stream.

Based on assemble-push, by @doowb

Install with npm

npm i template-push --save

Usage

var push = require('template-push');

API

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);

appPush

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/'));
});
  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more
  • template: Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… more
  • verb: Documentation generator for GitHub projects. Extremely powerful, easy to use, can generate anything from API… more

Running tests

Install dev dependencies:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on April 27, 2015.

Keywords

assemble

FAQs

Package last updated on 27 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts