aboutsummaryrefslogtreecommitdiff
path: root/bin/dev-server
blob: 053ba574d0666bbc2107328931a182c57452b814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
set -euo

function finish {
  if [ -n "$LIVE_SERVER_PID" ]; then
    kill "$LIVE_SERVER_PID" > /dev/null 2>&1
  fi
}

trap finish EXIT

(cd public; python -m SimpleHTTPServer) &
LIVE_SERVER_PID="$!"

make build || true

watchman-make \
  --pattern 'src/**' elm-package.json Makefile public/style/main.css \
  --target "build" \
  --settle 0.5