diff options
author | Andrew Dolgov <[email protected]> | 2017-01-21 23:06:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-01-21 23:06:35 +0300 |
commit | 0047f2578f126cb6de2eed928e86ed7340c3854d (patch) | |
tree | f0232c896bfd89b4ff5d9f57402cb14c9693660d /lib/jshrink/README.md | |
parent | 6be7fe00aeb5f7dbed1f6ed6fd84f316032cfa0a (diff) | |
parent | 566e8574fb4fe2325069625557eb34e8f619c2e4 (diff) |
Merge branch 'lib-upgrades' into 'master'
Third-party library upgrades
* lib: Upgrade php-gettext from 1.0.11 to 1.0.12
* lib: Upgrade accept-to-gettext.php from 2003-08-14 to 2007-04-01
* lib: Upgrade JShrink from 0.5.1 to 1.1.0
* lib: Upgrade mobile-detect from svn r44 (2012-05-03) to 2.8.24 (2016-11-11)
* lib: Upgrade php-publisher from ??? to a5d6a0e (2016-11-15)
* lib: Upgrade php-subscriber from ??? to 1213f89 (2016-11-15)
* lib: Upgrade script.aculo.us from 1.8.3 to 1.9.0
* lib: Upgrade timezones.txt from 2010k/l/m/n/2011a to 2016j
See merge request !40
Diffstat (limited to 'lib/jshrink/README.md')
-rw-r--r-- | lib/jshrink/README.md | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/lib/jshrink/README.md b/lib/jshrink/README.md index 4c024b5ea..940af38c1 100644 --- a/lib/jshrink/README.md +++ b/lib/jshrink/README.md @@ -1,21 +1,61 @@ -JShrink is a php class that minifies javascript so that it can be delivered to the client quicker. This code can be used by any product looking to minify their javascript on the fly (although caching the results is suggested for performance reasons). Unlike many other products this is not a port into php but a native application, resulting in better performance. +# JShrink [![Build Status](https://travis-ci.org/tedious/JShrink.svg?branch=master)](https://travis-ci.org/tedivm/JShrink) -### Usage +[![License](http://img.shields.io/packagist/l/tedivm/JShrink.svg)](https://github.com/tedivm/JShrink/blob/master/LICENSE) +[![Latest Stable Version](http://img.shields.io/github/release/tedious/JShrink.svg)](https://packagist.org/packages/tedivm/JShrink) +[![Coverage Status](https://coveralls.io/repos/tedious/JShrink/badge.png?branch=master)](https://coveralls.io/r/tedivm/JShrink?branch=master) +[![Total Downloads](http://img.shields.io/packagist/dt/tedivm/jshrink.svg)](https://packagist.org/packages/tedivm/JShrink) + + +JShrink is a php class that minifies javascript so that it can be delivered to the client quicker. This code can be used +by any product looking to minify their javascript on the fly (although caching the results is suggested for performance +reasons). Unlike many other products this is not a port into php but a native application, resulting in better +performance. + + +## Usage Minifying your code is simple call to a static function- -```` +```php <?php +include('vendor/autoload.php'); + // Basic (default) usage. -$minifiedCode = JShrink\Minifier::minify($js); +$minifiedCode = \JShrink\Minifier::minify($js); // Disable YUI style comment preservation. -$minifiedCode = JShrink\Minifier::minify($js, array('flaggedComments' => false)); -```` +$minifiedCode = \JShrink\Minifier::minify($js, array('flaggedComments' => false)); +``` -### Results + +## Results * Raw - 586,990 * Gzip - 151,301 * JShrink - 371,982 * JShrink and Gzip - 93,507 + + +## Installing + +### Composer + +Installing JShrink can be done through a variety of methods, although Composer is +recommended. + +```yaml +"require": { + "tedivm/jshrink": "~1.0" +} +``` + +### Github + +Releases of JShrink are available on [Github](https://github.com/tedious/JShrink/releases). + + +## License + +JShrink is licensed under the BSD License. See the LICENSE file for details. + +In the spirit of open source, use of this library for evil is discouraged but not prohibited. |