vihuvac/htmlcompressor-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require vihuvac/htmlcompressor-bundle
包简介
Symfony2 bundle which allow to minify cacheable HTML and XML responses using htmlcompressor
README 文档
README
⚠️ DEPRECATED:
Unfortunately I want to inform this bundle is getting deprecated. Sorry for the inconvenience. 😔
Allow to minify cacheable HTML and XML responses using htmlcompressor.
Installation
Get the bundle
Add this line in your composer.json require section:
"vihuvac/htmlcompressor-bundle": "dev-master"
and run this command in your project directory:
$ php composer.phar update vihuvac/htmlcompressor-bundle
Enable the bundle
Edit your application's kernel:
// app/AppKernel.php <?php public function registerBundles() { $bundles = array( // ... new Vihuvac\Bundle\HtmlCompressorBundle\VihuvacHtmlCompressorBundle(), ); }
Now, it's time to configure it!
Configuration
# app/config/config.yml
html_compressor:
enabled: true
java: /usr/bin/java
jar: ~
options: {}
| Description | Default value | Exemple | |
|---|---|---|---|
| enabled | determine if responses must be minified if they can | true | - |
| java | path to Java executable | /usr/bin/java | - |
| jar | path to htmlcompressor executable | - | %kernel.root_dir%/Resources/java/htmlcompressor-1.5.3.jar |
| options | any option described in the htmlcompressor documentation | - | { "--compress-js" : ~, "--compress-css" : ~, "--js-compressor" : closure, "--closure-opt-level" : simple } |
统计信息
- 总下载量: 6.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-01