This is an opinionated starter kit for doing composer-based Drupal development with DDEV & VS Code. Main points:
-
ProjectName.code-workspace
This is the settings for VS Code, featuring a multi-root workspace setup, some setting overrides, an xDebug listener, and a handful of recommended extensions
-
.ddev/config.yaml
Default settings from DDEV, with pre-start, post-start, and post-db-import hooks
-
composer.json
Default drupal/recommended-project composer template with additions
-
Added packages
cweagans/composer-patches
to allow patch-handling in composer. Also added relevant composer config.drush/drush:^10
-
Prevent Drupal scaffold from overwriting development.services.yml
To apply patches to your project, add objects to the
patches
section of composer.json"patches": { "drupal/core": { "#issueid: Issue Title": "https://drupal.org/link/to/patch.patch", "#xxxxx: Other Issue Title": "https://drupal.org/link/to/otherpatch.patch" }, "drupal/package_name": { "#yyyyyy: Module Issue Title": "https://drupal.org/link/to/mod_patch.patch" } }
-
-
/web/sites/development.services.yml
Add
twig.config
settings for local development. For this file to be useful, you'll need to createsettings.local.php
fromexample.settings.local.php
and include that file from within yoursettings.php
.
This pro project is not intended to be something you should clone/fork and start working on drupal from. This is intended to be a reference source to set up your own local development environment and copy/paste useful parts from
- Have Composer, DDEV, VS Code installed
- Start a new Drupal project using the recommended-project template
- D9:
composer create-project drupal/recommended-project my-project
- D8:
composer create-project drupal/recommended-project:^8.0 my-project
-
cd
into your new project's directory and runddev config
. Follow the prompts. -
Copy
ProjectName.code-workspace
to your project root and rename however you like. Double-click the file and once the workspace loads, customize your folder paths, settings, and recommended extensions as needed.
I'm open to PRs, or fork this repo and customize your settings/extensions/etc.