Git Product home page Git Product logo

composer-bower-bridge's Introduction

Composer Bower bridge

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

Current version image Current build status image Current coverage status image

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:

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 ignore NPM's node_modules directory, similar to Composer's vendor directory.

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.

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 a dependency.

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.

composer-bower-bridge's People

Contributors

hectorespert avatar blackleg avatar

Watchers

James Cloos avatar  avatar Máriam Navarro avatar

Forkers

renaatdemuynck

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.