From 5407a305e8943dcf9434c3d3b5d949f285c9c9ba Mon Sep 17 00:00:00 2001 From: Kenial Lee Date: Sat, 4 Feb 2017 15:09:55 -0800 Subject: [PATCH] =?UTF-8?q?Removed=20dependency=20of=20`watch`=20task=20an?= =?UTF-8?q?d=20put=20it=20in=20runSequence;=20there=20was=20no=20runSequen?= =?UTF-8?q?ce=20for=20it,=20which=20makes=20`watch`=20task=20won=E2=80=99t?= =?UTF-8?q?=20be=20run.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {{cookiecutter.project_slug}}/gulpfile.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index 73b71339f..4f89a7719 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -88,17 +88,8 @@ gulp.task('browserSync', function() { }); }); -// Default task -gulp.task('default', function() { - runSequence(['styles', 'scripts', 'imgCompression'], 'runServer', 'browserSync'); -}); - -//////////////////////////////// - //Watch// -//////////////////////////////// - // Watch -gulp.task('watch', ['default'], function() { +gulp.task('watch', function() { gulp.watch(paths.sass + '/*.scss', ['styles']); gulp.watch(paths.js + '/*.js', ['scripts']).on("change", reload); @@ -106,3 +97,8 @@ gulp.task('watch', ['default'], function() { gulp.watch(paths.templates + '/**/*.html').on("change", reload); }); + +// Default task +gulp.task('default', function() { + runSequence(['styles', 'scripts', 'imgCompression'], 'runServer', 'browserSync', 'watch'); +});