separate uglify from dev build

This commit is contained in:
Roman Hotsiy 2016-01-09 22:23:49 +02:00
parent da019894be
commit 99fc52d7de
2 changed files with 11 additions and 2 deletions

View File

@ -22,7 +22,16 @@ gulp.task('build', function (callback) {
);
});
gulp.task('bundle', ['bundleSfx', 'concatDeps', 'uglify']);
gulp.task('buildDev', function (callback) {
return runSequence(
'clean',
'bundle',
callback
);
});
gulp.task('bundle', ['bundleSfx', 'concatDeps']);
gulp.task('bundleProd', ['bundle', 'uglify']);
gulp.task('inlineTemplates', ['sass'], function() {

View File

@ -6,7 +6,7 @@ function changed(event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
}
gulp.task('watch', ['build'], function () {
gulp.task('watch', ['buildDev'], 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);