From 7a01b001ccc4a7bda3da92486903540e3f9754fd Mon Sep 17 00:00:00 2001 From: Joris Date: Thu, 13 Feb 2020 18:54:18 +0100 Subject: Set up bucklescript --- dev | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'dev') diff --git a/dev b/dev index 36849ac..d0acad0 100755 --- a/dev +++ b/dev @@ -2,27 +2,26 @@ cd "$(dirname $0)" CMD="$1" PROJECT="cooking" -export DEV_MODE=true if [ "$CMD" = "start" ]; then - nix-shell --run "tmuxinator local" + nix-shell --run "make node_modules && tmuxinator local" elif [ "$CMD" = "stop" ]; then nix-shell --run "tmux kill-session -t $PROJECT" -elif [ "$CMD" = "watch-ts" ]; then +elif [ "$CMD" = "watch-ocaml" ]; then - rm -f static/main.js + bsb -make-world -w - while true; do - find src | entr -d -s "clear && make static/main.js" - done +elif [ "$CMD" = "watch-js" ]; then + + node_modules/.bin/rollup --watch --config rollup.config.js else - echo "Usage: $0 start|stop|watch-frontend" + echo "Usage: $0 start|stop|watch-ocaml|watch-js" exit 1 fi -- cgit v1.2.3