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

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

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

Install npm from composer script

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

Since Nov 23Pushed 8mo 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 today

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

39

—

LowBetter than 84% of packages

Maintenance61

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

248d 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://avatars.githubusercontent.com/u/7508599?v=4)[Jernej Slejko](/maintainers/slejnej)[@slejnej](https://github.com/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

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[drupal/core

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

21866.0M1.7k](/packages/drupal-core)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)

PHPackages © 2026

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