A basic wrapper around uglifyjs2 for PHP
This library is a wrapper around the nodejs uglifyjs2 script for PHP.
$ug = new JSUglify2(); $output = $ug->uglify(["somefile.js", "secondfile.js"], "output.js");
$ug = new JSUglify2(); $output = $ug->uglify(["somefile.js", "secondfile.js"], "output.js", ['compress' => '']);
Here the compress option is given and passed into the uglifyjs command line string as a flag
This can be included in your composer project by running
composer require chewett/php-uglifyjs2
composer update will update your composer lock file to include and download this new dependency.
Tests can be run with the phpunit test runner using the provided phpunit.xml file.
This is licensed under the MIT license. For more information see the LICENSE file.