2017 © Pedro Peláez
 

library php-uglifyjs

PHP Javascript packer

image

gkralik/php-uglifyjs

PHP Javascript packer

  • Friday, January 5, 2018
  • by gkralik
  • Repository
  • 4 Watchers
  • 20 Stars
  • 42,882 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 6 Versions
  • 9 % Grown

The README.md

php-uglifyjs

Installation

composer require "gkralik/php-uglifyjs:^1.0"

Usage

$myPacker = new GK\JavascriptPacker($script, 62, true, false);
$packed = $myPacker->pack();

or, (*1)

$myPacker = new GK\JavascriptPacker($script, 'Normal', true, false);
$packed = $myPacker->pack();

or (default values), (*2)

$myPacker = new GK\JavascriptPacker($script);
$packed = $myPacker->pack();

Constructor parameters:

Name Description
$script the JavaScript to pack, string.
$encoding level of encoding, int or string: 0,10,62,95 or 'None', 'Numeric', 'Normal', 'High ASCII'. Default: 62.
$fastDecode include the fast decoder in the packed result, boolean. Default : true.
$specialChars if you are flagged your private and local variables in the script, boolean. Default: false.

The pack() method return the compressed JavasScript, as a string., (*3)

See http://dean.edwards.name/packer/usage/ for more information., (*4)

Acknowledgments

Based on JavaScriptPacker by Nicolas Martin (http://joliclic.free.fr/php/javascript-packer/en/)., (*5)

The Versions

05/01 2018

dev-master

9999999-dev

PHP Javascript packer

  Sources   Download

LGPL 2.1

10/10 2015

1.0.0

1.0.0.0

PHP Javascript packer

  Sources   Download

LGPL 2.1

10/10 2015

dev-develop

dev-develop

PHP Javascript packer

  Sources   Download

LGPL 2.1

28/08 2014

0.5.2

0.5.2.0

PHP Javascript packer

  Sources   Download

LGPL 2.1

28/08 2014

0.5.1

0.5.1.0

PHP Javascript packer

  Sources   Download

LGPL 2.1

28/08 2014

0.5.0

0.5.0.0

PHP Javascript packer

  Sources   Download

LGPL 2.1