Skip to content

Commit 00303c9

Browse files
committed
Add done to watch to prevent async error
1 parent fffcdf5 commit 00303c9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.eleventy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const markdownItContainer = require("markdown-it-container");
88

99
module.exports = function (eleventyConfig) {
1010
eleventyConfig.setQuietMode(process.env.npm_config_quiet);
11-
eleventyConfig.setWatchThrottleWaitTime(100);
11+
eleventyConfig.setWatchThrottleWaitTime(500);
1212

1313
eleventyConfig.addFilter('dump', obj => {
1414
const getCircularReplacer = () => {

scripts/gulpfile.factory.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ ${fs
336336
)
337337
);
338338

339-
task("watch", () => {
339+
task("watch", (done) => {
340340
watch(path.join(paths.source, "*"), series("build"));
341+
done();
341342
});
342343

343344
task("dev", series("build", "watch"));
@@ -350,8 +351,9 @@ ${fs
350351
series("clean", "compile:styles", "minify:styles", "copy:src", "copy:compiled", ...prebundle, "clean:post")
351352
);
352353

353-
task("watch:nojs", () => {
354+
task("watch:nojs", (done) => {
354355
watch(path.join(paths.source, "*"), series("build:nojs"));
356+
done();
355357
});
356358

357359
task("dev:nojs", parallel("build:nojs", "watch:nojs"));

0 commit comments

Comments
 (0)