From 99a99dae344552c50f791f021a7b3eaca7cd5562 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Thu, 28 Jun 2018 23:30:51 -0400 Subject: [PATCH] Make watch tasks run sequentially in gulpfile --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index ae63c80..a34d93d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -54,7 +54,7 @@ gulp.task("watch", () => { Object.keys(WATCH_MAPPINGS).forEach((dir) => { let globbedPath = path.join(dir, "*"); let tasks = WATCH_MAPPINGS[dir]; - let watchTask = gulp.watch(globbedPath, tasks); + let watchTask = gulp.watch(globbedPath, () => sequence(...tasks)); watchTask.on("change", (file) => { let relativePath = path.relative(__dirname, file.path); log(`[${chalk.blue(tasks.join(", "))}] Change detected: ${chalk.green(relativePath)}`);