aboutsummaryrefslogtreecommitdiff
path: root/dev
blob: 36849acf7abac9964c2544ebea8a83f48dcea816 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
cd "$(dirname $0)"
CMD="$1"
PROJECT="cooking"
export DEV_MODE=true

if [ "$CMD" = "start" ]; then

  nix-shell --run "tmuxinator local"

elif [ "$CMD" = "stop" ]; then

  nix-shell --run "tmux kill-session -t $PROJECT"

elif [ "$CMD" = "watch-ts" ]; then

  rm -f static/main.js

  while true; do
    find src | entr -d -s "clear && make static/main.js"
  done

else

  echo "Usage: $0 start|stop|watch-frontend"
  exit 1

fi