shakahl/hups-util-htmlcompressor
Composer 安装命令:
composer require shakahl/hups-util-htmlcompressor
包简介
HTML output compressor and minimizer written in PHP.
关键字:
README 文档
README
HTML output compressor and minimizer written in PHP. This package is a part of the Hups Framework.
Features
- Removes whitespaces
- Removes comments
- Replaces absolute URLs with relative ones
- Low memory usage
Installation
https://packagist.org/packages/shakahl/hups-util-htmlcompressor
Add shakahl/hups-util-htmlcompressor as a requirement to composer.json:
{ "require": { "shakahl/hups-util-htmlcompressor": "dev-master" } }
Update your packages with composer update or install with composer install.
You can also add the package using composer require shakahl/hups-util-htmlcompressor and later specifying the version you want (for now, dev-master is your best bet).
Usage example
<?php
$c = new \Hups\Util\HTMLCompressor($html);
$c->compress();
echo $c->get();
?>
Unit testing
Under Windows
$ composer update
$ vendor/bin/phpunit.bat
Under Linux
$ composer update
$ vendor/bin/phpunit
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-15