Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Compress html and css/js in page component and helper for Yii PHP framework 2.0

License

Notifications You must be signed in to change notification settings

bartlab-archive/yii2-minify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Compress html and css/js in page component and helper for Yii PHP framework 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages