From 1ef9baf501e27c8add5f5f610aea3a749cf914e8 Mon Sep 17 00:00:00 2001 From: Olivier Constant Date: Sat, 29 Aug 2015 23:51:57 +0800 Subject: [PATCH] Fix missing return in _gulpfile.js Use implicit CoffeeScript return in _gulpfile.coffee Update readme --- README.md | 28 +++++++++++++++------------- app/templates/_gulpfile.coffee | 12 ++++++------ app/templates/_gulpfile.js | 6 +++--- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 2ce47d8..f963322 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,24 @@ ## What's inside? -* gulp -* grunt +Bundled: + +* gulp or grunt * bower * browserify * reactify +* react +* react-router +* reflux +* jquery +* preprocessify (env conf) + +Optional: + +* modernizr * coffeescript * compass * jest -* reactjs -* reflux -* react-router -* preprocessify (for environments management) ## Usage @@ -85,19 +91,15 @@ Options: * `--jest` Generate testing boilerplate with Jest. - -* `--bootstrap` - - Include React Bootstrap. * `--build-tool=[grunt|gulp]` - Generate build config in the selected tool. Defaults to gulp. + Generate build config in the selected tool. Defaults to gulp. * `--skip-install` - Skips the automatic execution of `bower` and `npm` after - scaffolding has finished. + Skips the automatic execution of `bower` and `npm` after + scaffolding has finished. ### Component diff --git a/app/templates/_gulpfile.coffee b/app/templates/_gulpfile.coffee index 11de2bf..f7a64f9 100644 --- a/app/templates/_gulpfile.coffee +++ b/app/templates/_gulpfile.coffee @@ -61,7 +61,7 @@ gulp.task 'scripts', -> <% if (includeSass) { %> gulp.task 'compass', -> dev = env is 'dev' - return gulp.src 'app/styles/**/*.scss' + gulp.src 'app/styles/**/*.scss' .pipe $.plumber() .pipe $.if dev, $.cached 'compass' .pipe $.compass @@ -69,14 +69,14 @@ gulp.task 'compass', -> sass: 'app/styles'<% } %> gulp.task 'imagemin', -> - return gulp.src 'app/images/*' + gulp.src 'app/images/*' .pipe $.imagemin progressive: true svgoPlugins: [ removeViewBox: false ] .pipe gulp.dest 'dist/images' gulp.task 'copy', -> - return gulp.src ['app/*.txt', 'app/*.ico'] + gulp.src ['app/*.txt', 'app/*.ico'] .pipe gulp.dest 'dist' gulp.task 'bundle', -> @@ -86,7 +86,7 @@ gulp.task 'bundle', -> cssFilter = $.filter ['**/*.css'] htmlFilter = $.filter ['*.html'] - return gulp.src 'app/index.html' + gulp.src 'app/index.html' .pipe $.preprocess() .pipe assets .pipe assets.restore() @@ -115,8 +115,8 @@ gulp.task 'webserver', -> filter: (filePath) -> if /app\\(?=scripts<% if (includeSass) { %>|styles<% } %>)/.test filePath $.util.log 'Ignoring', $.util.colors.magenta filePath - return false - else return true + false + else true open: true gulp.task 'serve', -> diff --git a/app/templates/_gulpfile.js b/app/templates/_gulpfile.js index ff65e9b..c59223c 100644 --- a/app/templates/_gulpfile.js +++ b/app/templates/_gulpfile.js @@ -40,7 +40,7 @@ gulp.task('scripts', function() { var start = new Date(); log('scripts:bundle'); } - browserify({ + return browserify({ entries: [filePath], extensions: extensions, debug: env === 'dev' @@ -61,7 +61,7 @@ gulp.task('scripts', function() { } if (dev) { - gulp.src(filePath) + return gulp.src(filePath) .pipe($.plumber()) .pipe($.tap(function(file) { var d = domain.create(); @@ -74,7 +74,7 @@ gulp.task('scripts', function() { d.run(bundle); })); } else { - bundle(); + return bundle(); } }); <% if (includeSass) { %>