generator.js
function tasks(options) {
  options = options || {};
  var fp = path.resolve(options.template);
  var tmpl = new utils.File({path: fp, contents: fs.readFileSync(fp)});
  var data = {tasks: []};

  return utils.through.obj(function(file, enc, next) {
    var description = options.description || file.stem;

    if (typeof description === 'function') {
      description = options.description(file);
    }

    data.tasks.push({
      alias: 'gitignore',
      path: path.relative(path.resolve('generators'), file.path),
      name: file.stem.toLowerCase(),
      description: description,
      relative: file.relative,
      basename: '.gitignore'
    });

    next();
  }, function(next) {
    tmpl.data = data;
    this.push(tmpl);
    next();
  });
}
function tasks(options) {
  options = options || {};
  var fp = path.resolve(options.template);
  var tmpl = new utils.File({path: fp, contents: fs.readFileSync(fp)});
  var data = {tasks: []};

  return utils.through.obj(function(file, enc, next) {
    var description = options.description || file.stem;

    if (typeof description === 'function') {
      description = options.description(file);
    }

    data.tasks.push({
      alias: 'gitignore',
      path: path.relative(path.resolve('generators'), file.path),
      name: file.stem.toLowerCase(),
      description: description,
      relative: file.relative,
      basename: '.gitignore'
    });

    next();
  }, function(next) {
    tmpl.data = data;
    this.push(tmpl);
    next();
  });
}
function tasks ( options ) { options = options || { } ; var fp = path . resolve ( options . template ) ; var tmpl = new utils . File ( { path : fp , contents : fs . readFileSync ( fp ) } ) ; var data = { tasks : [ ] } ; return utils . through . obj ( function ( file , enc , next ) { var description = options . description || file . stem ; if ( typeof description === 'function' ) { description = options . description ( file ) ; } data . tasks . push ( { alias : 'gitignore' , path : path . relative ( path . resolve ( 'generators' ) , file . path ) , name : file . stem . toLowerCase ( ) , description : description , relative : file . relative , basename : '.gitignore' } ) ; next ( ) ; } , function ( next ) { tmpl . data = data ; this . push ( tmpl ) ; next ( ) ; } ) ; }
Plugin for generating individual gitignore tasks.

The alternative would be to load in templates and create tasks on-the-fly,
but this approach is much faster and results in a better user experience.
Plugin for generating individual gitignore tasks .