maybeworks/yii2-minify
Composer 安装命令:
composer require maybeworks/yii2-minify
包简介
Minify helper and component for Yii PHP framework 2.0
README 文档
README
Compress html and css/js in page component and helper for Yii PHP framework 2.0
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "maybeworks/yii2-minify" "*"
or add
"maybeworks/yii2-minify" : "*"
to the require section of your application's composer.json file.
Usage
For usage as component - add to app config
'components'=>[ 'minifyManager' => [ 'class' => 'maybeworks\minify\MinifyManager', 'html' => !YII_DEBUG, 'css' => !YII_DEBUG, 'js' => !YII_DEBUG, ] ] 'bootstrap' => [ 'minifyManager' ],
or use manual
$html = MinifyHelper::html($html); $css = MinifyHelper::css($css); $js = MinifyHelper::js($js);
Nothing is impossible, limit exists only in the minds of...
maybe.works
统计信息
- 总下载量: 4.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-02-27