Skip to content

Commit 809ecb3

Browse files
Added a watch loop to continuously build whilst editing code. (#119)
Added "watch" command to package.json, that will watch for Elm file changes and build on change. Useful for keeping the cli compiler up to date quickly as code changes.
1 parent 1164bf7 commit 809ecb3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"build:node": "./scripts/build.sh node",
1515
"build:browser": "./scripts/build.sh browser",
1616
"build:bin": "./scripts/build.sh bin",
17+
"watch": "onchange \"src/**/*.elm\" -- npm run build:bin",
1718
"test": "npm-run-all --sequential test:*",
1819
"test:eslint": "eslint",
1920
"test:elm-format-validate": "elm-format . --validate",
@@ -44,6 +45,7 @@
4445
"guida": "^0.3.0-alpha",
4546
"jest": "^29.7.0",
4647
"npm-run-all": "^4.1.5",
48+
"onchange": "^7.1.0",
4749
"uglify-js": "^3.19.3"
4850
}
4951
}

0 commit comments

Comments
 (0)