From 83226cdd800deb07c42929d294ab9f817a3b4409 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Thu, 1 Nov 2018 10:25:54 +0100 Subject: [PATCH] Fix gulp watch task. --- gulpfile.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 3db5391..e06fe29 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,4 @@ -const { series, src, watch, dest} = require('gulp'); +const { series, src, watch, dest, parallel} = require('gulp'); const del = require('del'); const uglify = require('gulp-uglify'); const concat = require('gulp-concat'); @@ -21,7 +21,14 @@ const buildTask = series(cleanTask, function (cb) { .pipe(dest(paths.dest)); }); +function watchTask () { + watch( + paths.scripts, + buildTask + ) +} + exports.clean = cleanTask; -exports.watch = watch(paths.scripts, buildTask); +exports.watch = watchTask; exports.build = buildTask; exports.default = buildTask;