Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Contributing

Adam edited this page Jul 24, 2024 · 2 revisions

This page is intended for developers.

How to add a new recipe to the prototype

  1. Fork the repository and clone it into your local environment.
  2. In the recipes directory, create a new directory for your recipe.
  3. Create a composer.json in that directory, which looks like this:
{
    "name": "drupal/YOUR_RECIPE_NAME",
    "type": "drupal-recipe",
    "description": "DESCRIBE THE RECIPE IN A SENTENCE",
    "version": "dev-main",
    "require": {
        "drupal/core": ">=10.3"
    }
}

Be sure to add any module or theme dependencies to the require section. You can also require packages from Packagist. 4. Edit the composer.json at the top level of the repository, and add the following to the repositories section:

        "YOUR_RECIPE_NAME": {
            "type": "path",
            "url": "recipes/YOUR_RECIPE_NAME",
            "options": {
                "symlink": false
            }
        }
  1. Now edit recipes/starshot/composer.json, and add the following to the require section:
        "drupal/YOUR_RECIPE_NAME": "*"
  1. Edit recipes/starshot/recipe.yml, and add the name of your recipe to the recipes list, like so:
  - YOUR_RECIPE_NAME
  1. At the top level of the repository, run composer drupal:rebuild to reinstall all dependencies and reinstall Drupal. (If you're using DDEV, you should run ddev composer drupal:rebuild.) Do this every time you make a change to your recipe, to see the changes take effect. (Pro tip: you only need to run drupal:rebuild if you add or remove a dependency. If you only change the recipe, drupal:install is faster.)
  2. Build out your recipe however you want, then when it's ready, open a pull request!
Clone this wiki locally