appmake/yii2-minify-view

Yii2 View component with minification css & js

Installs: 53

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2015-07-09 21:42 UTC

This package is not auto-updated.

Last update: 2024-04-27 15:26:15 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist appmake/yii2-minify-view "*"

or add

"appmake/yii2-minify-view": "*"

Configure

<?
return [
	// ...
	'components' => [
		// ...
		'view' => [
			'class' => '\rmrevin\yii\minify\View',
			'enableMinify' => !YII_DEBUG,
			'web_path' => '@web', // path alias to web base
			'base_path' => '@webroot', // path alias to web base
			'minify_path' => '@webroot/minify', // path alias to save minify result
			'js_position' => [ \yii\web\View::POS_END ], // positions of js files to be minified
			'force_charset' => 'UTF-8', // charset forcibly assign, otherwise will use all of the files found charset
			'expand_imports' => true, // whether to change @import on content
			'compress_output' => true, // compress result html page
		]
	]
];