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

Prepare being able to correctly add recipies in 11.x branch #689

Closed
leymannx opened this issue Dec 19, 2024 · 4 comments
Closed

Prepare being able to correctly add recipies in 11.x branch #689

leymannx opened this issue Dec 19, 2024 · 4 comments
Labels
composer.json D11 State: Needs triage An issue or PR has not been assessed and requires a triage Type: Feature Issue is a new feature request

Comments

@leymannx
Copy link
Collaborator

leymannx commented Dec 19, 2024

  1. In extras.installer-types section add drupal-recipe:

            "installer-types": [
                "bower-asset",
                "drupal-recipe",
                "npm-asset"
            ],
  2. In extra.installer-paths section add "web/recipes/contrib/{$name}": ["type:drupal-recipe"]:

                "web/recipes/contrib/{$name}": [
                    ["type:drupal-recipe"]
                ]
  3. Add extra.drupal-recipe section:

            "drupal-recipe": {
                "unpack-remove-recipe": true,
                "auto-unpack": true
            },
  4. Upadte README.

@leymannx leymannx added composer.json D11 State: Needs triage An issue or PR has not been assessed and requires a triage Type: Feature Issue is a new feature request labels Dec 19, 2024
@webflo
Copy link
Member

webflo commented Dec 19, 2024

I think its not required to add it to installer-types. Its defined as composer installer already in https://github.com/composer/installers/blob/main/src/Composer/Installers/DrupalInstaller.php

@AlexSkrypnyk
Copy link
Collaborator

As per this commit, the recipes directory should be located above the web root.

@szeidler
Copy link

szeidler commented Jan 9, 2025

@webflo + @AlexSkrypnyk are right.

installer-types is obsolete and coming from composer/installers. It's just working.

installer-paths is only required if you want to place recipes not directly in /recipes, but for example a /recipes/contrib folder as @leymannx suggested. Since root is the recommendation it would be

            "recipes/contrib/{$name}": [
                ["type:drupal-recipe"]
            ]

Unpacking on the other hand is depending on the results of https://www.drupal.org/project/distributions_recipes/issues/3355485 or if you use https://github.com/woredeyonas/Drupal-Recipe-Unpack

@AlexSkrypnyk
Copy link
Collaborator

@leymannx
I'm closing this one as no changes are required. Please feel free to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer.json D11 State: Needs triage An issue or PR has not been assessed and requires a triage Type: Feature Issue is a new feature request
Projects
None yet
Development

No branches or pull requests

4 participants