2017 © Pedro Peláez
 

library php-uglifyjs

A basic wrapper around uglifyjs for PHP

image

chewett/php-uglifyjs

A basic wrapper around uglifyjs for PHP

  • Tuesday, April 3, 2018
  • by chewett
  • Repository
  • 1 Watchers
  • 2 Stars
  • 13 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 18 % Grown

The README.md

php-uglifyjs

This library is a wrapper around the nodejs uglifyjs script for PHP., (*1)

Usage

$ug = new JSUglify();
$output = $ug->uglify(["somefile.js", "secondfile.js"], "output.js");

Given an array of input files and an output file location it will minimise the javascript. Options can be passed in as a third parameter, (*2)

$ug = new JSUglify();
$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 --compress, (*3)

Installation

This can be included in your composer project by running, (*4)

composer require chewett/php-uglifyjs, (*5)

Then running composer update will update your composer lock file to include and download this new dependency., (*6)

Tests

Tests can be run with the phpunit test runner using the provided phpunit.xml file., (*7)

License

This is licensed under the MIT license. For more information see the LICENSE file., (*8)

The Versions