gkralik / php-uglifyjs
PHP Javascript packer
Installs: 232 076
Dependents: 9
Suggesters: 0
Security: 0
Stars: 35
Watchers: 4
Forks: 15
Open Issues: 2
This package is auto-updated.
Last update: 2024-10-29 03:48:18 UTC
README
Installation
composer require "gkralik/php-uglifyjs:^1.0"
Usage
$myPacker = new GK\JavascriptPacker($script, 62, true, false); $packed = $myPacker->pack();
or
$myPacker = new GK\JavascriptPacker($script, 'Normal', true, false); $packed = $myPacker->pack();
or (default values)
$myPacker = new GK\JavascriptPacker($script); $packed = $myPacker->pack();
Constructor parameters:
The pack()
method return the compressed JavasScript, as a string.
See http://dean.edwards.name/packer/usage/ for more information.
Acknowledgments
Based on JavaScriptPacker by Nicolas Martin (http://joliclic.free.fr/php/javascript-packer/en/).