From 9f4578d19b7dc73b7bb91b3d27e9b321ec6aba29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=A9na=20Proxima?= <adam@phenaproxima.net> Date: Sun, 22 Sep 2024 21:50:24 -0400 Subject: [PATCH] Replace quick-start with launch commands --- project_template/.ddev/commands/host/quick-start | 10 ---------- project_template/.ddev/config.yaml | 3 +++ project_template/composer.json | 7 ++++--- 3 files changed, 7 insertions(+), 13 deletions(-) delete mode 100755 project_template/.ddev/commands/host/quick-start diff --git a/project_template/.ddev/commands/host/quick-start b/project_template/.ddev/commands/host/quick-start deleted file mode 100755 index a91590586..000000000 --- a/project_template/.ddev/commands/host/quick-start +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -## Description: Installs Drupal CMS and opens it in a browser. - -set -e - -ddev start -ddev composer install -ddev drush site:install --yes -test -n "$CI" || ddev launch diff --git a/project_template/.ddev/config.yaml b/project_template/.ddev/config.yaml index c5014fb8a..49e5f9727 100644 --- a/project_template/.ddev/config.yaml +++ b/project_template/.ddev/config.yaml @@ -16,6 +16,9 @@ web_environment: [] nodejs_version: "16" corepack_enable: false ddev_version_constraint: '>= 1.23.0' +hooks: + post-start: + - exec: 'test -d vendor || composer install' # Key features of DDEV's config.yaml: diff --git a/project_template/composer.json b/project_template/composer.json index 8a6023208..0bccf2e0a 100644 --- a/project_template/composer.json +++ b/project_template/composer.json @@ -71,7 +71,7 @@ "<bg=blue;fg=white> </>", "", "<bg=yellow;fg=black>Next steps</>:", - " * Run <fg=yellow>composer quick-start</> to initialize Drupal CMS and open it in a browser", + " * Run <fg=yellow>composer launch</> to open a browser and install Drupal CMS", " * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html", " * Get support: https://drupal.org/support", " * Get involved with the Drupal community: https://drupal.org/getting-involved" @@ -79,8 +79,9 @@ } }, "scripts": { - "quick-start": [ - "@php ./web/core/scripts/drupal quick-start drupal_cms_installer" + "launch": [ + "@composer install", + "@php -S localhost:8888 -t web ./web/.ht.router.php" ] } } -- GitLab