Boilerplate for creating a node.js application based on Template, vinyl and orchestrator. This consists of the core, generalized components of assemble, verb and generate.


Boilerplate for creating a node.js application based on Template, vinyl and orchestrator. This consists of the core, generalized components of assemble, verb and generate.

This has the core components of [verb] and [assemble], and [generate]. You can use it to build your own application too. It comes with a fully-functional CLI and API for running tasks, plugins, routes and middleware, including the following:

  • tasks/plugins: gulp-style tasks and support for vinyl plugins (gulp, verb, assemble). Session caching is also used to allow context to be passed from one task to another.
  • engines: ability to render templates from any template engine.
  • middleware: for priming the file object with default properties, like data
  • routes: for running the default middleware at specific points in the plugin pipeline

The goal with this project is to generalize the core functionality used a

(Table of contents generated by [verb])

Fork or clone the repo from GitHub:

$ git clone
var app = require('composer');

Since this library uses orchestrator and vinyl, tasks have the same API as [gulp]:

app.task('default', function() {

Tasks with plugins

var one = require('plugin-one');
var two = require('plugin-two');
app.task('default', function() {

CLI for persisting and getting values that can be used across projects


Set a value:

$ app --set foo=bar
#=> {foo: 'bar'} 
$ app --set baz
#=> {baz: true} 


Get a value:

$ app --get foo
#=> bar 
$ app --get baz
#=> true 


Register a plugin by name


  • name {String}
  • fn {Function}


Create a plugin pipeline from an array of plugins.


  • plugins {Array}: Each plugin is a function that returns a stream, or the name of a registered plugin.
  • options {Object}
  • returns {Stream}


Glob patterns or filepaths to source files.


  • glob {String|Array}: Glob patterns or file paths to source files.
  • options {Object}: Options or locals to merge into the context and/or pass to src plugins




Specify a destination for processed files.


  • dest {String|Function}: File path or rename function.
  • options {Object}: Options or locals to pass to dest plugins


app.dest('dist', {ext: '.xml'})


Copy a glob of files to the specified dest.


  • glob {String|Array}
  • dest {String|Function}
  • returns {Stream}: Stream, to continue processing if necessary.


app.copy('assets/**', 'dist');


Define a task.


  • name {String}
  • fn {Function}


app.task('docs', function() {
  app.src(['foo.js', 'bar/*.js'])


Get the name of the current task-session. This is used in plugins to lookup data or views created in a task.

  • returns {String} task: The name of the currently running task.


var id = app.getTask();
var views = app.views[id];


Get a view collection by its singular-form name.

  • returns {String} name: Singular name of the collection to get


var collection = app.getCollection('page');
// gets the `pages` collection 
//=> {a: {}, b: {}, ...} 


Get a file from the current session.

  • returns {Object} file: Vinyl file object. Must have an id property.


var file = app.getFile(file);


Get a template from the current session, convert it to a vinyl file, and push it into the stream.


  • stream {Stream}: Vinyl stream
  • id {String}: Get the session id using app.getTask()




taskFiles is a session-context-specific getter that returns the collection of files from the currently running task.

  • returns {Object}: Get the files from the currently running task.


var taskFiles = app.taskFiles;


Re-run the specified task(s) when a file changes.


  • glob {String|Array}: Filepaths or glob patterns.
  • fn {Function}: Task(s) to watch.


app.task('watch', function() {'docs/*.md', ['docs']);
  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more
  • generate: Project generator, for node.js.
  • 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

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

This file was generated by verb-cli on May 26, 2015.