iisns / yii2-assets-compress
This solution enables you to dynamically combine js and css files to optimize the html page.
Package info
github.com/iisns/yii2-assets-compress
Type:yii2-extension
pkg:composer/iisns/yii2-assets-compress
v1.0.0
2016-02-12 14:59 UTC
Requires
This package is not auto-updated.
Last update: 2026-03-18 10:03:26 UTC
README
This solution enables you to dynamically combine js and css files to optimize the html page.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist iisns/yii2-assets-compress "*"
or add
"iisns/yii2-assets-compress": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
//App config [ 'bootstrap' => ['assetsCompress'], 'components' => [ //.... 'assetsAutoCompress' => [ 'class' => '\iisns\assets\AssetsCompressComponent', 'enabled' => true, 'jsCompress' => true, 'cssFileCompile' => true, 'jsFileCompile' => true, ], //.... ] ]