2017 © Pedro Peláez
 

library jshrink

Javascript Minifier built in PHP

image

tedivm/jshrink

Javascript Minifier built in PHP

  • Monday, July 2, 2018
  • by tedivm
  • Repository
  • 44 Watchers
  • 535 Stars
  • 3,974,090 Installations
  • PHP
  • 110 Dependents
  • 10 Suggesters
  • 110 Forks
  • 14 Open issues
  • 11 Versions
  • 10 % Grown

The README.md

JShrink Build Status

License Latest Stable Version Coverage Status Total Downloads, (*1)

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., (*2)

Usage

Minifying your code is simple call to a static function-, (*3)

<?php
include('vendor/autoload.php');

// Basic (default) usage.
$minifiedCode = \JShrink\Minifier::minify($js);

// Disable YUI style comment preservation.
$minifiedCode = \JShrink\Minifier::minify($js, array('flaggedComments' => false));

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., (*4)

"require": {
  "tedivm/jshrink": "~1.0"
}

Github

Releases of JShrink are available on Github., (*5)

License

JShrink is licensed under the BSD License. See the LICENSE file for details., (*6)

In the spirit of open source, use of this library for evil is discouraged but not prohibited., (*7)

Reporting Security and Vulnerability Issues

This project utilizes the Tidelift Security Reporting System for security and vulnerability reporting., (*8)

Support

Issues can be opened directly in Github for issues that aren't related to security., (*9)

Professionally supported JShrink is now available with Tidelift., (*10)

The Versions

02/07 2018

dev-master

9999999-dev http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Robert Hafner

javascript minifier

08/12 2017

v1.3.0

1.3.0.0 http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Robert Hafner

javascript minifier

08/12 2017

dev-version_upgrades

dev-version_upgrades http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Robert Hafner

javascript minifier

08/12 2017

dev-template_literals

dev-template_literals http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Robert Hafner

javascript minifier

30/05 2017

v1.2.0

1.2.0.0 http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Robert Hafner

javascript minifier

30/05 2017

dev-hhvm_testing

dev-hhvm_testing http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.3|^7.0

 

The Development Requires

by Robert Hafner

javascript minifier

04/07 2015

v1.1.0

1.1.0.0 http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Robert Hafner

javascript minifier

11/11 2014

v1.0.1

1.0.1.0 http://github.com/tedious/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Robert Hafner

javascript minifier

05/05 2014

v1.0.0

1.0.0.0 http://github.com/tedivm/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Robert Hafner

javascript minifier

14/01 2014

v0.5.2

0.5.2.0 http://github.com/tedivm/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Robert Hafner

javascript minifier

26/11 2012

v0.5.1

0.5.1.0 http://github.com/tedivm/JShrink

Javascript Minifier built in PHP

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

by Robert Hafner

javascript minifier