Last active
August 29, 2015 14:00
-
-
Save mitchelkuijpers/11282137 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
var reactify = require('reactify'); | |
var production = process.env.NODE_ENV === 'production'; | |
gulp.task('scripts', function () { | |
var bundler = browserify('./src/client.js', {basedir: __dirname, debug: !production}}); | |
bundler.transform(reactify); | |
var stream = bundler.bundle(); | |
return stream | |
.pipe(source('bundle.js')) | |
.pipe(gulp.dest('./assets/js')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment