Google closure compiler and UMD pattern
问题 I am developing a javascript library which uses closure compiler to combine/minify & typecheck. To avoid pouting global namespace I want to use UMD pattern & closue @export(or goog.exportSymbol('workspace', lkr.workspace) goog.provide('workspace'); goog.require('lkr.workspace'); /** * Exposed external access point * @export * @return {component} */ workspace = function() { return lkr.workspace.Core; } I have used an output-wrapper-file to generate the UMD wrapper //UMD bundling closure code