From: Dan Vanderkam Date: Tue, 23 Jul 2013 00:10:31 +0000 (-0400) Subject: start using export symbols X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=555955569d83985e1c919a76fa831bc743fcec6e;p=dygraphs.git start using export symbols --- diff --git a/closure-todo.txt b/closure-todo.txt index f32e9c7..10dcead 100644 --- a/closure-todo.txt +++ b/closure-todo.txt @@ -32,7 +32,7 @@ Plugins: 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. diff --git a/dygraph-exports.js b/dygraph-exports.js new file mode 100644 index 0000000..3bcf8d5 --- /dev/null +++ b/dygraph-exports.js @@ -0,0 +1,3 @@ +goog.exportSymbol('Dygraph', Dygraph); +goog.exportSymbol('Dygraph.prototype.updateOptions', Dygraph.prototype.updateOptions); +goog.exportSymbol('Dygraph.prototype.destroy', Dygraph.prototype.destroy); diff --git a/tests/exported-symbols.html b/tests/exported-symbols.html index 8b9e32d..27d9b7b 100644 --- a/tests/exported-symbols.html +++ b/tests/exported-symbols.html @@ -27,7 +27,10 @@ + +