PHPackages                             alexey-rus/matreshka-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alexey-rus/matreshka-asset

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alexey-rus/matreshka-asset
==========================

Combining and managing css and js files.

v1.0.0(5y ago)07MITPHPPHP &gt;=7.2.0

Since Jul 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/alexey-rus/matreshka-asset)[ Packagist](https://packagist.org/packages/alexey-rus/matreshka-asset)[ RSS](/packages/alexey-rus-matreshka-asset/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Matreshka asset
===============

[](#matreshka-asset)

Combining and managing css and js files.

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

[](#installation)

```
composer require alexey-rus/matreshka-asset

```

Basic usage:
------------

[](#basic-usage)

```
use MatreshkaAsset\Asset;
$asset = Asset::getInstance();

//Add js files
$asset->addJs('/js/jquery.js');
$asset->addJs('/js/main.js');
$asset->addJs('/js/page.js');

//Combine js resources
try {
   $jsFiles = $asset->combineJs();
} catch (Exception $e) {
   //Handle errors
}

//Display html script tags including combined file
echo $jsFiles;

//Add css files
$asset->addCss('/css/styles.css');
$asset->addCss('/css/custom.css');

//Combine css resources
try {
   $cssFiles = $asset->combineCss();
} catch (Exception $e) {
   //Handle errors
}

//Display link tag including combined file
echo $cssInclude;

```

File order
----------

[](#file-order)

You can set the order for files (from lowest to highest), for example if you need to include jquery library before any other files:

```
 Asset::getInstance()->addJs('/js/jquery.js', -1)

```

Include minified files
----------------------

[](#include-minified-files)

If you have minified version for file (e.g. main.js =&gt; main.min.js), it will be automatically included instead of original file

```
 //It will check if main.min.js file exist
 Asset::getInstance()->addJs('/js/main.js')

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2131d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9389c8eae1bb9ce08ba2ebf50eca5be69c0f21cca020fd5744cb04b1d5ccf2fb?d=identicon)[alexey-rus](/maintainers/alexey-rus)

---

Top Contributors

[![alexey-rus](https://avatars.githubusercontent.com/u/35813125?v=4)](https://github.com/alexey-rus "alexey-rus (15 commits)")

---

Tags

minification-concatjavascriptcssJSasset

### Embed Badge

![Health badge](/badges/alexey-rus-matreshka-asset/health.svg)

```
[![Health](https://phpackages.com/badges/alexey-rus-matreshka-asset/health.svg)](https://phpackages.com/packages/alexey-rus-matreshka-asset)
```

###  Alternatives

[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k30.5M336](/packages/matthiasmullie-minify)[stolz/assets

An ultra-simple-to-use assets management library

296519.2k8](/packages/stolz-assets)[dotsunited/bundlefu

BundleFu is a PHP 5.3+ library which bundles multiple css/javascript files into a big package and sends it out at once

7028.5k3](/packages/dotsunited-bundlefu)[fisharebest/laravel-assets

Asset management for Laravel

208.1k](/packages/fisharebest-laravel-assets)[mmanos/laravel-casset

An asset management package for Laravel 4.

112.6k](/packages/mmanos-laravel-casset)

PHPackages © 2026

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