Created
July 15, 2014 18:06
-
-
Save nicknikolov/5dca5eb2e5d1d8aa3c55 to your computer and use it in GitHub Desktop.
pex gulp build file
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 gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var source = require('vinyl-source-stream'); | |
var watchify = require('watchify'); | |
gulp.task('watch', function() { | |
var bundler = watchify('./testpex3.js'); | |
bundler.transform({global:true}, 'brfs'); | |
bundler.ignore('plask'); | |
bundler.on('update', rebundle); | |
function rebundle () { | |
return bundler.bundle() | |
// log errors if they happen | |
.on('error', function(e) { | |
gutil.log('Browserify Error', e); | |
}) | |
.pipe(source('pex-main.js')) | |
.pipe(gulp.dest('./dist')) | |
} | |
return rebundle() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment