secomapp/uglifyjs-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

License

Released under the Apache License v2.0

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 8
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-16