Update Getting Started Doc to include composer commands for altering existing composer.json projects

Created on 16 April 2025, 29 days ago

https://project.pages.drupalcode.org/distributions_recipes/getting_start...

We should also add the composer commands to each of the steps where you need to alter an existing composer.json project file in addition to the snippets.

πŸ“Œ Task
Status

Active

Version

1.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @thejimbirch
  • πŸ‡ΊπŸ‡ΈUnited States kerrymick Chicago

    Looks good. Thanks @thejimbirch

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    For the .gitignore section, I think we can add something like this:

    cd /path/to/repo
    find . -name "/recipes*" >> .gitignore
    

    ------------

    To add a repository, it's

    composer config repositories.<name> <type> <url>

    Example:

    composer config repositories.drupal composer https://packages.drupal.org/8

    This will automatically inject into composer.json under repositories like this:

    "repositories": {
        "drupal": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    }

    ------------

    To update the allow-plugins section for the unpack command:

    The general syntax is:

    composer config allow-plugins.<plugin-name> true

    For our specific case:

    composer config allow-plugins.ewcomposer/unpack true

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts
Production build 0.71.5 2024