File: watch.sh

package info (click to toggle)
dygraphs 2.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,340 kB
  • sloc: javascript: 24,842; sh: 800; python: 581; makefile: 45
file content (30 lines) | stat: -rwxr-xr-x 617 bytes parent folder | download | duplicates (2)
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
29
30
#!/bin/bash
# Continually regenerate these two files:
# - dist/dygraph.js
# - dist/tests.js
# As source/test files change.

# Clean background processes after quit
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT

mkdir -p dist  # in case it doesn't exist; watchify needs it

watchify \
  -v \
  -t babelify \
  -t [ envify --NODE_ENV development ] \
  --debug \
  --standalone Dygraph \
  -o dist/dygraph.js \
  src/dygraph.js &

watchify \
  -v \
  -t babelify \
  -t [ envify --NODE_ENV development ] \
  --debug \
  -o dist/tests.js \
  auto_tests/tests/*.js &

# Wait until background processes end
wait