slinstj / yii2-assets-optimizer
Unifies and compresses js and css files in your AssetBundles. Uses internal server cache to speed up all the process, reducing the time wasting.
Installs: 298
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 1
Open Issues: 3
Type:yii2-extension
Requires
- matthiasmullie/minify: ^1.3
- yiisoft/yii2: 2.0.*
Requires (Dev)
- phpunit/phpunit: 4.7.*
This package is auto-updated.
Last update: 2024-12-22 08:04:40 UTC
README
Fast and reliable unifier and compressor for CSS and JS files inside your Yii2 AssetBundles. Uses internal server cache to speed up all the process, reducing the time wasting.
Report your issues
Installation
composer require "slinstj/yii2-assets-optimizer:>=0.1-stable"
Configuration/Usage
<? return [ // ... 'components' => [ // ... 'view' => [ 'class' => '\slinstj\assets\optimizer\View', ] ] ];
Additional Options
<? return [ // ... 'components' => [ // ... 'view' => [ 'class' => '\slinstj\assets\optimizer\View', 'minify' => true, // Could be '!YII_DEBUG' for example. 'publishPath' => '@webroot/yao', // Folder where optimized file(s) will be published in. 'publishUrl' => '@web/yao', // Web acessible url. Must be in accord to 'publishPath'. ] ] ];
Next versions
- To improve cache by using ChainedDependency - On change JS and CSS files, the optimized file(s) will be regenerated automatically. For now, you should clear the cache manually. Please, check this to know how: cache-flushing.
- To use events instead of the own View object;