Compress html and css/js in page component and helper for Yii PHP framework 2.0
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.
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
No stable releases.
Comments