How to use Google Closure compiler

久未见 提交于 2019-12-03 17:15:16

Closure Compile can now manage Closure dependencies, that is dependencies defined with goog.provide and goog.require in the JavaScript code. So you do not need to use the closurebuilder.py script anymore. And this is why it's deprecated.

See the wiki page https://github.com/google/closure-compiler/wiki/Manage-Closure-Dependencies to know about the options/flags Closure Compiler provides for that.

Regarding the generation of deps files, which may be necessary for loading js files one by one for debugging/development purposes, you will still need Closure Library's depswriter.py script. Closure Compiler has no tool or flag for that. Reading https://github.com/google/closure-library/issues/382 depswriter.py is no longer used within Google, but it looks like the script is still maintained.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!