Commit 96b3b944df42de3716a1847646876399fd362be4
1 parent
9678c264
html compress
Showing
1 changed file
with
55 additions
and
47 deletions
Show diff stats
frontend/config/main.php
| ... | ... | @@ -438,53 +438,61 @@ use common\models\Settings; |
| 438 | 438 | SlashRedirect::className(), |
| 439 | 439 | ], |
| 440 | 440 | ], |
| 441 | - 'assetsAutoCompress' => [ | |
| 442 | - 'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent', | |
| 443 | - 'enabled' => false, | |
| 444 | - | |
| 445 | - 'readFileTimeout' => 3, | |
| 446 | - //Time in seconds for reading each asset file | |
| 447 | - | |
| 448 | - 'jsCompress' => true, | |
| 449 | - //Enable minification js in html code | |
| 450 | - 'jsCompressFlaggedComments' => true, | |
| 451 | - //Cut comments during processing js | |
| 452 | - | |
| 453 | - 'cssCompress' => true, | |
| 454 | - //Enable minification css in html code | |
| 455 | - | |
| 456 | - 'cssFileCompile' => true, | |
| 457 | - //Turning association css files | |
| 458 | - 'cssFileRemouteCompile' => false, | |
| 459 | - //Trying to get css files to which the specified path as the remote file, skchat him to her. | |
| 460 | - 'cssFileCompress' => true, | |
| 461 | - //Enable compression and processing before being stored in the css file | |
| 462 | - 'cssFileBottom' => false, | |
| 463 | - //Moving down the page css files | |
| 464 | - 'cssFileBottomLoadOnJs' => false, | |
| 465 | - //Transfer css file down the page and uploading them using js | |
| 466 | - | |
| 467 | - 'jsFileCompile' => true, | |
| 468 | - //Turning association js files | |
| 469 | - 'jsFileRemouteCompile' => false, | |
| 470 | - //Trying to get a js files to which the specified path as the remote file, skchat him to her. | |
| 471 | - 'jsFileCompress' => true, | |
| 472 | - //Enable compression and processing js before saving a file | |
| 473 | - 'jsFileCompressFlaggedComments' => true, | |
| 474 | - //Cut comments during processing js | |
| 475 | - | |
| 476 | - 'htmlCompress' => true, | |
| 477 | - //Enable compression html | |
| 478 | - 'noIncludeJsFilesOnPjax' => true, | |
| 479 | - //Do not connect the js files when all pjax requests | |
| 480 | - 'htmlCompressOptions' => //options for compressing output result | |
| 481 | - [ | |
| 482 | - 'extra' => false, | |
| 483 | - //use more compact algorithm | |
| 484 | - 'no-comments' => true | |
| 485 | - //cut all the html comments | |
| 486 | - ], | |
| 487 | - ], | |
| 441 | + 'assetsAutoCompress' => [ | |
| 442 | + 'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent', | |
| 443 | + 'enabled' => true, | |
| 444 | + | |
| 445 | + 'readFileTimeout' => 3, | |
| 446 | + //Time in seconds for reading each asset file | |
| 447 | + | |
| 448 | + 'jsCompress' => true, | |
| 449 | + //Enable minification js in html code | |
| 450 | + 'jsCompressFlaggedComments' => true, | |
| 451 | + //Cut comments during processing js | |
| 452 | + | |
| 453 | + 'cssCompress' => true, | |
| 454 | + //Enable minification css in html code | |
| 455 | + | |
| 456 | + 'cssFileCompile' => true, | |
| 457 | + //Turning association css files | |
| 458 | + 'cssFileRemouteCompile' => false, | |
| 459 | + //Trying to get css files to which the specified path as the remote file, skchat him to her. | |
| 460 | + 'cssFileCompress' => true, | |
| 461 | + //Enable compression and processing before being stored in the css file | |
| 462 | + 'cssFileBottom' => false, | |
| 463 | + //Moving down the page css files | |
| 464 | + 'cssFileBottomLoadOnJs' => false, | |
| 465 | + //Transfer css file down the page and uploading them using js | |
| 466 | + | |
| 467 | + 'jsFileCompile' => true, | |
| 468 | + //Turning association js files | |
| 469 | + 'jsFileRemouteCompile' => false, | |
| 470 | + //Trying to get a js files to which the specified path as the remote file, skchat him to her. | |
| 471 | + 'jsFileCompress' => true, | |
| 472 | + //Enable compression and processing js before saving a file | |
| 473 | + 'jsFileCompressFlaggedComments' => true, | |
| 474 | + //Cut comments during processing js | |
| 475 | + | |
| 476 | + 'htmlCompress' => true, | |
| 477 | + //Enable compression html | |
| 478 | + 'noIncludeJsFilesOnPjax' => true, | |
| 479 | + //Do not connect the js files when all pjax requests | |
| 480 | + 'htmlFormatter' => [ | |
| 481 | + //Enable compression html | |
| 482 | + 'class' => 'skeeks\yii2\assetsAuto\formatters\html\TylerHtmlCompressor', | |
| 483 | + 'extra' => true, //use more compact algorithm | |
| 484 | + 'noComments' => true, //cut all the html comments | |
| 485 | + 'maxNumberRows' => 50000, //The maximum number of rows that the formatter runs on | |
| 486 | + | |
| 487 | + //or | |
| 488 | + | |
| 489 | + // 'class' => 'skeeks\yii2\assetsAuto\formatters\html\MrclayHtmlCompressor', | |
| 490 | + | |
| 491 | + //or any other your handler implements skeeks\yii2\assetsAuto\IFormatter interface | |
| 492 | + | |
| 493 | + //or false | |
| 494 | + ], | |
| 495 | + ], | |
| 488 | 496 | ], |
| 489 | 497 | |
| 490 | 498 | 'params' => $params, | ... | ... |