kanopi/saplings

Modern Drupal starter recipe.

Installs: 312

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 14

Forks: 0

Open Issues: 1

Type:drupal-recipe

1.0.0-beta.3 2024-02-16 12:49 UTC

This package is auto-updated.

Last update: 2024-04-04 13:30:44 UTC


README

saplings

Saplings - Drupal Build Starter Recipe

This recipe is designed to help start a highly configured Drupal project.

Rather than one large Recipe that tries to do everything, we've broken it up into multiple sub-recipes. This recipe installs them all, but you can also install the sub-recipes on their own (Once this Drupal issue is resolved.).

Saplings ERD

Requiring and Applying this recipe

Apply a recipe to Drupal installed with a minimal profile. See below is you want to set up a quick testing environment.

  • Follow the instructions in kanopi/drupal-starter to start a new project as it is configured for recipes and tooling needed.
  • Run fin composer require kanopi/saplings:^1 to require this repository.
  • Run fin recipe-apply saplings to apply this recipe.
  • Run the following command to unpack the dependencies from all kanopi/saplings recipes to the site project's composer.json file.
fin recipe-unpack kanopi/saplings && fin recipe-unpack kanopi/gin-admin-experience && fin recipe-unpack kanopi/saplings-base && fin recipe-unpack kanopi/saplings-editorial && fin recipe-unpack kanopi/saplings-launch && fin recipe-unpack kanopi/saplings-content-types && fin recipe-unpack kanopi/saplings-component-types && fin recipe-unpack kanopi/saplings-component-base && fin recipe-unpack kanopi/saplings-content-base && fin recipe-unpack kanopi/saplings-media && fin recipe-unpack kanopi/imagemagick-configuration && fin recipe-unpack kanopi/saplings-theme && fin recipe-unpack kanopi/saplings-editorial
  • Export configuration.

You can then remove the recipe once it has been applied and unpacked as the configuration is now in your Drupal, and the dependencies are in your composer.

  • fin composer remove kanopi/saplings
  • Export configuration.

Roadmap

Phase 1

Feature complete.

Phase 2

  • kanopi/solr-search-pantheon-recipe - Recipe that installs essential modules for Pantheon SOLR search.
  • Event Content type/Supporting Views
  • Domain Access Recipe
  • Additional components

Development notes:

  • Break Content type and add-on Component types into their own recipes. Once this Drupal issue is resolved.

Other Recipes:

Contributing/Testing

We'd love your help with testing, ideation, and development.

Setting up a quick testing environment

Decide on a name for your testing environment. In this example, I will use kanland.

  • Checkout kanopi/drupal-starter into it's own repo.
  • git clone git@github.com:kanopi/drupal-starter.git kanland && cd kanland
  • Open /.docksal/docksal.env in your editor.
  • Update row 28 hostingsite="kanland" and save.
  • Run fin init
  • The build will fail with the following message as we haven't installed Drupal yet. Error: Class "Drupal\user\Entity\User" not found
  • Run fin drush si minimal -y && fin drush uli to install Drupal and log in.
  • Click on the one-time-login to verify the minimal install happened.
  • Require this repository: fin composer require kanopi/saplings:^1
  • Apply the recipe: fin recipe-apply saplings

To reset after you have done some testing:

  • Run fin init
  • The build will fail with the following message as we haven't installed Drupal yet. Error: Class "Drupal\user\Entity\User" not found
  • Run fin drush si minimal -y && fin drush uli to install Drupal and log in.

Requiring recipes

Use composer the require the recipes needed. We currently host on our packagist.

Applying and Unpacking recipes in Drupal

To apply contrib/composer installed recipes, run the following commands:

fin recipe-apply recipe-name

Each recipe can have composer dependencies. "Unpacking" takes these dependencies from the recipe and applies them to the project's composer.json file.

To unpack contrib/composer installed recipes, run the following commands:

fin recipe-unpack recipe-name

Note: The Drupal core patch is experimental, but it is mainly additions. If you don't want to have that on your production site, the good news is that you don't have to have patch after you've applied and unpacked your recipes. You can simply remove the patch and update core as the recipes are now yours.

Dependency Graph

saplings-graph

Created using JBZoo/Composer-Graph