PHPackages                             libra/libra-assets-installer - 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. libra/libra-assets-installer

ActiveAssets-installer[Utility &amp; Helpers](/categories/utility)

libra/libra-assets-installer
============================

Makes accessible vendor assets (js, css, images) by creating/updating symlink to public/vendor/vendor-name folder

2.3.0(8y ago)13.6k28BSD-3-ClausePHP

Since Jun 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/libracms/libra-assets-installer)[ Packagist](https://packagist.org/packages/libra/libra-assets-installer)[ Docs](https://github.com/libracms/libra-assets-installer)[ RSS](/packages/libra-libra-assets-installer/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (10)Used By (8)

Vendor Package Assets installer for Composer packages
=====================================================

[](#vendor-package-assets-installer-for-composer-packages)

\##Description This package will help you to develop your vendor package with comfortable structure of public assets in **public** directory at root folder of your package. It will create symlink to this folder in **public/vendor/vendor-name/package-name**. So file public/css/screen.css will be accessible in view by:

```
$this->basePath() . '/vendor/vendor-name/package-name/css/screen.css';

```

At version 2.0.0 was changed logic of installing to use custom installer and rely on package type.

- If your package is some assets like jquery, jquery-ui or twitter-bootsrap etc., you should set up type of package to **asset**. Then add to require list this package like

    ```
    {
        "name":         "vendor-name/asset-package-name",
        "type":         "asset"
        "require": {
            "libra/libra-assets-installer":     "~2.0"
        }
    }

    ```

    After installing assets will be in **public/vendor/vendor-name/asset-package-name**.
- If you create standard ZF2 module that contains public assets into **public** directory
    then use `"type": "asset-aware"`:

    ```
    {
        "name":         "vendor-name/package-with-assets-name",
        "type":         "asset-aware"
        "require": {
            "libra/libra-assets-installer":     "~2.0"
        }
    }

    ```

    Then contents of **package-with-assets-name/public** folder will be symlinked or on failure copied to **public/vendor/vendor-name/package-with-assets-name**

So URL will be the same in both cases.

\##Options There available options (in format "type default"):

- public-dir (only in root package)
    - if you wish put asset into another folder - put its name above
- package-asset-dir (not available for type = asset)
    - if your asset dir has another name - put it above
- add-target-dir: bool false/true (may be suitable for symfony bundles)
    - if enabled add target dir path to public asset path
    - Since v3.0 always **true**, DEPRECATED.

Some example:

```
    "extra": {
        "package-asset-dir": "assets"
    }

```

In root package:

```
    {
        "config": {
            "public-dir": "httdocs",
        }
    }

```

**Note!** For Zend Framework 2 modules it don't need to set up any configurations as usually.

---

\##Instructions for ver. 1.\* Despite of its working even in version 2.\* you should'n rely on it feature in late version. This feature can be removed in any time in higher version but will be present in ver. 1.*. I encourage to use ver, 2.*.

**Note**: For working this module you should set it first in required list in composer.json. Also supports Windows Vista/Windows Server 2008 or greater by [php documentation](http://www.php.net/manual/en/function.symlink.php#refsect1-function.symlink-changelog). But really tested only under Linux. It uses **symlink** function hence behaviour at Windows unknown for me.

\###Using: In root composer.json add this packages to required list as first item. Add this lines in root composer:

```
    "scripts": {
        "post-package-install":  "LibraAssetsInstaller\\Installer::postPackageInstall",
        "pre-package-uninstall": "LibraAssetsInstaller\\Installer::prePackageUninstall",
        "post-package-update":   "LibraAssetsInstaller\\Installer::postPackageUpdate"
    }

```

At first It was created for Libra CMS.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 98% 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 ~280 days

Recently: every ~406 days

Total

7

Last Release

3035d ago

Major Versions

1.0.1 → 2.0.02013-08-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/a7cc69a61a5fa9ccc9b3008b8204e21649d167301bd17be8d32ee1c027154ac4?d=identicon)[duke](/maintainers/duke)

---

Top Contributors

[![vnagara](https://avatars.githubusercontent.com/u/1571419?v=4)](https://github.com/vnagara "vnagara (50 commits)")[![FredM](https://avatars.githubusercontent.com/u/779815?v=4)](https://github.com/FredM "FredM (1 commits)")

---

Tags

installerzf2asset

### Embed Badge

![Health badge](/badges/libra-libra-assets-installer/health.svg)

```
[![Health](https://phpackages.com/badges/libra-libra-assets-installer/health.svg)](https://phpackages.com/packages/libra-libra-assets-installer)
```

PHPackages © 2026

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