Add more option specifications per series, and nullify the 'series' and 'axis' warnin...
[dygraphs.git] / file-size-stats.sh
CommitLineData
3641418e
DV
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.
7for file in \
8dygraph-layout.js \
9dygraph-canvas.js \
10dygraph.js \
11dygraph-utils.js \
12dygraph-gviz.js \
13dygraph-interaction-model.js \
14dygraph-range-selector.js \
15dygraph-tickers.js \
16rgbcolor/rgbcolor.js \
17strftime/strftime-min.js \
18dashed-canvas.js \
19plugins/base.js \
20plugins/annotations.js \
21plugins/axes.js \
22plugins/chart-labels.js \
23plugins/grid.js \
24plugins/legend.js \
25plugins/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"
34done