1 # JShrink [![Build Status](https://travis-ci.org/tedious/JShrink.svg?branch=master)](https://travis-ci.org/tedivm/JShrink)
3 [![License](http://img.shields.io/packagist/l/tedivm/JShrink.svg)](https://github.com/tedivm/JShrink/blob/master/LICENSE)
4 [![Latest Stable Version](http://img.shields.io/github/release/tedious/JShrink.svg)](https://packagist.org/packages/tedivm/JShrink)
5 [![Coverage Status](https://coveralls.io/repos/tedious/JShrink/badge.png?branch=master)](https://coveralls.io/r/tedivm/JShrink?branch=master)
6 [![Total Downloads](http://img.shields.io/packagist/dt/tedivm/jshrink.svg)](https://packagist.org/packages/tedivm/JShrink)
9 JShrink is a php class that minifies javascript so that it can be delivered to the client quicker. This code can be used
10 by any product looking to minify their javascript on the fly (although caching the results is suggested for performance
11 reasons). Unlike many other products this is not a port into php but a native application, resulting in better
17 Minifying your code is simple call to a static function-
21 include('vendor/autoload.php');
23 // Basic (default) usage.
24 $minifiedCode = \JShrink\Minifier::minify($js);
26 // Disable YUI style comment preservation.
27 $minifiedCode = \JShrink\Minifier::minify($js, array('flaggedComments' => false));
36 * JShrink and Gzip - 93,507
43 Installing JShrink can be done through a variety of methods, although Composer is
48 "tedivm/jshrink": "~1.0"
54 Releases of JShrink are available on [Github](https://github.com/tedious/JShrink/releases).
59 JShrink is licensed under the BSD License. See the LICENSE file for details.
61 In the spirit of open source, use of this library for evil is discouraged but not prohibited.