Last active
July 25, 2023 11:20
-
-
Save joakin/3c4c32d591d1cf902276fc37fcd23ca6 to your computer and use it in GitHub Desktop.
Watch and compile elm files
This file contains hidden or 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
#!/usr/bin/env bash | |
COLOR_OFF="\e[0m"; | |
DIM="\e[2m"; | |
function compile { | |
# Customize the elm make command as needed | |
elm make src/elm/Main.elm src/elm/Stories/**/*.elm && rm elm.js | |
} | |
function run { | |
clear; | |
tput reset; | |
echo -en "\033c\033[3J"; | |
echo -en "${DIM}"; | |
date -R; | |
echo -en "${COLOR_OFF}"; | |
compile; | |
} | |
run; | |
chokidar src | while read WHATEVER; do | |
run; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment