mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 10:54:06 -06:00
fix(build.ts/startWatching): add option awaitWriteFinish with 250ms threshold
This makes it so that the events are not fired until the file have stabilized. This also changes the order of the fired events. A move / rename now results in `delete` then `add` rather than the other way around. From `chokidar` README - https://github.com/paulmillr/chokidar?tab=readme-ov-file#performance: ``` awaitWriteFinish.stabilityThreshold (default: 2000). Amount of time in milliseconds for a file size to remain constant before emitting its event. ``` Fixes #2232
This commit is contained in:
parent
19e324d914
commit
1b71f26965
@ -143,6 +143,7 @@ async function startWatching(
|
||||
}
|
||||
|
||||
const watcher = chokidar.watch(".", {
|
||||
awaitWriteFinish: { stabilityThreshold: 250 },
|
||||
persistent: true,
|
||||
cwd: argv.directory,
|
||||
ignoreInitial: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user