PHPackages                             skeeks/yii2-assets-auto-compress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. skeeks/yii2-assets-auto-compress

ActiveYii2-extension[Framework](/categories/framework)

skeeks/yii2-assets-auto-compress
================================

Automatically compile and merge files js + css + html in yii2 project

1.4.5.2(2y ago)157453.5k↓34.8%46[33 issues](https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues)[4 PRs](https://github.com/skeeks-semenov/yii2-assets-auto-compress/pulls)6BSD-3-ClausePHP

Since Aug 5Pushed 2y ago14 watchersCompare

[ Source](https://github.com/skeeks-semenov/yii2-assets-auto-compress)[ Packagist](https://packagist.org/packages/skeeks/yii2-assets-auto-compress)[ Docs](https://www.skeeks.com/)[ RSS](/packages/skeeks-yii2-assets-auto-compress/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (5)Versions (34)Used By (6)

Automatically compile and merge files js + css + html in yii2 project.
======================================================================

[](#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://camo.githubusercontent.com/c00a855e7f0b048588fd4f463dd6accd17ecc5b027e6cced798390dece4d0544/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736b65656b732f796969322d6173736574732d6175746f2d636f6d70726573732e737667)](https://packagist.org/packages/skeeks/yii2-assets-auto-compress)[![Total Downloads](https://camo.githubusercontent.com/f8c4bf8ef974c6cdb9abd223112520522fb1f7d48a96bdfbb1e6fa434c6f8ed5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736b65656b732f796969322d6173736574732d6175746f2d636f6d70726573732e737667)](https://packagist.org/packages/skeeks/yii2-assets-auto-compress)

Installation
------------

[](#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
----------

[](#how-to-use)

```
//App config
[
    'bootstrap'    => ['assetsAutoCompress'],
    'components'    =>
    [
    //....
        'assetsAutoCompress' =>
        [
            'class'         => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
        ],
    //....
    ]
]
```

```
//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
-----

[](#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)
-----------------------

[](#demo-view-source-code)

-
- [http://skeeks.com/](https://skeeks.com)
- [http://select-moto.ru/](https://select-moto.ru)
- [http://motopraktika.ru/](https://motopraktika.ru)

Screenshot
----------

[](#screenshot)

[![SkeekS CMS admin panel](https://camo.githubusercontent.com/5415cb6b4b668e408e4f6be3679f598cbbe58ff5aef36dccfede1e55fd230c8b/687474703a2f2f6d61726b6574706c6163652e636d732e736b65656b732e636f6d2f75706c6f6164732f616c6c2f62372f35652f38622f62373565386233316266646131363836643935306337623837383362353362352e706e67)](http://marketplace.cms.skeeks.com/uploads/all/b7/5e/8b/b75e8b31bfda1686d950c7b8783b53b5.png)

---

[![SkeekS CMS admin panel](https://camo.githubusercontent.com/cc25707563e9e60456ff8055e44b6975ca0f26dc310a31a7292bbb97af8de6c4/687474703a2f2f6d61726b6574706c6163652e636d732e736b65656b732e636f6d2f75706c6f6164732f616c6c2f33642f38632f61612f33643863616137646630656635636230646435313439663561356264656262612e706e67)](http://marketplace.cms.skeeks.com/uploads/all/3d/8c/aa/3d8caa7df0ef5cb0dd5149f5a5bdebba.png)

---

[![SkeekS CMS admin panel](https://camo.githubusercontent.com/570bf88f04ef63f714740aa2ec861feafe96f619d7035e0aafd7f6b2291dc7d6/687474703a2f2f6d61726b6574706c6163652e636d732e736b65656b732e636f6d2f75706c6f6164732f616c6c2f36662f37372f33392f36663737333966373466393364633663383262653135626463383633353561392e706e67)](http://marketplace.cms.skeeks.com/uploads/all/6f/77/39/6f7739f74f93dc6c82be15bdc86355a9.png)

---

[![SkeekS CMS admin panel](https://camo.githubusercontent.com/f8f15b1f0c1b4253fc231195760113a98d0f74430182f76898c6d453a95f71de/687474703a2f2f6d61726b6574706c6163652e636d732e736b65656b732e636f6d2f75706c6f6164732f616c6c2f30652f30382f66662f30653038666663366434366131666661313638336333326538663931366436372e706e67)](http://marketplace.cms.skeeks.com/uploads/all/0e/08/ff/0e08ffc6d46a1ffa1683c32e8f916d67.png)

---

> [![skeeks!](https://camo.githubusercontent.com/e80b006782c0ce0ce23f8e2e2530130e856f2f49c6a5a8e0e15eaf0c87d25d7b/68747470733a2f2f736b65656b732e636f6d2f696d672f6c6f676f2f6c6f676f2d6e6f2d7469746c652d383070782e706e67)](https://skeeks.com)
> *SkeekS CMS (Yii2) — fast, simple, effective!*
> [skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity54

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 93.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~108 days

Recently: every ~309 days

Total

30

Last Release

830d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/785306737dd13e3ea6826dfc04ab29ececa88f560d054ff595d64853cb878219?d=identicon)[skeeks-semenov](/maintainers/skeeks-semenov)

---

Top Contributors

[![skeeks-semenov](https://avatars.githubusercontent.com/u/9209305?v=4)](https://github.com/skeeks-semenov "skeeks-semenov (103 commits)")[![romanitalian](https://avatars.githubusercontent.com/u/1569695?v=4)](https://github.com/romanitalian "romanitalian (2 commits)")[![ovidiupop](https://avatars.githubusercontent.com/u/1079754?v=4)](https://github.com/ovidiupop "ovidiupop (1 commits)")[![Dimetriy](https://avatars.githubusercontent.com/u/4047038?v=4)](https://github.com/Dimetriy "Dimetriy (1 commits)")[![simocheccoli](https://avatars.githubusercontent.com/u/8978038?v=4)](https://github.com/simocheccoli "simocheccoli (1 commits)")[![haifahrul](https://avatars.githubusercontent.com/u/6553704?v=4)](https://github.com/haifahrul "haifahrul (1 commits)")[![tsanchev](https://avatars.githubusercontent.com/u/8882098?v=4)](https://github.com/tsanchev "tsanchev (1 commits)")

---

Tags

assetassetscss-filescss-minificationcss-minifiercss-minifyhtml-compilerhtml-compressingjs-css-htmljs-minerjs-minificationjs-minifierjs-minifyskeeks-cmsyiiyii2yii2-assetyii2-extensionframeworkcssJSappSxskeeksyiiassetsauto assets

### Embed Badge

![Health badge](/badges/skeeks-yii2-assets-auto-compress/health.svg)

```
[![Health](https://phpackages.com/badges/skeeks-yii2-assets-auto-compress/health.svg)](https://phpackages.com/packages/skeeks-yii2-assets-auto-compress)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.8k59](/packages/skeeks-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
