as-milano/yii2-minify 问题修复 & 功能扩展

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

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

as-milano/yii2-minify

Composer 安装命令:

composer require as-milano/yii2-minify

包简介

Yii2 View component with minification css & js

README 文档

README

The main feature of this component - concatenate and compress files connected through "AssetBundle".

Fork of another extension with some additional features:

  • Ability to just concatenate files (without compression);
  • Ability to choose between fast and safe methods of checking that original file was changed.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist as-milano/yii2-minify "*"

or add

"as-milano/yii2-minify": "*"

to the require section of your composer.json file.

Configure

In the application configuration add configuration for the View component:

'components' => [
    // ...
    'view' => [
        'class' => 'milano\minify\View',
        'enableMinify' => !YII_DEBUG,
        'minifyCss' => true,
        'compressCss' => true,
        'minifyJs' => true,
        'compressJs' => true,
        'minifyPath' => '@webroot/assets/minify',
        'jsPosition' => [\yii\web\View::POS_END],
        'expandImports' => true,
        'compressOutput' => true,
        'hashMethod' => 'sha'
    ]
    // ...
]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-02