factor out dygraph-utils.js
[dygraphs.git] / generate-combined.sh
1 #!/bin/bash
2 # Generates a single JS file that's easier to include.
3
4 # Pack all the JS together.
5
6 # This list needs to be kept in sync w/ the one in dygraph-dev.js
7 cat \
8 dygraph-layout.js \
9 dygraph-canvas.js \
10 dygraph.js \
11 dygraph-utils.js \
12 dygraph-gviz.js \
13 dygraph-interaction-model.js \
14 rgbcolor/rgbcolor.js \
15 strftime/strftime-min.js \
16 | perl -ne 'print unless m,REMOVE_FOR_COMBINED,..m,/REMOVE_FOR_COMBINED,' \
17 > /tmp/dygraph.js
18
19 java -jar yuicompressor-2.4.2.jar /tmp/dygraph.js \
20 > /tmp/dygraph-packed.js
21
22 # TODO(danvk): ensure the dygraphs copyright, etc. gets into the packed js.
23
24 cat \
25 /tmp/dygraph-packed.js \
26 > dygraph-combined.js