将Google关闭编译器与Eclipse IDE集成在一起? [英] Integrate Google closure compiler with Eclipse IDE?
问题描述
有人解决了这个问题吗?
Rock Star应用程序提供了一个有名的插件这个。我刚刚写了一篇博客文章:[删除不再存在]
经过一些搜索,我也发现了这一点, t测试: https://github.com/greggian/Eclipse-Closure-Compiler。
更新:Rock Star Apps网站不再有效。我今天尝试这样做,我一定会下载关闭编译器jar ,写一个蚂蚁脚本来运行它(类似下面的代码),然后为它创建一个项目构建器。
target name =rebuild>
< taskdef name =jscompclassname =com.google.javascript.jscomp.ant.CompileTask
classpath =/ opt / closure-compiler / compiler.jar/ >
< jscomp compilationLevel =simplewarning =quiet
debug =falseoutput =js / all.closure.js>
< sources dir =js>
< file name =script1.js/>
< file name =script2.js/>
< file name =script3.js/>
< file name =script4.js/>
< file name =script5.js/>
< file name =script6.js/>
< / sources>
< / jscomp>
< / target>
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?
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.
<target name="rebuild">
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
classpath="/opt/closure-compiler/compiler.jar"/>
<jscomp compilationLevel="simple" warning="quiet"
debug="false" output="js/all.closure.js">
<sources dir="js">
<file name="script1.js"/>
<file name="script2.js"/>
<file name="script3.js"/>
<file name="script4.js"/>
<file name="script5.js"/>
<file name="script6.js"/>
</sources>
</jscomp>
</target>
这篇关于将Google关闭编译器与Eclipse IDE集成在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!