Last active
August 29, 2015 14:06
-
-
Save sayrer/c4c4ce0c1748573f863e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Baz.js | |
-------------- | |
goog.require('goog.array'); | |
function Baz() {} | |
Baz.prototype = { | |
baz: function() { | |
return goog.array.last(['asdf','asd','baz']); | |
}, | |
bar: function () { | |
return 4 + 4; | |
} | |
} | |
module.exports = Baz; | |
app.js | |
-------------- | |
var Baz = require('./Baz'); | |
var baz = new Baz(); | |
console.log(baz.baz()); | |
console.log(baz.bar()); | |
Invocation: | |
-------------- | |
java -jar compiler.jar --js ../closure-library/closure/goog/base.js \ | |
--js app.js --js ../closure-library/closure/goog/debug/error.js \ | |
--js ../closure-library/closure/goog/dom/nodetype.js \ | |
--js ../closure-library/closure/goog/string/string.js \ | |
--js ../closure-library/closure/goog/asserts/asserts.js \ | |
--js ../closure-library/closure/goog/array/array.js \ | |
--js Baz.js --compilation_level=ADVANCED_OPTIMIZATIONS \ | |
--manage_closure_dependencies --generate_exports \ | |
--formatting=pretty_print --externs extern.js \ | |
--process_common_js_modules --common_js_entry_module app.js \ | |
--create_renaming_reports |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment