diff options
author | Joris | 2020-11-01 13:42:56 +0100 |
---|---|---|
committer | Joris | 2020-11-01 13:42:56 +0100 |
commit | 87e288cd01fbd04675a562bca582f7c2e591c010 (patch) | |
tree | 5cb92d3cc6b4b084516fddf32ce30bcb25f2c335 /bin/dev-server | |
parent | adaec3d1925477e0922bf6ed88a708db4c97d766 (diff) |
Improve a bit
Diffstat (limited to 'bin/dev-server')
-rwxr-xr-x | bin/dev-server | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/dev-server b/bin/dev-server new file mode 100755 index 0000000..053ba57 --- /dev/null +++ b/bin/dev-server @@ -0,0 +1,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 |