Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions app/templates/_gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ 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
css: '.tmp/styles'
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', ->
Expand All @@ -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()
Expand Down Expand Up @@ -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', ->
Expand Down
6 changes: 3 additions & 3 deletions app/templates/_gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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();
Expand All @@ -74,7 +74,7 @@ gulp.task('scripts', function() {
d.run(bundle);
}));
} else {
bundle();
return bundle();
}
});
<% if (includeSass) { %>
Expand Down