maybeworks/yii2-minify Minify helper and component for Yii PHP framework 2.0

extensionhelpercomponentminify

yii2-minify

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);

MaybeWorks
Nothing is impossible, limit exists only in the minds of...
maybe.works

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

No stable releases.

Comments



No stable releases.



BSD-3-Clause license
Stats
7 github stars & 0 github forks
7 downloads in the last day
113 downloads in the last 30 days
3863 total downloads