defyma/yii2-minifier
最新稳定版本:1.2.5
Composer 安装命令:
composer require defyma/yii2-minifier
包简介
Yii 2 Minifier
README 文档
README
This minifier using https://github.com/mrclay/minify, and integrated for yii2
Install With Composer
php composer.phar require defyma/yii2-minifier:"v1.*.*"
Or Require it
"defyma/yii2-minifier": "v1.*.*"
How To Use
- Add
<?php \defyma\helper\Minifier::begin(); ?>and<?php \defyma\helper\Minifier::end(); ?>in Layout or View
Example
layout/main.php
<!-- Minifier Begin -->
<?php \defyma\helper\Minifier::begin(); ?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<!--
// Content Head
-->
</head>
<body>
<?php $this->beginBody() ?>
<!--
// Content Body
-->
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
<?php \defyma\helper\Minifier::end(); ?>
<!-- Minifier END -->
Library used
- Original Spaceless Yii2
- HTML & CSS Minifier Using Minify By Stephen Clay steve@mrclay.org
- JavaScript Minify Using JShrink By Elan Ruusamäe glen@pld-linux.org
To Use Custom Library please refer to @vendor\defyma\yii2-minifier\Minifier.php.
统计信息
- 总下载量: 1.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-28