PHPackages                             koala-framework/composer-extra-assets - 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. koala-framework/composer-extra-assets

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

koala-framework/composer-extra-assets
=====================================

Composer Plugin for installing Assets using native npm/bower

v2.0.9(1y ago)42118.7k↓50%11[5 issues](https://github.com/koala-framework/composer-extra-assets/issues)11BSD-2-ClausePHP

Since Sep 14Pushed 4mo ago17 watchersCompare

[ Source](https://github.com/koala-framework/composer-extra-assets)[ Packagist](https://packagist.org/packages/koala-framework/composer-extra-assets)[ Docs](https://github.com/koala-framework/composer-extra-assets)[ RSS](/packages/koala-framework-composer-extra-assets/feed)WikiDiscussions 2.0 Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (22)Used By (11)

Composer Plugin for installing Assets using native npm/bower
------------------------------------------------------------

[](#composer-plugin-for-installing-assets-using-native-npmbower)

This Composer plugin installs assets using native npm/bower. Not only the root package can have dependencies.

Npm packages will be installed in package folder, bower will be installed in root - with all dependencies merged.

[Introduction](http://www.nikosams.net/blog/17_composer_npm_bower_assets_installation_using_composer-extra-assets)

### Example usage

[](#example-usage)

composer.json

```
"require": {
    "koala-framework/composer-extra-assets": "~1.1"
},
"extra": {
    "require-npm": {
        "grunt": "0.4.*"
    },
    "require-bower": {
        "jquery": "*"
    },
    "require-dev-bower": {
        "qunit": "*"
    },
    "require-dev-npm": {
    }
}

```

### Bower dependencies

[](#bower-dependencies)

Bower dependencies will be installed in the `vendor/bower_components` directory.

### NPM dependencies

[](#npm-dependencies)

NPM dependencies will be installed in the `node_modules` directory of the package that requires the dependency. Some NPM packages provide binary files (for instance `gulp` and `grunt`).

NPM binaries will be exposed in the `vendor/bin` directory if the NPM dependency is declared in the **root Composer package**.

If you are writing a package and want a NPM package to be available in the `node_modules` directory of Composer's root (instead of the `node_modules` directory of your package), you can add the `expose-npm-packages`attribute to the composer `extra` session of your package:

```
 "require": {
     "koala-framework/composer-extra-assets": "~1.1"
 },
 "extra": {
     "require-npm": {
         "gulp": "*"
     },
     "expose-npm-packages": true
 }

```

### Generated files

[](#generated-files)

This plugin will automatically generate 3 files: `.bowerrc`, `bower.json`, `package.json`/

Unless you have special requirements, you can ignore those 3 files in your VCS. If you are using GIT, add this to your `.gitignore`:

.gitignore

```
vendor/
.bowerrc
bower.json
package.json

```

### Lock

[](#lock)

This plugin will generate a file named `composer-extra-assets.lock` which can be used just like `composer.lock`. Put it under version control if you want to be able to install the exact same dependencies.

### Warning

[](#warning)

This plugins removes (and re-installs) the complete node\_modules folder. Any changes will be lost.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance55

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% 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 ~207 days

Recently: every ~854 days

Total

21

Last Release

122d ago

Major Versions

v1.2.0 → v2.0.02015-08-25

v1.1.2 → v2.0.52016-05-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/395b4eb64319fa0febc26d2105ba5d7989eab16a9e8b1bb245f8705d1fb9ddac?d=identicon)[nsams](/maintainers/nsams)

![](https://avatars.githubusercontent.com/u/1013756?v=4)[Franz Unger](/maintainers/fraxachun)[@fraxachun](https://github.com/fraxachun)

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

---

Top Contributors

[![nsams](https://avatars.githubusercontent.com/u/50764?v=4)](https://github.com/nsams "nsams (60 commits)")[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (12 commits)")[![kaufmo](https://avatars.githubusercontent.com/u/1416828?v=4)](https://github.com/kaufmo "kaufmo (2 commits)")[![alavieille](https://avatars.githubusercontent.com/u/11750768?v=4)](https://github.com/alavieille "alavieille (1 commits)")[![fraxachun](https://avatars.githubusercontent.com/u/1013756?v=4)](https://github.com/fraxachun "fraxachun (1 commits)")[![Deltachaos](https://avatars.githubusercontent.com/u/679561?v=4)](https://github.com/Deltachaos "Deltachaos (1 commits)")[![xhuberty](https://avatars.githubusercontent.com/u/8350192?v=4)](https://github.com/xhuberty "xhuberty (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/koala-framework-composer-extra-assets/health.svg)

```
[![Health](https://phpackages.com/badges/koala-framework-composer-extra-assets/health.svg)](https://phpackages.com/packages/koala-framework-composer-extra-assets)
```

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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