Merge pull request #764 from danvk/label_v
[dygraphs.git] / scripts / watch.sh
1 #!/bin/bash
2 # Continually regenerate these two files:
3 # - dist/dygraph.js
4 # - dist/tests.js
5 # As source/test files change.
6
7 # Clean background processes after quit
8 trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
9
10 mkdir -p dist # in case it doesn't exist; watchify needs it
11
12 watchify \
13 -v \
14 -t babelify \
15 -t [ envify --NODE_ENV development ] \
16 --debug \
17 --standalone Dygraph \
18 -o dist/dygraph.js \
19 src/dygraph.js &
20
21 watchify \
22 -v \
23 -t babelify \
24 -t [ envify --NODE_ENV development ] \
25 --debug \
26 -o dist/tests.js \
27 auto_tests/tests/*.js &
28
29 # Wait until background processes end
30 wait