#!/usr/bin/env bash set -euo pipefail cd "$(dirname $0)" CMD="$1" PROJECT="map" if [ "$CMD" = "start" ]; then nix-shell --run "make node_modules && tmuxinator local" elif [ "$CMD" = "stop" ]; then nix-shell --run "tmux kill-session -t $PROJECT" elif [ "$CMD" = "watch-ocaml" ]; then bsb -make-world -w elif [ "$CMD" = "watch-js" ]; then node_modules/.bin/rollup --watch --config rollup.config.js else echo "Usage: $0 start|stop|watch-ocaml|watch-js" exit 1 fi