Commit | Line | Data |
---|---|---|
badb74b3 | 1 | #!/bin/bash |
21e45828 DV |
2 | |
3 | # This script runs dygraphs through the Closure Compiler. This checks for | |
4 | # errors (both in the JS and in the jsdoc) and flags type errors as WARNINGS. | |
5 | ||
6 | # It outputs minified JS to a temp file. This should be ignored for now, until | |
7 | # it's fully functional. | |
8 | ||
60edb3ae DV |
9 | CLOSURE_COMPILER=node_modules/closure-compiler/lib/vendor/compiler.jar |
10 | BASE_JS=node_modules/obvious-closure-library/closure/goog/base.js | |
11 | if [[ (! -f $CLOSURE_COMPILER) || (! -f $BASE_JS) ]]; then | |
12 | echo "Missing compiler.jar or base.js. Try running 'npm install'." 1>&2 | |
ef77580e DV |
13 | exit 1 |
14 | fi | |
bc5af8d6 DV |
15 | |
16 | java -jar $CLOSURE_COMPILER \ | |
21e45828 | 17 | --compilation_level ADVANCED_OPTIMIZATIONS \ |
badb74b3 DV |
18 | --warning_level VERBOSE \ |
19 | --output_wrapper='(function() {%output%})();' \ | |
60edb3ae | 20 | --js $BASE_JS \ |
badb74b3 | 21 | --js=dashed-canvas.js \ |
badb74b3 DV |
22 | --js=dygraph-options.js \ |
23 | --js=dygraph-layout.js \ | |
24 | --js=dygraph-canvas.js \ | |
25 | --js=dygraph.js \ | |
26 | --js=dygraph-utils.js \ | |
27 | --js=dygraph-gviz.js \ | |
28 | --js=dygraph-interaction-model.js \ | |
29 | --js=dygraph-tickers.js \ | |
30 | --js=dygraph-plugin-base.js \ | |
31 | --js=plugins/annotations.js \ | |
32 | --js=plugins/axes.js \ | |
33 | --js=plugins/chart-labels.js \ | |
34 | --js=plugins/grid.js \ | |
35 | --js=plugins/legend.js \ | |
36 | --js=plugins/range-selector.js \ | |
37 | --js=dygraph-plugin-install.js \ | |
38 | --js=dygraph-options-reference.js \ | |
39 | --js=datahandler/datahandler.js \ | |
40 | --js=datahandler/default.js \ | |
41 | --js=datahandler/default-fractions.js \ | |
42 | --js=datahandler/bars.js \ | |
43 | --js=datahandler/bars-custom.js \ | |
44 | --js=datahandler/bars-error.js \ | |
45 | --js=datahandler/bars-fractions.js \ | |
46 | --js=dygraph-exports.js \ | |
faa608cf | 47 | --externs dygraph-internal.externs.js \ |
badb74b3 DV |
48 | --externs gviz-api.js \ |
49 | --js_output_file=/tmp/out.js |