README.md

Uglifier

Installation

Uglifier is available as a ruby gem.

$ gem install uglifier

Ensure that your environment has a JavaScript interpreter supported by
ExecJS. Using therubyracer gem
is a safe choice if a runtime isn't already present. Note that while JScript built-in Windows 7 and older works, it is extremely slow.

When passing a regular expression to the output => comments option, be sure to pass a valid Ruby Regexp.
The beginning and ending of comments are removed and cannot be matched (/*, */, //). For example:
When matching

/*!
* comment
*/

use Uglifier.new(output: {comments: /^!/}).

Development

Tests are run using

bundle exec rake

See CONTRIBUTING for details about working on and contributing to Uglifier.