PHPackages                             nodejs-php-fallback/uglify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nodejs-php-fallback/uglify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nodejs-php-fallback/uglify
==========================

PHP wrapper to execute uglify-js/clean-css node package or fallback to PHP alternatives

1.0.4(7y ago)17143.4k↓32.8%13MITPHPCI failing

Since Jul 27Pushed 3y ago2 watchersCompare

[ Source](https://github.com/kylekatarnls/uglify)[ Packagist](https://packagist.org/packages/nodejs-php-fallback/uglify)[ RSS](/packages/nodejs-php-fallback-uglify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (3)

uglify
======

[](#uglify)

[![Latest Stable Version](https://camo.githubusercontent.com/25f2ed21ff30fa07561d9d42e020cc2b52e4e45fcaef51edd74b976dccdf9d5e/68747470733a2f2f706f7365722e707567782e6f72672f6e6f64656a732d7068702d66616c6c6261636b2f75676c6966792f762f737461626c652e706e67)](https://packagist.org/packages/nodejs-php-fallback/uglify)[![Build Status](https://camo.githubusercontent.com/57e54fcbd4ebc6a4c96423a1326d31754e4b711979de884c41f4efaa56caf13a/68747470733a2f2f7472617669732d63692e6f72672f6b796c656b617461726e6c732f75676c6966792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kylekatarnls/uglify)[![StyleCI](https://camo.githubusercontent.com/cecd2287b4cc043382131932c93ce442278775f593db4f24320687989c378294/68747470733a2f2f7374796c6563692e696f2f7265706f732f36343234323033332f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/64242033)[![Test Coverage](https://camo.githubusercontent.com/0793e7710d1c3881b5c6feceedec691a25e4ea38bdd0da6cf9a8a1194a4aa13b/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6b796c656b617461726e6c732f75676c6966792f6261646765732f636f7665726167652e737667)](https://codecov.io/github/kylekatarnls/uglify?branch=master)[![Code Climate](https://camo.githubusercontent.com/b11752d4189a87f9afc4e665d3fab20725ce250b74aa62743b88cb0fd91d4e6b/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6b796c656b617461726e6c732f75676c6966792f6261646765732f6770612e737667)](https://codeclimate.com/github/kylekatarnls/uglify)

Simple PHP class to minify both your javascript and css the best existing way (uglify-js for JS, clean-css for CSS) and if node is not available, PHP fallbacks are used instead.

Usage
-----

[](#usage)

First you need [composer](https://getcomposer.org/) if you have not already. Then get the package with `composer require nodejs-php-fallback/uglify` then require the composer autload in your PHP file if it's not already:

```
