works in IE9
[dygraphs.git] / generate-combined.sh
1 #!/bin/bash
2 # Generates a single JS file that's easier to include.
3
4 # Pack the dygraphs JS and rgbcolor
5 cat \
6 dygraph-canvas.js \
7 dygraph.js \
8 rgbcolor/rgbcolor.js \
9 strftime/strftime-min.js \
10 | perl -ne 'print unless m,REMOVE_FOR_COMBINED,..m,/REMOVE_FOR_COMBINED,' \
11 > /tmp/dygraph.js
12
13 java -jar yuicompressor-2.4.2.jar /tmp/dygraph.js \
14 > /tmp/dygraph-packed.js
15
16 # TODO(danvk): ensure the dygraphs copyright, etc. gets into the packed js.
17
18 cat \
19 /tmp/dygraph-packed.js \
20 > dygraph-combined.js