gulp.task('component', function(){ var cap = function(val){ return val.charAt(0).toUpperCase() + val.slice(1); }; var name = yargs.name; var parentPath = yargs.parent || ''; var destPath = path.join(resolveToComponents(), parentPath, name); return gulp.src(paths.blankTemplates) .pipe(tpl({ name: name, upCaseName: cap(name) })) .pipe(rename(function(path){ path.basename = path.basename.replace('component', name); })) .pipe(gulp.dest(destPath)); });
answers.appAuthorSlug = _.slugify(answers.appAuthor) gulp.src(__dirname + '/node-cli/**') .pipe(template(answers)) .pipe(rename(function(file) { if (file.basename[0] === '_') {