gkralik/php-uglifyjs
最新稳定版本:1.0.2
Composer 安装命令:
composer require gkralik/php-uglifyjs
包简介
PHP Javascript packer
README 文档
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:
| 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.
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/).
统计信息
- 总下载量: 282.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 35
- 点击次数: 1
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: LGPL-2.1-or-later
- 更新时间: 2014-08-28