Fix watch task

This commit is contained in:
Roman Hotsiy 2016-05-18 22:39:21 +03:00
parent a8cd9e3c14
commit dbd90b6c73
2 changed files with 11 additions and 3 deletions

View File

@ -27,6 +27,14 @@ gulp.task('build', function (callback) {
); );
}); });
gulp.task('rebuild', function(done) {
return runSequence(
'bundle',
'concatDeps',
callback
);
});
gulp.task('inlineTemplates', ['sass'], function() { gulp.task('inlineTemplates', ['sass'], function() {
return gulp.src(paths.source, { base: './' }) return gulp.src(paths.source, { base: './' })
.pipe(replace(/'(.*?\.css)'/g, '\'.tmp/$1\'')) .pipe(replace(/'(.*?\.css)'/g, '\'.tmp/$1\''))

View File

@ -7,8 +7,8 @@ function changed(event) {
} }
gulp.task('watch', ['build'], function () { gulp.task('watch', ['build'], function () {
gulp.watch([ paths.source ], [ 'bundle', browserSync.reload ]).on('change', changed); gulp.watch([ paths.source ], [ 'rebuild', browserSync.reload ]).on('change', changed);
gulp.watch([ paths.html ], [ 'bundle', browserSync.reload]).on('change', changed); gulp.watch([ paths.html ], [ 'rebuild', browserSync.reload]).on('change', changed);
gulp.watch([ paths.scss ], [ 'bundle', browserSync.reload]).on('change', changed); gulp.watch([ paths.scss ], [ 'rebuild', browserSync.reload]).on('change', changed);
gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed); gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed);
}); });