Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skeeks-semenov/yii2-assets-auto-compress
Automatic compilation of js + css + html
https://github.com/skeeks-semenov/yii2-assets-auto-compress
asset assets css-files css-minification css-minifier css-minify html-compiler html-compressing js-css-html js-miner js-minification js-minifier js-minify skeeks-cms yii yii2 yii2-asset yii2-extension
Last synced: about 1 month ago
JSON representation
Automatic compilation of js + css + html
- Host: GitHub
- URL: https://github.com/skeeks-semenov/yii2-assets-auto-compress
- Owner: skeeks-semenov
- License: bsd-3-clause
- Created: 2015-08-05T08:31:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T12:28:04.000Z (8 months ago)
- Last Synced: 2024-09-30T22:17:28.171Z (about 1 month ago)
- Topics: asset, assets, css-files, css-minification, css-minifier, css-minify, html-compiler, html-compressing, js-css-html, js-miner, js-minification, js-minifier, js-minify, skeeks-cms, yii, yii2, yii2-asset, yii2-extension
- Language: PHP
- Homepage: https://skeeks.com/
- Size: 428 KB
- Stars: 157
- Watchers: 15
- Forks: 43
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Automatically compile and merge files js + css + html in yii2 project.
===================================This solution enables you to dynamically combine js and css files to optimize the html page.
This allows you to improve the performance of google page speed.This tool only works on real sites. On the local projects is not working!
[![Latest Stable Version](https://img.shields.io/packagist/v/skeeks/yii2-assets-auto-compress.svg)](https://packagist.org/packages/skeeks/yii2-assets-auto-compress)
[![Total Downloads](https://img.shields.io/packagist/dt/skeeks/yii2-assets-auto-compress.svg)](https://packagist.org/packages/skeeks/yii2-assets-auto-compress)Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist skeeks/yii2-assets-auto-compress "*"
```or add
```
"skeeks/yii2-assets-auto-compress": "*"
```How to use
----------```php
//App config
[
'bootstrap' => ['assetsAutoCompress'],
'components' =>
[
//....
'assetsAutoCompress' =>
[
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
],
//....
]
]```
```php
//App config with all options
[
'bootstrap' => ['assetsAutoCompress'],
'components' => [
//....
'assetsAutoCompress' => [
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
'enabled' => true,'readFileTimeout' => 3, //Time in seconds for reading each asset file
'jsCompress' => true, //Enable minification js in html code
'jsCompressFlaggedComments' => true, //Cut comments during processing js'cssCompress' => true, //Enable minification css in html code
'cssFileCompile' => true, //Turning association css files
'cssFileCompileByGroups' => false //Enables the compilation of files in groups rather than in a single file. Works only when the $cssFileCompile option is enabled
'cssFileRemouteCompile' => false, //Trying to get css files to which the specified path as the remote file, skchat him to her.
'cssFileCompress' => true, //Enable compression and processing before being stored in the css file
'cssFileBottom' => false, //Moving down the page css files
'cssFileBottomLoadOnJs' => false, //Transfer css file down the page and uploading them using js'jsFileCompile' => true, //Turning association js files
'jsFileCompileByGroups' => false //Enables the compilation of files in groups rather than in a single file. Works only when the $jsFileCompile option is enabled
'jsFileRemouteCompile' => false, //Trying to get a js files to which the specified path as the remote file, skchat him to her.
'jsFileCompress' => true, //Enable compression and processing js before saving a file
'jsFileCompressFlaggedComments' => true, //Cut comments during processing js'noIncludeJsFilesOnPjax' => true, //Do not connect the js files when all pjax requests when all pjax requests when enabled jsFileCompile
'noIncludeCssFilesOnPjax' => true, //Do not connect the css files when all pjax requests when all pjax requests when enabled cssFileCompile'htmlFormatter' => [
//Enable compression html
'class' => 'skeeks\yii2\assetsAuto\formatters\html\TylerHtmlCompressor',
'extra' => false, //use more compact algorithm
'noComments' => true, //cut all the html comments
'maxNumberRows' => 50000, //The maximum number of rows that the formatter runs on//or
'class' => 'skeeks\yii2\assetsAuto\formatters\html\MrclayHtmlCompressor',
//or any other your handler implements skeeks\yii2\assetsAuto\IFormatter interface
//or false
],
],
//....
],
];```
Links
----------
* [Github](https://github.com/skeeks-semenov/yii2-assets-auto-compress)
* [Changelog](https://github.com/skeeks-semenov/yii2-assets-auto-compress/blob/master/CHANGELOG.md)
* [Issues](https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues)
* [Packagist](https://packagist.org/packages/skeeks/yii2-assets-auto-compress)Demo (view source code)
----------
* [https://gallery.world](https://gallery.world)
* [http://skeeks.com/](https://skeeks.com)
* [http://select-moto.ru/](https://select-moto.ru)
* [http://motopraktika.ru/](https://motopraktika.ru)Screenshot
------------
[![SkeekS CMS admin panel](http://marketplace.cms.skeeks.com/uploads/all/b7/5e/8b/b75e8b31bfda1686d950c7b8783b53b5.png)](http://marketplace.cms.skeeks.com/uploads/all/b7/5e/8b/b75e8b31bfda1686d950c7b8783b53b5.png)___
[![SkeekS CMS admin panel](http://marketplace.cms.skeeks.com/uploads/all/3d/8c/aa/3d8caa7df0ef5cb0dd5149f5a5bdebba.png)](http://marketplace.cms.skeeks.com/uploads/all/3d/8c/aa/3d8caa7df0ef5cb0dd5149f5a5bdebba.png)
___
[![SkeekS CMS admin panel](http://marketplace.cms.skeeks.com/uploads/all/6f/77/39/6f7739f74f93dc6c82be15bdc86355a9.png)](http://marketplace.cms.skeeks.com/uploads/all/6f/77/39/6f7739f74f93dc6c82be15bdc86355a9.png)
___
[![SkeekS CMS admin panel](http://marketplace.cms.skeeks.com/uploads/all/0e/08/ff/0e08ffc6d46a1ffa1683c32e8f916d67.png)](http://marketplace.cms.skeeks.com/uploads/all/0e/08/ff/0e08ffc6d46a1ffa1683c32e8f916d67.png)
___
> [![skeeks!](https://skeeks.com/img/logo/logo-no-title-80px.png)](https://skeeks.com)
SkeekS CMS (Yii2) — fast, simple, effective!
[skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)