Here's a command that can be used to build dygraphs using the closure
compiler:
-java -jar ../../closure-compiler-read-only/build/compiler.jar --js=dygraph-utils.js --js=dashed-canvas.js --js=dygraph-options-reference.js --js=dygraph-tickers.js --js=dygraph-gviz.js --js=dygraph-options.js --js=dygraph-layout.js --js=dygraph-interaction-model.js --js=dygraph-canvas.js --js=dygraph-plugin-base.js --js_output_file=/tmp/out.js --compilation_level ADVANCED_OPTIMIZATIONS --warning_level VERBOSE --externs dygraph-externs.js
+java -jar ../../closure-compiler-read-only/build/compiler.jar --js ../../closure-library-read-only/closure/goog/base.js --js=dygraph-utils.js --js=dashed-canvas.js --js=dygraph-tickers.js --js=dygraph-canvas.js --js=dygraph.js --js=dygraph-gviz.js --js=dygraph-options-reference.js --js=dygraph-options.js --js=dygraph-layout.js --js=dygraph-interaction-model.js --js=dygraph-plugin-base.js --js=dygraph-exports.js --js_output_file=/tmp/out.js --compilation_level ADVANCED_OPTIMIZATIONS --warning_level VERBOSE --externs dygraph-externs.js --externs gviz-api.js --output_wrapper='(function() {%output%})();'
As each file is closurized, it can be added as a "--js" parameter.
--- /dev/null
+goog.exportSymbol('Dygraph', Dygraph);
+goog.exportSymbol('Dygraph.prototype.updateOptions', Dygraph.prototype.updateOptions);
+goog.exportSymbol('Dygraph.prototype.destroy', Dygraph.prototype.destroy);
<!--
<script type="text/javascript" src="../dygraph-dev.js"></script>
-->
+ <!--
<script type="text/javascript" src="../dygraph-combined.js"></script>
+ -->
+ <script type="text/javascript" src="/tmp/out.js"></script>
<script type="text/javascript">
for (k in window) {
if (!windowProps.hasOwnProperty(k)) {