PHPackages                             abbas13375/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. abbas13375/yii2-assets-auto-compress

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

abbas13375/yii2-assets-auto-compress
====================================

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

1.4.3.3(5y ago)022BSD-3-ClausePHP

Since Aug 5Pushed 4y agoCompare

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

READMEChangelogDependencies (5)Versions (30)Used By (0)

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/8ab0a6e1e2071d053c2ee540ac65aacd9f899e28f22d80ccd55b6a3f4c19d166/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616262617331333337352f796969322d6173736574732d6175746f2d636f6d70726573732e737667)](https://packagist.org/packages/abbas13375/yii2-assets-auto-compress)[![Total Downloads](https://camo.githubusercontent.com/cc0a4a612e388f95089f091bf8160577208d852f281fa67f10a9278f58f9fbcb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616262617331333337352f796969322d6173736574732d6175746f2d636f6d70726573732e737667)](https://packagist.org/packages/abbas13375/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 abbas13375/yii2-assets-auto-compress "*"

```

or add

```
"abbas13375/yii2-assets-auto-compress": "*"

```

How to use
----------

[](#how-to-use)

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

```
//App config with all options
[
    'bootstrap'  => ['assetsAutoCompress'],
    'components' => [
        //....
        'assetsAutoCompress' => [
            'class'   => '\abbas13375\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'         => 'abbas13375\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' => 'abbas13375\yii2\assetsAuto\formatters\html\MrclayHtmlCompressor',

                //or any other your handler implements abbas13375\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://bayaneno.com/](https://bayaneno.com)

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

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 86.7% 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 ~76 days

Recently: every ~82 days

Total

26

Last Release

2059d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d1dc9d77df57226d8e45024477c7d1a0abd4ea224d2c126d215f7b1113e5c7c?d=identicon)[abbas13375](/maintainers/abbas13375)

---

Top Contributors

[![skeeks-semenov](https://avatars.githubusercontent.com/u/9209305?v=4)](https://github.com/skeeks-semenov "skeeks-semenov (98 commits)")[![abbas13375](https://avatars.githubusercontent.com/u/38594568?v=4)](https://github.com/abbas13375 "abbas13375 (8 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)")[![haifahrul](https://avatars.githubusercontent.com/u/6553704?v=4)](https://github.com/haifahrul "haifahrul (1 commits)")[![simocheccoli](https://avatars.githubusercontent.com/u/8978038?v=4)](https://github.com/simocheccoli "simocheccoli (1 commits)")[![Dimetriy](https://avatars.githubusercontent.com/u/4047038?v=4)](https://github.com/Dimetriy "Dimetriy (1 commits)")[![tsanchev](https://avatars.githubusercontent.com/u/8882098?v=4)](https://github.com/tsanchev "tsanchev (1 commits)")

---

Tags

frameworkcssJSappSxskeeksyiiassetsauto assets

### Embed Badge

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

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

###  Alternatives

[skeeks/yii2-assets-auto-compress

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

162447.8k6](/packages/skeeks-yii2-assets-auto-compress)[skeeks/cms

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

13725.7k50](/packages/skeeks-cms)

PHPackages © 2026

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