将 Google 闭包编译器与 Eclipse IDE 集成?
有人知道如何集成 Google 闭包编译器使用 Eclipse IDE?我想做的事情是将 Google 闭包编译器配置为 Eclipse IDE 的外部工具。然后我就可以在 IDE 中运行闭包编译器并通过单击缩小我的 Javascript 文件。 有人解决这个问题了吗?
Does anybody know how to integrate Google closure compiler with Eclipse IDE? The thing I was trying to do is to configure Google closure compiler as a external tool for Eclipse IDE. Then I would be able to run closure compiler within IDE and minify my Javascript files with single click.
Have anybody solved this problem yet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Rock Star Apps 提供了一个鲜为人知的插件来执行此操作。我刚刚写了一篇关于它的博客文章:[已删除,因为不再存在了]。经过一些谷歌搜索,我也发现了这个,但还没有测试它: com/greggian/Eclipse-Closure-Compiler" rel="nofollow noreferrer">https://github.com/greggian/Eclipse-Closure-Compiler。
更新:Rock Star Apps 网站不再运行。如果我今天尝试这样做,我肯定会下载闭包编译器 jar,编写一个 ant 脚本来运行它(类似于下面的代码),然后为其创建一个项目构建器。
Rock Star Apps provide a little-known plugin which does this. I just wrote a blog article on it: [removed as doesn't exist anymore].After some googling, I also found this, but haven't tested it: https://github.com/greggian/Eclipse-Closure-Compiler.
Update: the Rock Star Apps site no longer works. Were I to try to do this today, I would definitely just download the closure compiler jar, write an ant script to run it (something like the code below), and then create a project builder for it.
你可以为此使用 ant 任务
http://code.google.com/p/closure-compiler/wiki/BuildingWithAnt
you could use ant tasks for this
http://code.google.com/p/closure-compiler/wiki/BuildingWithAnt
尝试这些 Eclipse 插件:
用于闭包模板的 Eclipse 插件
用于带有闭包编译器和闭包库的 JavaScript 的 Eclipse 插件
http://www.normalesup.org/~simonet/soft/index.en.html
一切正常!
try these eclipse plugins:
Eclipse Plugin for Closure Templates
Eclipse Plugin for JavaScript with Closure Compiler and Closure Library
http://www.normalesup.org/~simonet/soft/index.en.html
everything works!
此播客提供了一些有关闭包编译器如何适合 IDE 的信息。但它是在关闭发布之前发布的。
This podcast has some info on how the closure compiler might fit into the IDE. But it was published before closure was released.
您可能对 http://plovr.com/ 感兴趣,这是一个 Closure 构建工具。它动态地重新编译 JavaScript 和闭包模板代码。
You might be interested in http://plovr.com/, a Closure build tool. It dynamically recompiles JavaScript and Closure Template code.