-
-
Save jteneycke/9dcceee63ad35003f0fd086b9244cfdb to your computer and use it in GitHub Desktop.
Watch elm files for changes and then recompile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Watch elm files for changes and then recompile | |
brew install fswatch | |
make watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
js = $(shell echo $(elm) | tr A-Z a-z) | |
elm = Main | |
# Example: make elm=Main js=main watch | |
watch: | |
echo "watching *.elm files, outputing $(js).js" && fswatch -0 *.elm | xargs -0 -n 1 -I \{\} elm-make $(elm).elm --output $(js).js | |
# Example: make elm=Main js=main build | |
build: | |
elm-make $(elm).elm --output $(js).js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment