diff --git a/src/cli/synth.ts b/src/cli/synth.ts index f67bb8e..24e97e9 100644 --- a/src/cli/synth.ts +++ b/src/cli/synth.ts @@ -44,7 +44,7 @@ export class SynthCommand function watchLoop() { console.log(`Watching for changes in ${filename}...`); - const watch = fs.watch(filename, { recursive: true }); + const watch = fs.watch(filename); watch.on("change", (event) => { if (event !== "change") { @@ -52,6 +52,7 @@ export class SynthCommand } process.stdout.write("\x1Bc"); // clear the screen + watch.close(); trySynth()