2017 © Pedro Peláez
 

composer-plugin composer-npm-bridge

NPM integration for Composer packages.

image

eloquent/composer-npm-bridge

NPM integration for Composer packages.

  • Tuesday, September 19, 2017
  • by ezzatron
  • Repository
  • 4 Watchers
  • 61 Stars
  • 56,514 Installations
  • PHP
  • 15 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 17 Versions
  • 9 % Grown

The README.md

No longer maintained

This package is no longer maintained. See [this statement] for more info., (*1)

[this statement]: https://gist.github.com/ezzatron/713a548735febe3d76f8ca831bc895c0, (*2)

Composer NPM bridge

NPM integration for Composer packages., (*3)

![Current version image][version-image] Current build status image ![Current coverage status image][coverage-image], (*4)

Installation

Requirements

  • The npm executable must be available in PATH.

Usage

To utilize the Composer NPM bridge, simply add eloquent/composer-npm-bridge to the require section of the project's Composer configuration:, (*5)

composer require eloquent/composer-npm-bridge

NPM dependencies are specified via a package.json configuration file in the root directory of the Composer package. Source control should be configured to ignore NPM's node_modules directory, similar to Composer's vendor directory., (*6)

How does it work?

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., (*7)

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 the NPM dependencies for the root project., (*8)

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 a dependency., (*9)

Configuration

The following configuration can be added to composer.json under the extra.npm-bridge section to customize the behavior on a per-package basis. Values in the root package will not currently impact any dependency packages that also use Composer NPM bridge - each package must define its own options., (*10)

Key Type Default Description
timeout int 300 Specify a custom timeout for the installation (in seconds).
optional bool false Skip instead of throwing an exception if npm is not found when processing the package.
{
    // ...

    "extra": {
        "npm-bridge": {
            "timeout": 9000,
            "optional": true
        },

        // ...
    }
}

Composer NPM bridge can be completely disabled by setting the COMPOSER_NPM_BRIDGE_DISABLE environment variable to a non-empty value:, (*11)

COMPOSER_NPM_BRIDGE_DISABLE=1 composer install

Caveats

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 ignore the node_modules directory in order to avoid this., (*12)

The Versions

19/09 2017

dev-master

9999999-dev https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

  • composer-plugin-api ^1
  • php >=7

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

19/09 2017

4.0.1

4.0.1.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

  • composer-plugin-api ^1
  • php >=7

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

12/07 2017

4.0.0

4.0.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

  • composer-plugin-api ^1
  • php >=7

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

12/07 2017

dev-npm-lock

dev-npm-lock https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

  • composer-plugin-api ^1
  • php >=7

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

22/04 2017

dev-upgrade-phony

dev-upgrade-phony https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

  • composer-plugin-api ^1
  • php >=5.3

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

22/02 2016

dev-develop

dev-develop https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

  • composer-plugin-api ^1
  • php >=5.3

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

22/02 2016

3.0.1

3.0.1.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

  • composer-plugin-api ^1
  • php >=5.3

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

12/02 2016

3.0.0

3.0.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

08/09 2014

2.1.1

2.1.1.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

08/09 2014

dev-damnedest-fix-custom-install-path

dev-damnedest-fix-custom-install-path https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

12/02 2014

2.1.0

2.1.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

29/01 2014

2.0.0

2.0.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin composer package integration npm bridge composer-plugin

04/03 2013

1.0.1

1.0.1.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

composer package integration npm bridge

09/10 2012

1.0.0

1.0.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

composer package integration npm bridge

09/10 2012

0.3.0

0.3.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

composer package integration npm bridge

09/10 2012

0.2.0

0.2.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for Composer packages.

  Sources   Download

MIT

The Requires

 

The Development Requires

composer package integration npm bridge

09/10 2012

0.1.0

0.1.0.0 https://github.com/eloquent/composer-npm-bridge

NPM integration for your Composer package.

  Sources   Download

MIT

The Requires

 

The Development Requires

composer package integration npm bridge