Uncategorized

UglifyJS — a JavaScript parser/compressor/beautifier

Introducing UglifyJS… a package that implements a general-purpose JavaScript parser/compressor/beautifier toolkit. It is developed on NodeJS, but it should work on any JavaScript platform supporting the CommonJS module system (and if the platform of choice doesn’t support CommonJS, its easy to implement it, or discard the exports.*lines from UglifyJS sources).

The tokenizer/parser generates an abstract syntax tree from JS code. its then possible to traverse the AST to learn more about the code, or do various manipulations on it. This part is implemented in parse-js.js and it’s a port to JavaScript of the excellent parse-js Common Lisp library from Marijn Haverbeke.

Check it out…
https://github.com/mishoo/UglifyJS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s