PHPackages                             abeliani/asset-manager - 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. abeliani/asset-manager

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

abeliani/asset-manager
======================

Fast and simple managing assets bundles

v0.4.7(1y ago)014MITPHPPHP ^8.1

Since Jun 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/abeliani/asset-manager)[ Packagist](https://packagist.org/packages/abeliani/asset-manager)[ Docs](https://treecode.ru)[ RSS](/packages/abeliani-asset-manager/feed)WikiDiscussions develop Synced 1mo ago

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

AssetManager
============

[](#assetmanager)

Helps to manage your assets, with minimize, optimize and merge files. The library is using two cache layers.

Overview
========

[](#overview)

```
my_site/
    ├── css/
    │   ├── styles.css
    │   ├── reset.css
    │   └── main.css
    ├── js/
    │   ├── app.js
    │   ├── utils.js
    │   └── main.js
    └──MySiteBundle.php

```

```
class MySiteBundle extends Bundle
{
    public finction getTags(): TagInterface|\SplFixedArray|array
    {
        /* Separated files
        reurn [
            new Css('styles.css'),
            new Css('reset.css'),
            new Css('main.css'),
            // js...
        ]; */

         /* With attributes
        reurn [
            (new Css('styles.css')->addAttr('async'),
            (new Js('app.js'))->addAttr('media', 'print'),
            // ...
        ]; */

        /* Merge files
        return [
            new Css('styles.css', 'reset.css', 'main.css'),
            new Js('app.js', 'utils.js', 'main.js'),
        ]; */

        // With timestamp
        return [
            (new Css('styles.css', 'reset.css', 'main.css'))->withTimestamp(),
            (new Js('app.js', 'utils.js', 'main.js'))->withTimestamp(),
        ];
    }
}
```

By default, all styles or scripts will be optimized. If you want to do some minimizing you can use minimize() method

```
    /*
     * Let's minimize? optimize and merge all scripts and all styles to two files style.css and app.js
     */
    public finction getTags(): array
    {
        reurn [
             (new Css('styles.css', 'reset.css', 'main.css'))->minimize()->withTimestamp(),
             (new Js('app.js', 'utils.js', 'main.js'))->minimize()->withTimestamp(),
        ];
    }
```

In result, we will have here html to include our files

```

```

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

[](#installation)

```
composer require abeliani/asset-manager
```

More examples
-------------

[](#more-examples)

### Configure asset manager

[](#configure-asset-manager)

```
$this->manager = new AssetManager(
    'https://mysite.cool',
    '/path/to/runtime/dir',
    '/path/to/asset/dir',
    $env === 'prod',
);
```

### Add our bundle to manager

[](#add-our-bundle-to-manager)

```
$this->manager->addBundle(new MySiteBundle());
$this->manager->addBundle(new MyAdminBundle(), AssetManagerInterface::CATEGORY_TOP);
$this->manager->addBundle(new MyEditorBundle(), AssetManagerInterface::CATEGORY_BOTTOM);
```

### Get some HTML to include our result

[](#get-some-html-to-include-our-result)

```
print $this->manager->process();
```

It will display something like that

```

```

```
print $this->manager->process(AssetManagerInterface::CATEGORY_TOP);
```

Or like that

```

```

```
print $this->manager->process(AssetManagerInterface::CATEGORY_BOTTOM);
```

Or like that

```

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

700d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9617a072a7fa76b7fcef4a6ea49963df513e04fd2ca4bd94881d0f19dfe09f37?d=identicon)[abeliani](/maintainers/abeliani)

---

Tags

composer-library

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/abeliani-asset-manager/health.svg)

```
[![Health](https://phpackages.com/badges/abeliani-asset-manager/health.svg)](https://phpackages.com/packages/abeliani-asset-manager)
```

###  Alternatives

[lifo/typeahead-bundle

A Symfony bundle that provides an autocomplete Typeahead form type compatible with Bootstrap v2|v3

22118.8k](/packages/lifo-typeahead-bundle)

PHPackages © 2026

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