Skip to content

Commit

Permalink
fix: also build on scanner.c change
Browse files Browse the repository at this point in the history
  • Loading branch information
almahdi404 committed Sep 9, 2024
1 parent 45f32b6 commit 0216b29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fair-tables-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"treeground": patch
---

fix: also build on scanner.c change
3 changes: 2 additions & 1 deletion src/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export default partyHandler({
watcher.on("change", (filePath) => {
for (const folder of grammars) {
if (filePath.startsWith(folder)) {
if (path.basename(filePath) === "grammar.js") {
const fileName = path.basename(filePath);
if (fileName === "grammar.js" || fileName === "scanner.c") {
clearTimeout(builds[folder]);
builds[folder] = setTimeout(() => {
generateNbuildWasm(folder, party)
Expand Down

0 comments on commit 0216b29

Please sign in to comment.