modera/composer-monorepo-plugin

There is no license information available for the latest version (v0.1.0) of this package.

Installs: 1 346

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:composer-plugin

v0.1.0 2016-09-15 10:31 UTC

This package is auto-updated.

Last update: 2024-11-26 16:46:18 UTC


README

Composer plugin to combine requirements from multiple composer.json (at the moment "require", "require-dev") files and run package events on them, you may want to use this plugin when you have a "monolith" repository which contains many packages which at later stages are split by some mechanism like CI scripts but at the same time do not want to manually duplicate meta-information from nested composer.json files into the root one.

Installation

In order for a plugin to work correctly it has to be installed globally, you can do it by running this command:

$ composer global require modera/composer-monorepo-plugin:dev-master

Simply specifying a plugin as your project's dependency will have no proper effect since hooks the plugin relies on are invoked earlier than composer starts resolving dependencies graph.

Usage

Add "extra/modera-monorepo" section to "monolith" composer.json of your package:

{
    ...
    "extra": {
        "modera-monorepo": {
            "include": [
                "src/Modera/*/composer.json"
            ]
        }
    }
}

"Include" section can be used to specify a list of "glob" expression which instruct the plugin in what directories to look for nested "composer.json" files. In this given example we assume that your package(library) has a "src/Modera" directory in which other directories live which have composer.json inside them.

After each change in nested "composer.json" files you need to run:

$ composer update

If all passed correctly, plugin combine all requirements and save them into root "composer.json".

Licensing

This plugin is under the MIT license. See the complete license in the file: LICENSE