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?
Previously built using the Microsoft C++ compiler, Google is now using the same compiler for Windows, macOS, Linux, and Android, and the switch makes Chrome arguably the first major software project to use Clang on Windows.
The Closure Compiler is a tool for making JavaScript download and run faster. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left.
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>
you could use ant tasks for this http://code.google.com/p/closure-compiler/wiki/BuildingWithAnt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With