The main feature of this component - concatenate and compress files connected through "AssetBundle".
Fork of another extension with some additional features:
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.
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'
]
// ...
]
No stable releases.
Comments