html minify

parent 6de813d8
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
"dompdf/dompdf": "dev-master", "dompdf/dompdf": "dev-master",
"tecnick.com/tcpdf": "dev-master", "tecnick.com/tcpdf": "dev-master",
"mikehaertl/phpwkhtmltopdf": "^2.0@dev", "mikehaertl/phpwkhtmltopdf": "^2.0@dev",
"himiklab/yii2-sitemap-module" : "*" "himiklab/yii2-sitemap-module" : "*",
"mirocow/yii2-minify-view" : "*"
}, },
"require-dev": { "require-dev": {
"yiisoft/yii2-codeception": "*", "yiisoft/yii2-codeception": "*",
......
...@@ -62,6 +62,18 @@ return [ ...@@ -62,6 +62,18 @@ return [
'cache' => [ 'cache' => [
'class' => 'yii\caching\FileCache', 'class' => 'yii\caching\FileCache',
], ],
'view' => [
'class' => '\mirocow\minify\View',
'base_path' => '@app/web', // path alias to web base
'minify_path' => '@app/web/minify', // path alias to save minify result
'minify_css' => true,
'minify_js' => true,
'minify_html' => true,
'js_len_to_minify' => 1000, // Больше этого размера inlinejs будет сжиматься и упаковываться в файл
'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
//'css_linebreak_pos' => false,
],
'user' => [ 'user' => [
'identityClass' => 'common\modules\scoring\models\ScClient', 'identityClass' => 'common\modules\scoring\models\ScClient',
'loginUrl' => ['/site/login'], 'loginUrl' => ['/site/login'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment