diff --git a/build/tasks/build.js b/build/tasks/build.js index 309ae18c..5dfdf2cb 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -27,6 +27,14 @@ gulp.task('build', function (callback) { ); }); +gulp.task('rebuild', function(done) { + return runSequence( + 'bundle', + 'concatDeps', + callback + ); +}); + gulp.task('inlineTemplates', ['sass'], function() { return gulp.src(paths.source, { base: './' }) .pipe(replace(/'(.*?\.css)'/g, '\'.tmp/$1\'')) diff --git a/build/tasks/watch.js b/build/tasks/watch.js index 9d2aa503..bf2fc0bf 100644 --- a/build/tasks/watch.js +++ b/build/tasks/watch.js @@ -7,8 +7,8 @@ function changed(event) { } gulp.task('watch', ['build'], function () { - gulp.watch([ paths.source ], [ 'bundle', browserSync.reload ]).on('change', changed); - gulp.watch([ paths.html ], [ 'bundle', browserSync.reload]).on('change', changed); - gulp.watch([ paths.scss ], [ 'bundle', browserSync.reload]).on('change', changed); + gulp.watch([ paths.source ], [ 'rebuild', browserSync.reload ]).on('change', changed); + gulp.watch([ paths.html ], [ 'rebuild', browserSync.reload]).on('change', changed); + gulp.watch([ paths.scss ], [ 'rebuild', browserSync.reload]).on('change', changed); gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed); });