Skip to content

Drupal recipe to start a build project. Designed to work well with kanopi/drupal-starter.

License

Notifications You must be signed in to change notification settings

kanopi/saplings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Phase 3

Investigate extending Drupal CMS' recipes.

Other Kanopi Recipes:

Other Saplings related modules

  • kanopi/saplings_navbar - Creates a navbar pattern for Saplings that allows the parent to be a link and then have a dropdown indicator to access child menu items.

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