Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce modular composer dependencies #89

Open
grayside opened this issue Dec 21, 2017 · 0 comments
Open

Introduce modular composer dependencies #89

grayside opened this issue Dec 21, 2017 · 0 comments

Comments

@grayside
Copy link
Contributor

Using the wikimedia/composer-merge-plugin project, we can designate separate composer configuration files to facilitate more modular maintenance.

  1. This could be done in gadget, and used to treat Octane as a meta-package instead of using our custom merge logic.
  2. We could use this to roll up Pattern Lab dependencies into the project root.
  3. Particle could add a composer.json inside the Drupal theme and we could include those as well, allowing Particle to declare it's own dependencies.

In order to make this somewhat manageable, we would explicitly disable recursive merge functionality. Adapting from the usage example in the plugin's README, we might have a config such as:

{
    "require": {
        "wikimedia/composer-merge-plugin": "dev-master"
    },
    "extra": {
        "merge-plugin": {
            "include": [
                "composer.local.json",
                "src/themes/*/composer.json",
                "src/themes/*/apps/drupal/composer.json",
            ],
            "recurse": false,
            "replace": false,
            "ignore-duplicates": false,
            "merge-dev": true,
            "merge-extra": false,
            "merge-extra-deep": false,
            "merge-scripts": false
        }
    }
}

I have temporarily flagged this as a question, because how we approach this touches multiple projects and maintainers. I have already discussed this with Bloom, but not sure if the implications for Particle were clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants