audriusdob / yii2-minify-view
Yii2 View component with minification css & js
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 67
Type:yii2-extension
Requires
- mrclay/minify: ~2.2
- yiisoft/yii2: 2.0.*
This package is not auto-updated.
Last update: 2025-02-07 22:02:09 UTC
README
The main feature of this component - concatenate and compress files connected through "AssetBundle".
Code Status
Support
Installation
composer require "rmrevin/yii2-minify-view:~1.9"
Configure
<? return [ // ... 'components' => [ // ... 'view' => [ 'class' => '\rmrevin\yii\minify\View', 'enableMinify' => !YII_DEBUG, 'web_path' => '@web', // path alias to web base 'base_path' => '@webroot', // path alias to web base 'minify_path' => '@webroot/minify', // path alias to save minify result 'js_position' => [ \yii\web\View::POS_END ], // positions of js files to be minified 'force_charset' => 'UTF-8', // charset forcibly assign, otherwise will use all of the files found charset 'expand_imports' => true, // whether to change @import on content 'compress_output' => true, // compress result html page 'compress_options' => ['extra' => true], // options for compress ] ] ];