task

The canonical node-task generator.

npm install task
1 downloads in the last day
5 downloads in the last week
16 downloads in the last month

task

The canonical node-task generator.

Docs to follow when node-task spec is complete.

Usage

var Task = require('task');
var config = {
  option: true,
  flat: false
};
var input = [
  { src: ['input1', 'input1', 'input3'] }
];

var LogInputs = Task.extend({
  name: 'loginputs',
  description: 'log each source to console',
  map: function (config, source) {
    console.log(source);
    return source;
  }
});
var loginputs = new LogInputs();
loginputs.run(config, input);

var ConcatInputs = Task.extend({
  name: 'concatinputs',
  description: 'concat all sources',
  reduce: function(config, sources, dest) {
    return sources.join("+");
  }
});
var concatinputs = new ConcatInputs();
concatinputs.run(config, input).then(function(result) {
  console.log(result);
});
npm loves you