2 # Generates a single JS file that's easier to include.
5 # Include dyraph-options-reference only if DEBUG environment variable is set.
6 if [ ! -z
"$DEBUG" ]; then
7 maybe_options_reference
=dygraph-options-reference.js
9 maybe_options_reference
=''
12 # This list needs to be kept in sync w/ the one in dygraph-dev.js
13 # and the one in jsTestDriver.conf. Order matters, except for the plugins.
15 polyfills
/console.js \
23 dygraph-interaction-model.js \
25 dygraph-plugin-base.js \
27 dygraph-plugin-install.js \
28 $maybe_options_reference \
29 datahandler
/datahandler.js \
30 datahandler
/default.js \
31 datahandler
/default-fractions.js \
33 datahandler
/bars-custom.js \
34 datahandler
/bars-error.js \
35 datahandler
/bars-fractions.js
41 # Pack all the JS together.
48 echo '/*! @license Copyright 2014 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */'
52 node_modules
/uglify-js
/bin
/uglifyjs \
53 $
(GetSources |
xargs) \
54 --compress warnings
=false \
56 --define DEBUG
=false \
57 --preamble
"$(Copyright)" \
75 compress*|cat_compress
*)
79 CatCompressed
--source-map dygraph-combined.js.map \
81 chmod a
+r dygraph-combined.js dygraph-combined.js.map
84 echo >&2 "Unknown action '$ACTION'"