2017 © Pedro Peláez
 

composer-plugin composer-monorepo-plugin

image

modera/composer-monorepo-plugin

  • Tuesday, December 27, 2016
  • by moderadev
  • Repository
  • 3 Watchers
  • 0 Stars
  • 1,223 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

modera/composer-monorepo-plugin

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

Installation

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

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

Usage

Add "extra/modera-monorepo" section to "monolith" composer.json of your package:, (*4)

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

After each change in nested "composer.json" files you need to run:, (*6)

$ composer update

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

Licensing

This plugin is under the MIT license. See the complete license in the file: LICENSE, (*8)

The Versions

27/12 2016

dev-master

9999999-dev

  Sources   Download

The Requires

  • composer-plugin-api ^1.0.0

 

15/09 2016

v0.1.0

0.1.0.0

  Sources   Download

The Requires

  • composer-plugin-api ^1.0.0