Merge pull request #185 from davidmsibley/master
[dygraphs.git] / generate-combined.sh
... / ...
CommitLineData
1#!/bin/bash
2# Generates a single JS file that's easier to include.
3
4# Pack all the JS together.
5
6# This list needs to be kept in sync w/ the one in dygraph-dev.js
7# and the one in jsTestDriver.conf.
8cat \
9strftime/strftime-min.js \
10rgbcolor/rgbcolor.js \
11stacktrace.js \
12dashed-canvas.js \
13dygraph-options.js \
14dygraph-layout.js \
15dygraph-canvas.js \
16dygraph.js \
17dygraph-utils.js \
18dygraph-gviz.js \
19dygraph-interaction-model.js \
20dygraph-range-selector.js \
21dygraph-tickers.js \
22plugins/base.js \
23plugins/annotations.js \
24plugins/axes.js \
25plugins/chart-labels.js \
26plugins/grid.js \
27plugins/legend.js \
28plugins/install.js \
29| perl -ne 'print unless m,REMOVE_FOR_COMBINED,..m,/REMOVE_FOR_COMBINED,' \
30> /tmp/dygraph.js
31
32java -jar yuicompressor-2.4.2.jar /tmp/dygraph.js \
33> /tmp/dygraph-packed.js
34
35(
36 echo '/*! @license Copyright 2011 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */'
37 cat /tmp/dygraph-packed.js
38) > dygraph-combined.js
39chmod a+r dygraph-combined.js