This commit is contained in:
Benjamin Toby
2025-02-04 13:42:30 +01:00
parent 8a1294a348
commit efcee1bb11
24 changed files with 100 additions and 23 deletions
+4 -1
View File
@@ -69,9 +69,11 @@ export default async function watchFiles({
fs.watchFile(
filePath,
{
interval: interval || 500,
interval: interval || 200,
},
(curr, prev) => {
if (global.SYNCING) return;
const INTERVAL = options?.interval
? options.interval
: UPDATE_TIMEOUT;
@@ -79,6 +81,7 @@ export default async function watchFiles({
clearTimeout(timeout);
timeout = setTimeout(() => {
global.SYNCING = true;
sync({ options, filePath, files });
process.exit(1);
}, INTERVAL);