PHPackages                             risrc/asset-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. risrc/asset-installer

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

risrc/asset-installer
=====================

Copies configured asset files during composer update or install

1.0.1(10y ago)030MITPHP

Since Feb 15Pushed 10y agoCompare

[ Source](https://github.com/risrc/composer-asset-installer)[ Packagist](https://packagist.org/packages/risrc/asset-installer)[ RSS](/packages/risrc-asset-installer/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Composer Asset Installer
========================

[](#composer-asset-installer)

This is a little helper that eases the usage of assets through composer. It copies configured assets (individual files or directories) from the vendor folder to specified directories in your application.

Usage
-----

[](#usage)

### Require this package in your composer.json file

[](#require-this-package-in-your-composerjson-file)

```
    "require": {
        ...
        "risrc/asset-installer": "*"
    },

```

### Add `post-package-install` and `post-package-update` hooks

[](#add-post-package-install-and-post-package-update-hooks)

```
    "scripts": {
        ...
        "post-package-install": [
            "RiSrc\\Composer\\Scripts\\AssetInstallerScript::postPackageInstall"
        ],
        "post-package-update": [
            "RiSrc\\Composer\\Scripts\\AssetInstallerScript::postPackageUpdate"
        ]
    },

```

### Configure your assets

[](#configure-your-assets)

```
    "extra": {
        ...
        "asset-installer": {
            "path-config": {
                ...
            },
            "assets": {
                ...
            }
        }
    }

```

Configuration
-------------

[](#configuration)

A note for [Compass](http://compass-style.org/) users: The path configuration from your compass config file is applied automatically, if you can execute `compass config -p ` where composer is executed .

### Available placeholders

[](#available-placeholders)

- `{{LIBRARY_NAME}}` will be replaced with the package name without vendor prefix
- `{{BASE_PATH}}` can be configured with `base-path` (defaults to Compass property `project_path`)
- `{{JS_PATH}}` can be configured with `js-path` (defaults to Compass property `javascripts_path`)
- `{{CSS_PATH}}` can be configured with `css-path` (defaults to Compass property `css_path`)
- `{{SASS_PATH}}` can be configured with `sass-path` (defaults to Compass property `sass_path`)
- `{{FONTS_PATH}}` can be configured with `fonts-path` (defaults to Compass property `fonts_path`)
- `{{IMAGE_PATH}}` can be configured with `image-path` (defaults to Compass property `images_path`)
- `{{LIB_PATH}}` can be configured with `lib-path` (defaults to `lib/{{LIBRARY_NAME}}`)
- `{{JS_LIB_PATH}}` can be configured with `js-lib-path` (defaults to `{{JS_PATH}}/{{LIB_PATH}}`)
- `{{CSS_LIB_PATH}}` can be configured with `css-lib-path` (defaults to `{{CSS_PATH}}/{{LIB_PATH}}`)
- `{{SASS_LIB_PATH}}` can be configured with `sass-lib-path` (defaults to `{{SASS_PATH}}/{{LIB_PATH}}`)
- `{{FONTS_LIB_PATH}}` can be configured with `fonts-lib-path` (defaults to `{{FONTS_PATH}}/{{LIB_PATH}}`)
- `{{IMAGE_LIB_PATH}}` can be configured with `image-lib-path` (defaults to `{{IMAGE_PATH}}/{{LIB_PATH}}`)

### Override default path config (optional)

[](#override-default-path-config-optional)

```
    "extra": {
        "asset-installer": {
            "path-config": {
                "lib-path": "vendor/{{LIBRARY_NAME}}"
            }
        }
    }

```

### Configure your assets

[](#configure-your-assets-1)

```
    "extra": {
        "asset-installer": {
            "assets": {
                "": {
                    "": ""
                },
                "components/jquery": {
                    "jquery.min.js": "{{JS_PATH}}"
                },
                "zurb/foundation": {
                    "scss": "assets/foundation/scss",
                    "js": "{{JS_LIB_PATH}}",
                    "dist/foundation.min.js": "{{JS_PATH}}",
                    "dist/foundation.min.css": "{{CSS_PATH}}"
                }
            }
        }
    }

```

License
-------

[](#license)

See [LICENSE](LICENSE)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

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 ~80 days

Total

2

Last Release

3706d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17015604?v=4)[Jens Richter](/maintainers/risrc)[@risrc](https://github.com/risrc)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/risrc-asset-installer/health.svg)

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

###  Alternatives

[mention/fast-doctrine-paginator

Fast Doctrine paginator for batching, infinite scrolling, Relay

18124.3k](/packages/mention-fast-doctrine-paginator)[mrpowerup/filament-sql-field

And a field to write SQL sentences using codemirror 5.

181.2k](/packages/mrpowerup-filament-sql-field)

PHPackages © 2026

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