Skip to content

Instantly share code, notes, and snippets.

@TylerK
Created January 11, 2015 02:00
Show Gist options
  • Save TylerK/bd7a1942ac1feb607e71 to your computer and use it in GitHub Desktop.
Save TylerK/bd7a1942ac1feb607e71 to your computer and use it in GitHub Desktop.
//
// New Browserify hotness
//---------------------------------------------------------
var gulp = require('gulp')
, config = require('../../configs/gulp-config.js')
, browserify = require('browserify')
, reactify = require('reactify')
, watchify = require('watchify')
, source = require('vinyl-source-stream')
;
gulp.task('bundle:dev', function () {
// TODO: Hook up watchify
var bundleProject = function (_config) {
return browserify(_config.src)
.transform(reactify)
.bundle()
.pipe(source(_config.name))
.pipe(gulp.dest(_config.dest))
};
Object.keys(config.bundles).forEach(function (_bundle) {
bundleProject(config.bundles[_bundle]);
});
});
gulp.task('bundle:prod', function () {
// TODO: This
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment