cl-uglify-js
A JavaScript compressor (minifier). Given an AST generated by parse-js, it is able to:

- rename variables to short versions (usually single characters)

- generate shorter code for IF statements (various optimizations are implemented)

- discard unnecessary blocks and parentheses

- join consecutive var declarations

- discard some obviously unreachable code

- join consecutive statements with the comma operator (which sometimes reduces a block to a single statement and therefore the block brackets can be discarded).

- remove comments and all unnecessary whitespace.

The generated code is usually half the size of the original (depending on indentation level).

The code generator can also produce nicely indented output (good for debugging, as well as inspecting minified scripts).

Get it at GitHub: http://github.com/mishoo/cl-uglify-js. This is a port to Common Lisp of http://github.com/mishoo/UglifyJS.


JavaScript