Updates
This commit is contained in:
+4
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user