Created
May 26, 2015 18:51
-
-
Save ngryman/bcb96f013545cc60c6a2 to your computer and use it in GitHub Desktop.
gulp + browserify
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 browserify = require('browserify') | |
| , gulp = require('gulp') | |
| , gutil = require('gulp-util') | |
| , mocha = require('gulp-mocha') | |
| , source = require('vinyl-source-stream') | |
| , watchify = require('watchify'); | |
| var b = watchify(browserify({ | |
| entries: ['./app/index.js'], | |
| debug: true | |
| })); | |
| function bundle() { | |
| return b.bundle() | |
| .on('error', gutil.log.bind(gutil, 'Browserify Error')) | |
| .pipe(source('app.js')) | |
| .pipe(gulp.dest('./dist')); | |
| } | |
| gulp.task('browserify', bundle); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment