defyma/yii2-minifier 问题修复 & 功能扩展

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

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

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

  1. 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

To Use Custom Library please refer to @vendor\defyma\yii2-minifier\Minifier.php.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-28