Make watch tasks run sequentially in gulpfile
This commit is contained in:
parent
574c36f81c
commit
99a99dae34
|
@ -54,7 +54,7 @@ gulp.task("watch", () => {
|
||||||
Object.keys(WATCH_MAPPINGS).forEach((dir) => {
|
Object.keys(WATCH_MAPPINGS).forEach((dir) => {
|
||||||
let globbedPath = path.join(dir, "*");
|
let globbedPath = path.join(dir, "*");
|
||||||
let tasks = WATCH_MAPPINGS[dir];
|
let tasks = WATCH_MAPPINGS[dir];
|
||||||
let watchTask = gulp.watch(globbedPath, tasks);
|
let watchTask = gulp.watch(globbedPath, () => sequence(...tasks));
|
||||||
watchTask.on("change", (file) => {
|
watchTask.on("change", (file) => {
|
||||||
let relativePath = path.relative(__dirname, file.path);
|
let relativePath = path.relative(__dirname, file.path);
|
||||||
log(`[${chalk.blue(tasks.join(", "))}] Change detected: ${chalk.green(relativePath)}`);
|
log(`[${chalk.blue(tasks.join(", "))}] Change detected: ${chalk.green(relativePath)}`);
|
||||||
|
|
Loading…
Reference in a new issue