PHPackages                             defyma/yii2-compress-asset - 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. [Templating &amp; Views](/categories/templating)
4. /
5. defyma/yii2-compress-asset

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

defyma/yii2-compress-asset
==========================

This solution enables you to dynamically combine js and css files to optimize the html page.

v1.0.2(7y ago)0216BSD-3-ClausePHP

Since Dec 17Pushed 7y agoCompare

[ Source](https://github.com/defyma/yii2-compress-asset)[ Packagist](https://packagist.org/packages/defyma/yii2-compress-asset)[ Docs](http://www.defyma.com/)[ RSS](/packages/defyma-yii2-compress-asset/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (4)Used By (0)

Automatically compile and merge files js + css
==============================================

[](#automatically-compile-and-merge-files-js--css)

This solution enables you to dynamically combine js and css files to optimize the html page.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist defyma/yii2-compress-asset "*"

```

or add

```
"defyma/yii2-compress-asset": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
//App config
[
    'bootstrap'    => ['assetsAutoCompress'],
    'components'    => [
    //....
        'assetsAutoCompress' =>
        [
            'class' => '\defyma\assets\AssetsCompressComponent',
            'enabled'           => true,
            'jsCompress'        => true,
            'cssFileCompile'    => true,
            'jsFileCompile'     => true,
        ],
    //....
    ]
]
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

2704d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8898f779dce4ff78aeefb9d7e8f0bbbb2ddf885a4f9ed5105d556646e1635d67?d=identicon)[defyma](/maintainers/defyma)

---

Top Contributors

[![defyma](https://avatars.githubusercontent.com/u/22837102?v=4)](https://github.com/defyma "defyma (4 commits)")

---

Tags

cssJScompressyii2assetsdefyma

### Embed Badge

![Health badge](/badges/defyma-yii2-compress-asset/health.svg)

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

###  Alternatives

[rmrevin/yii2-minify-view

Yii2 View component with auto minification css &amp; js in runtime

194302.3k7](/packages/rmrevin-yii2-minify-view)[skeeks/yii2-assets-auto-compress

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

162437.6k6](/packages/skeeks-yii2-assets-auto-compress)[raoul2000/yii2-bootswatch-asset

Use Bootswatch theme in your Yii application with minimum effort

2145.0k4](/packages/raoul2000-yii2-bootswatch-asset)[lajax/yii2-asset-minifier

Runtime minification and combination of asset files.

1010.4k](/packages/lajax-yii2-asset-minifier)[sensiolabs/minify-bundle

Assets Minifier (CSS, JS) for Symfony &amp; Minify integration in Asset Mapper

5694.9k1](/packages/sensiolabs-minify-bundle)[ogheo/yii2-htmlcompress

Compress HTML output into a single line

20184.4k1](/packages/ogheo-yii2-htmlcompress)

PHPackages © 2026

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