start using export symbols
authorDan Vanderkam <danvdk@gmail.com>
Tue, 23 Jul 2013 00:10:31 +0000 (20:10 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Tue, 23 Jul 2013 00:10:31 +0000 (20:10 -0400)
closure-todo.txt
dygraph-exports.js [new file with mode: 0644]
tests/exported-symbols.html

index f32e9c7..10dcead 100644 (file)
@@ -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 (file)
index 0000000..3bcf8d5
--- /dev/null
@@ -0,0 +1,3 @@
+goog.exportSymbol('Dygraph', Dygraph);
+goog.exportSymbol('Dygraph.prototype.updateOptions', Dygraph.prototype.updateOptions);
+goog.exportSymbol('Dygraph.prototype.destroy', Dygraph.prototype.destroy);
index 8b9e32d..27d9b7b 100644 (file)
     <!--
     <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)) {