Add drawAxis option, deprecating drawXAxis and drawYAxis. Added tests for that and...
[dygraphs.git] / file-size-stats.sh
1 #!/bin/bash
2
3 # Reports compressed file sizes for each JS file in dygraphs.
4
5 # This list needs to be kept in sync w/ the one in dygraph-dev.js
6 # and the one in jsTestDriver.conf.
7 for file in \
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 dygraph-tickers.js \
15 rgbcolor/rgbcolor.js \
16 strftime/strftime-min.js \
17 dashed-canvas.js \
18 dygraph-plugin-base.js \
19 plugins/annotations.js \
20 plugins/axes.js \
21 plugins/range-selector.js \
22 plugins/chart-labels.js \
23 plugins/grid.js \
24 plugins/legend.js \
25 dygraph-plugin-install.js \
26 ; do
27 base_size=$(cat $file | wc -c)
28 cat $file \
29 | perl -ne 'print unless m,REMOVE_FOR_COMBINED,..m,/REMOVE_FOR_COMBINED,' \
30 > /tmp/dygraph.js
31 min_size=$(java -jar yuicompressor-2.4.2.jar /tmp/dygraph.js | gzip -c | wc -c)
32
33 echo "$min_size ($base_size) $file"
34 done