Skip to content

Commit

Permalink
Sets chokidar watchOption awaitWriteFinish to false, and batch timer …
Browse files Browse the repository at this point in the history
…to 0 to speed up watching
  • Loading branch information
webketje committed Jun 27, 2023
1 parent 23b0944 commit 5a516b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -525,7 +525,7 @@ Metalsmith.prototype.watch = function (options) {
cwd: this.directory(),
ignored: this.ignore(),
ignoreInitial: true,
awaitWriteFinish: true
awaitWriteFinish: false
}
}
return this
Expand Down
2 changes: 1 addition & 1 deletion lib/watcher.js
Expand Up @@ -135,7 +135,7 @@ module.exports = function watchable(files, metalsmith) {
(err) => onRebuild(err)
)
})
}, 1000)
}, 0)
})
return new Promise((resolve, reject) => {
rerun()
Expand Down

0 comments on commit 5a516b2

Please sign in to comment.