Commit | Line | Data |
---|---|---|
6a1aa64f DV |
1 | #!/bin/bash |
2 | # Generates a single JS file that's easier to include. | |
3 | # This packed JS includes a partial copy of MochiKit and PlotKit. | |
b2a516b8 | 4 | # It winds up being 146k uncompressed and 37k gzipped. |
43f15770 | 5 | |
b2a516b8 | 6 | # Do the same for MochiKit. This save another 77k. |
79f17b42 DV |
7 | cd mochikit_v14 |
8 | ./scripts/pack.py \ | |
223ddf66 | 9 | Base Iter DOM Style Color Signal \ |
79f17b42 DV |
10 | > /tmp/mochikit-packed.js |
11 | cd .. | |
12 | ||
b2a516b8 | 13 | # Pack the dygraphs JS. This saves another 22k. |
6a1aa64f | 14 | cat \ |
6a1aa64f DV |
15 | dygraph-canvas.js \ |
16 | dygraph.js \ | |
b2a516b8 DV |
17 | > /tmp/dygraph.js |
18 | ||
5709f0d5 | 19 | java -jar custom_rhino.jar -c /tmp/dygraph.js \ |
b2a516b8 DV |
20 | > /tmp/dygraph-packed.js |
21 | ||
5709f0d5 DV |
22 | # TODO(danvk): ensure the dygraphs copyright, etc. gets into the packed js. |
23 | ||
b2a516b8 DV |
24 | cat \ |
25 | /tmp/mochikit-packed.js \ | |
6219c9d6 | 26 | strftime/strftime-min.js \ |
b2a516b8 | 27 | /tmp/dygraph-packed.js \ |
6a1aa64f | 28 | > dygraph-combined.js |