Created
September 8, 2014 23:32
-
-
Save gcpantazis/209c6e7767f47ba37575 to your computer and use it in GitHub Desktop.
Gulp setup for browserify with transforms, plugins, minification, and sourcemaps.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
gulp.task('scripts', function() { | |
var bundler = browserify({ | |
entries: ['./app/scripts/app.js'], | |
debug: true, | |
transform: ['reactify', 'debowerify'] | |
}); | |
return bundler | |
.plugin('minifyify', { | |
map: 'bundle.map.json', | |
output: 'dist/scripts/bundle.map.json' | |
}) | |
.bundle() | |
.pipe(source('app.js')) | |
.pipe(gulp.dest('dist/scripts')) | |
.pipe($.connect.reload()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment