Skip to content

Commit

Permalink
Fix unsupported watchmode
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Jun 23, 2022
1 parent a04ddbd commit 9a41d4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli/synth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ export class SynthCommand<U extends SynthOptions>
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") {
return;
}

process.stdout.write("\x1Bc"); // clear the screen

watch.close();

trySynth()
Expand Down

0 comments on commit 9a41d4b

Please sign in to comment.