Bower integration for Composer packages.
Bower integration for Composer packages. Based on the on (and shamelessly stolen from) [eloquent/composer-npm-bridge] [eloquent/composer-npm-bridge]: https://packagist.org/packages/eloquent/composer-npm-bridge
npmexecutable must be available in PATH.
To utilize the Composer NPM bridge, simply add
require section of the project's Composer configuration:
composer require eloquent/composer-npm-bridge:^3
NPM dependencies are specified via a package.json configuration file in the
root directory of the Composer package. Source control should be configured to
node_modules directory, similar to Composer's
The Composer NPM bridge is a Composer plugin that automatically installs and
updates NPM packages whenever the corresponding Composer command is executed.
To detect compatible packages, the bridge inspects Composer package
configuration information to find packages that directly require the
eloquent/composer-npm-bridge Composer package itself.
In addition to normal operation,
composer install will install NPM
dependencies for all Composer packages using the bridge. This includes the root
package, as well as Composer dependencies. Similarly,
composer update will
install NPM dependencies for all Composer dependencies using the bridge. It
will also update and shrinkwrap the NPM dependencies for the root project.
NPM dependencies will be installed exactly as if
npm install were run from the
root directory of the package. This applies even if the package is installed as
Because NPM dependencies are installed underneath the root directory of the
Composer package, Composer may complain about working copy changes when the
package is installed as a dependency. Source control should be configured to
node_modules directory in order to avoid this.