Google Closure minifier online?
Solution 1
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:
- Download at http://closure-compiler.googlecode.com/files/compiler-latest.zip
- Unzip
-
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.
Solution 2
Google offers the Closure Compiler via REST API, which you can invoke from a shell
https://developers.google.com/closure/compiler/docs/gettingstarted_api
curl -v \
-d code_url=http://server/js/file-big.js \
-d compilation_level=ADVANCED_OPTIMIZATIONS \
-d output_info=compiled_code \
-d output_format=text \
http://closure-compiler.appspot.com/compile \
> radix.min.js
Related videos on Youtube
Geuis
Updated on May 04, 2020Comments
-
Geuis about 4 years
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.
-
Roland Bouman over 14 yearsGeuis, please check my answer. Was it helpful to you? If so, please check it as answered. TIA
-
-
Geuis over 14 yearsThis is great. Thanks so much for setting this up.
-
Roland Bouman over 14 yearsGeuis, I didn't set it up. Google did.
-
Muhammad Muazzam over 8 years@Ronald is this works same either download or do it online to minify js? I did online, size reduced but no improvement for page insight
-
Roland Bouman over 8 years? Don't understand the question. You tried it and you are unhappy, try contacting Google.
-
ErnestV almost 8 yearsCurrent link provided by Google is dl.google.com/closure-compiler/compiler-latest.zip
-
milahu almost 4 yearslatest
closure-compiler-*.jar
is on maven > version (sample: v20200830) > files > jar