diff --git a/gulp/tasks/dev.js b/gulp/tasks/dev.js index 1ecab42..9ef0f4c 100644 --- a/gulp/tasks/dev.js +++ b/gulp/tasks/dev.js @@ -2,5 +2,5 @@ runSeq = require('run-sequence'); gulp.task('dev', function (done) { - runSeq('build', ['watch'], done); + runSeq('clean', ['watch'], done); }); diff --git a/gulp/tasks/dev.js b/gulp/tasks/dev.js index 1ecab42..9ef0f4c 100644 --- a/gulp/tasks/dev.js +++ b/gulp/tasks/dev.js @@ -2,5 +2,5 @@ runSeq = require('run-sequence'); gulp.task('dev', function (done) { - runSeq('build', ['watch'], done); + runSeq('clean', ['watch'], done); }); diff --git a/gulp/util/bundle.js b/gulp/util/bundle.js index b635f70..3501b63 100644 --- a/gulp/util/bundle.js +++ b/gulp/util/bundle.js @@ -12,7 +12,11 @@ handleErrors = require('../util/handleErrors'); // TODO - Concat license header to dev/prod build files. -function rebundle() { +function rebundle(devBundle) { + if (devBundle) { + gutil.log('Starting dev rebundle...'); + } + var debug, min; debug = sourcemaps.init({loadMaps: true}); @@ -25,15 +29,20 @@ .pipe(sourcemaps.write('./', {sourceRoot: './', addComment: false})) .pipe(gulp.dest(paths.out)); - return this.bundle() + var stream = this.bundle() .on('error', handleErrors.handler) .pipe(handleErrors()) .pipe(source('pixi.js')) - .pipe(buffer()) - .pipe(mirror( - debug, - min - )); + .pipe(buffer()); + + if (devBundle) { + return stream.pipe(debug).once('end', function () { + gutil.log('Dev rebundle complete.'); + }); + } + else { + return stream.pipe(mirror(debug, min)); + } } function createBundler(args) { @@ -56,7 +65,7 @@ var bundler = watchify(createBundler(watchify.args)); bundler.on('update', function () { - var bundle = rebundle.call(this); + var bundle = rebundle.call(this, true); if (onUpdate) { bundle.on('end', onUpdate);