Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Closure minifier online?

Has anyone setup an online copy/paste utility for Google's Closure minifier?

I'm working on a project and I want to minify part of the code manually without having to setup the entire project on my own.

like image 729
Geuis Avatar asked Jan 08 '10 20:01

Geuis


People also ask

What is closure Google what is closure in JavaScript?

What is the Closure Compiler? 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.

How does Closure compiler work?

The Closure Compiler provides special checks and optimizations for code that uses the Closure Library. In addition, the Closure Compiler service can automatically include Closure Library files. Finding Your Way around Closure describes the syntax for declaring the parts of Closure that you need.

Does Google have a compiler?

The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript.


1 Answers

How about google's own service: http://closure-compiler.appspot.com/home

I should point out that "setting up the entire project on my own" really is not half as scary as you make it out to be :p.

I mean, it's a matter of downloading a java.jar and running it. Instructions:

  1. Download at http://closure-compiler.googlecode.com/files/compiler-latest.zip
  2. Unzip
  3. run java command line:

    java -jar compiler.jar --js script-src.js --js_output_file script-compiled.js

where <compiler.jar> is the full location to the compiler.jar file in the downloaded archive, script-src.js is the full filename of the source file, and script-compiled.js is the full filename of the result.

like image 102
Roland Bouman Avatar answered Sep 22 '22 13:09

Roland Bouman