commit 9d28af82cd393ad01d60a580f18c5a4940f9f812
parent 7645088eb43c4c272d4634004f27ead8e86bb88e
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Wed, 3 Sep 2014 14:12:44 +0400
Update bundle build step
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gulpfile.js b/gulpfile.js
@@ -122,10 +122,11 @@ gulp.task('bundle', function (cb) {
return cb();
}
- if (watch) {
- bundler.watch(200, bundle);
- } else {
+ // Start watching for changes if task == 'serve'
+ if ($.util.env._.indexOf('serve') === -1) {
bundler.run(bundle);
+ } else {
+ bundler.watch(200, bundle);
}
});
@@ -152,7 +153,6 @@ gulp.task('serve', ['build'], function () {
gulp.watch(src.images, ['images']);
gulp.watch(src.pages, ['pages']);
gulp.watch(src.styles, ['styles']);
- gulp.watch(src.bundle, ['bundle']);
watch = true;
});