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