generator.js
function template(pattern) {
    return app.src(pattern, { cwd: path.join(__dirname, 'templates') })
      .pipe(app.renderFile('*')).on('error', console.error)
      .pipe(app.conflicts(app.cwd))
      .pipe(app.dest(app.options.dest || app.cwd));
  }
function template(pattern) {
    return app.src(pattern, { cwd: path.join(__dirname, 'templates') })
      .pipe(app.renderFile('*')).on('error', console.error)
      .pipe(app.conflicts(app.cwd))
      .pipe(app.dest(app.options.dest || app.cwd));
  }
function template ( pattern ) { return app . src ( pattern , { cwd : path . join ( __dirname , 'templates' ) } ) . pipe ( app . renderFile ( '*' ) ) . on ( 'error' , console . error ) . pipe ( app . conflicts ( app . cwd ) ) . pipe ( app . dest ( app . options . dest || app . cwd ) ) ; }
Generate a file from the template that matches the given `pattern`
Generate a file from the template that matches the given pattern