maybeworks / yii2-minify
Minify helper and component for Yii PHP framework 2.0
Installs: 4 043
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 0
Open Issues: 1
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2023-01-30 10:22:46 UTC
README
Compress html and css/js in page component and helper for Yii PHP framework 2.0
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "maybeworks/yii2-minify" "*"
or add
"maybeworks/yii2-minify" : "*"
to the require section of your application's composer.json
file.
Usage
For usage as component - add to app config
'components'=>[ 'minifyManager' => [ 'class' => 'maybeworks\minify\MinifyManager', 'html' => !YII_DEBUG, 'css' => !YII_DEBUG, 'js' => !YII_DEBUG, ] ] 'bootstrap' => [ 'minifyManager' ],
or use manual
$html = MinifyHelper::html($html); $css = MinifyHelper::css($css); $js = MinifyHelper::js($js);
Nothing is impossible, limit exists only in the minds of...
maybe.works