mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-14 03:48:13 +03:00
use watch script
This commit is contained in:
parent
85e255e8c7
commit
3ac6cdf955
2
Makefile
2
Makefile
@ -61,7 +61,7 @@ public/%: styleguide-app/%
|
||||
|
||||
.PHONY: serve-public
|
||||
serve-public: public
|
||||
./scripts/serve.sh public
|
||||
./scripts/watch.sh
|
||||
|
||||
# plumbing
|
||||
|
||||
|
18
scripts/watch.sh
Executable file
18
scripts/watch.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# start a web server
|
||||
./scripts/serve.sh public &
|
||||
SERVER_PID=$!
|
||||
|
||||
# start a watcher
|
||||
find src styleguide-app -type f -not -ipath '*elm-stuff*' | entr make public &
|
||||
WATCHER_PID=$!
|
||||
|
||||
# wait for an interrupt and kill both of them
|
||||
cleanup() {
|
||||
kill $SERVER_PID $WATCHER_PID
|
||||
}
|
||||
trap cleanup EXIT INT
|
||||
|
||||
while : ; do sleep 10; done
|
Loading…
Reference in New Issue
Block a user