API-first task runner with three methods: task, run and watch.


API-first task runner with three methods: task, run and watch.

Install with npm

$ npm i composer --save
var Composer = require('composer');


Composer constructor. Create a new Composer


var composer = new Composer();


Register a new task with it's options and dependencies.


  • deps: array of dependencies
  • flow: How this task will be executed with it's dependencies (series, parallel, settleSeries, settleParallel)


  • name {String}: Name of the task to register
  • options {Object}: Options to set dependencies or control flow.
  • deps {String|Array|Function}: Additional dependencies for this task.
  • fn {Function}: Final function is the task to register.
  • returns {Object}: Return this for chaining


composer.task('site', ['styles'], function () {
  return app.src('templates/pages/*.hbs')


Run a task or list of tasks.


  • tasks {String|Array|Function}: List of tasks by name, function, or array of names/functions.
  • cb {Function}: Callback function to be called when all tasks are finished running.

Example'default', function (errresults) {
  if (err) return console.error(err);


Watch a file, directory, or glob pattern for changes and run a task or list of tasks when changes are made. Watch is powered by chokidar so the glob pattern may be anything that accepts.


  • glob {String|Array}: Filename, Directory name, or glob pattern to watch
  • options {Object}: Additional options to be passed to chokidar
  • tasks {String|Array|Function}: Tasks that are passed to .run when files in the glob are changed.
  • returns {Object}: Returns an instance of FSWatcher from chokidar


var watcher ='templates/pages/*.hbs', ['site']);
  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more | homepage
  • generate: Project generator, for node.js. | homepage
  • template: Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… more | homepage
  • update: Update the year in all files in a project using glob patterns. | homepage
  • verb: Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… more | homepage

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 © 2015 Jon Schlinkert Released under the MIT license.

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