maybeworks/yii2-minify

This package is abandoned and no longer maintained. No replacement package was suggested.

Minify helper and component for Yii PHP framework 2.0

Installs: 3 336

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 2

Forks: 0

Open Issues: 1

Type:yii2-extension

dev-master 2016-02-27 15:10 UTC

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

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