secomapp/uglifyjs-php
Composer 安装命令:
composer require secomapp/uglifyjs-php
包简介
Using UglifyJS as a service for JavaScript minification in PHP
关键字:
README 文档
README
Using UglifyJS as a service for JavaScript minification in PHP
Note that this class is abstructing the requests to a remote service run by an UglifyJS-service
Usage
$compiler = new UglifyJS();
$compiler->add("js/my-app.js")
->add("js/popup.js")
->cacheDir("/tmp/js-cache/")
->write();
API
These are the main methods to execute:
cacheDir( $path )
Setting the temp dir for the cached files.
compiler( $url )
Setting the compiler location as a full url (including port) . Defaults to http://marijnhaverbeke.nl:80/uglifyjs
add( $script )
Add a script in the queue to be compressed.
write( $output );
Parsing queue and compressing files. Optionally outputting the result if $output=true (default: false)
Credits
Created by Makis Tracend ( @tracend )
Distributed through Makesites.org
Trivia
- Originally created to be part of KISSCMS
- Based on PHP Closure by Daniel Pupius
License
Released under the Apache License v2.0
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-16