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?
5 Answers
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>

- 17,068
- 10
- 54
- 63
-
too bad for the hijacked domain :( – Magnetic_dud Mar 21 '12 at 20:09
-
Rock Star Apps can't be found anymore because of the hijacked domain, but you can still manually download and install the zip. I just followed this post instructions and it worked: http://blog.avirtualhome.com/rockstarapps-for-eclipse/ – firepol Nov 16 '12 at 08:48
-
You should update your post properly to remove the bad URL. It now hosts a site trying to trick people into downloading suspicious "FlashPlayer" updates... – uchuugaka Apr 01 '17 at 22:50
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!

- 86
- 1
- 2
you could use ant tasks for this http://code.google.com/p/closure-compiler/wiki/BuildingWithAnt

- 108
- 5
This podcast has some info on how the closure compiler might fit into the IDE. But it was published before closure was released.

- 1
- 1

- 64,065
- 34
- 143
- 252
You might be interested in http://plovr.com/, a Closure build tool. It dynamically recompiles JavaScript and Closure Template code.