Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Compile JavaScript from the command line with the Google Closure Compiler
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Compiles one or more JavaScript files/fragments with the Google Closure Compiler.

The default compilation level is WHITESPACE_ONLY. Another level can be specified with the --level option. SIMPLE_OPTIMIZATIONS can be abbreviated as simple, ADVANCED_OPTIMIZATIONS as advanced, and WHITESPACE_ONLY as whitespace.

The JavaScript to compress can be supplied on STDIN, or contained in files named on the command line. The compressed JavaScript is printed to STDOUT.

For example, js-compile some.js performs whitespace-only compression on the file named some.js. js-compile --level=advanced <some.js >compressed.js performs advanced compression on the files it receives via STDIN, then writes then concatenated result to compressed.js.

Something went wrong with that request. Please try again.