Skip to content

New "Recipe" Project Type

Tim Erickson edited this page Feb 2, 2021 · 10 revisions

This page is intended to be a place to summarize the discussion taking place in issue #3763

Summary:

The intent of this issue is to create a project type that might be best compared to the "Features" module for Drupal 7. A means of importing a mixture of content types, views, fields and other configuration to add specific functionality to an existing site.

Assumptions:

  1. Recipes are something that would be added after installation. Adding functionality to a site during the install process can currently be accomplished with an install profile.
  2. Recipes would probably require an ability to declare dependencies. A specific Recipe may require that a specific module has been installed or is installed at the time the Recipe is enabled.

Structure

The current working assumption is that a Recipe project would be defined by a .info file, much in the same way that modules, themes, layouts, and install profiles are. Included in the .info file would be some or all of the following:

  1. .info file
    • Module dependencies
    • Layout dependencies
    • Theme dependencies (???)
  2. Config
    • Are config files included directly in Recipe or just a link to source?
  3. What else would be included?

Examples:

Here is a list of examples of what might be included in a Recipe. This list need not be exhaustive, but should include good representation of the types of Recipes we might anticipate.

  1. FAQ Feature
    • Content Type
    • Necessary fields
    • Views
  2. Prefab Paragraphs
    • "that would allow people to click a button to configure a paragraph type -- but perhaps a core "recipe" module would allow some way to do this in a module? e.g. in this case, a recipe for a content type with certain paragraph types pre-configured, or just pre-configuring paragraph types in general (some of which may have dependencies on other modules)."

Questions

  1. Is it possible to uninstall a Recipe? Creating an uninstall process could get complicated and may not be necessary. One way to think about Recipes is that the must be removed manually. We could require that any official Recipe comes with a Readme that includes all the changes the Recipe inflicts up on site (to make it easier for an end user to back these changes out if necessary).
Clone this wiki locally