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 DV |
5 | |
6 | # Generate the packed version of the subset of PlotKit needed by dygraphs. | |
7 | # This saves ~30k | |
8 | cd plotkit_v091 | |
9 | ./scripts/pack.py Base Layout Canvas > /tmp/plotkit-packed.js | |
10 | cd .. | |
11 | ||
b2a516b8 | 12 | # Do the same for MochiKit. This save another 77k. |
79f17b42 DV |
13 | cd mochikit_v14 |
14 | ./scripts/pack.py \ | |
223ddf66 | 15 | Base Iter DOM Style Color Signal \ |
79f17b42 DV |
16 | > /tmp/mochikit-packed.js |
17 | cd .. | |
18 | ||
b2a516b8 | 19 | # Pack the dygraphs JS. This saves another 22k. |
6a1aa64f | 20 | cat \ |
6a1aa64f DV |
21 | dygraph-canvas.js \ |
22 | dygraph.js \ | |
b2a516b8 DV |
23 | > /tmp/dygraph.js |
24 | ||
25 | java -jar plotkit_v091/scripts/custom_rhino.jar -c /tmp/dygraph.js \ | |
26 | > /tmp/dygraph-packed.js | |
27 | ||
28 | cat \ | |
29 | /tmp/mochikit-packed.js \ | |
30 | /tmp/plotkit-packed.js \ | |
6219c9d6 | 31 | strftime/strftime-min.js \ |
b2a516b8 | 32 | /tmp/dygraph-packed.js \ |
6a1aa64f | 33 | > dygraph-combined.js |