From 555955569d83985e1c919a76fa831bc743fcec6e Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Mon, 22 Jul 2013 20:10:31 -0400 Subject: [PATCH] start using export symbols --- closure-todo.txt | 2 +- dygraph-exports.js | 3 +++ tests/exported-symbols.html | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 dygraph-exports.js 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 @@ + +