Last active
August 29, 2015 14:17
-
-
Save perguth/f5523bd3b3b31953da5e to your computer and use it in GitHub Desktop.
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 fs = require('fs') | |
var browserify = require('browserify') | |
var babelify = require('babelify') | |
gulp.task('default', function () { | |
// place code for your default task here | |
}) | |
gulp.task('watch', function () { | |
gulp.watch(['index.js', 'js/**/*.js'], function (event) { | |
browserify({ debug: true }) | |
.transform(babelify) | |
.require('./index.js', { entry: true }) | |
.bundle() | |
.on('error', function (err) { console.log('Error: ' + err.message) }) | |
.pipe(fs.createWriteStream('bundle.js')) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment