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

ActiveLibrary

slejnej/asset-installer
=======================

Install npm from composer script

1.0.3(6mo ago)01.4kMITPHPPHP &gt;=8.1

Since Nov 23Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/slejnej/asset-installer)[ Packagist](https://packagist.org/packages/slejnej/asset-installer)[ RSS](/packages/slejnej-asset-installer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

NPM Asset installer
===================

[](#npm-asset-installer)

Install all your npm assets via composer

### Installation

[](#installation)

- install via composer `composer req slejnej/asset-installer`
- add asset installation script to your composer ```
      "scripts": {
        "post-install-cmd": [
          "slejnej\\AssetInstaller\\InstallerHandler::installAssets"
        ]
      }

    ```
- add npm packages direct to your composer ```
      "extra": {
        "npm": {
          "leaflet": "^1.7.1"
        }
      }

    ```
- run `composer install`

### In case

[](#in-case)

If this package is included in one of your vendor dependencies, then the *scripts* are not run for security reasons. As a work around you can use in **primary** `composer.json` something like this: `find ./vendors -maxdepth 2 -type f -name composer.json -exec  bash -c "cat {} | grep ::installAssets && composer install --working-dir $(dirname {})" \;`It will find all the files that contain php command *installAsset* and then execute `composer install` in containing folder. Update `./vendors` folder where it should look in and adjust `maxdepth and update you `composer` executable.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance67

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

Total

4

Last Release

192d ago

PHP version history (3 changes)1.0.0PHP ^7.3

1.0.2PHP ^7.4 || ^8.1

1.0.3PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)

PHPackages © 2026

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