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
@@ -70,13 +70,16 @@ function watchFiles(_a) {
sync({ options, filePath, files });
yield (0, delay_1.default)();
fs_1.default.watchFile(filePath, {
interval: interval || 500,
interval: interval || 200,
}, (curr, prev) => {
if (global.SYNCING)
return;
const INTERVAL = (options === null || options === void 0 ? void 0 : options.interval)
? options.interval
: UPDATE_TIMEOUT;
clearTimeout(timeout);
timeout = setTimeout(() => {
global.SYNCING = true;
sync({ options, filePath, files });
process.exit(1);
}, INTERVAL);