From 349bb666aeeb5759c9d3f759d9aa2c30b15b5230 Mon Sep 17 00:00:00 2001 From: Fredrik Lassen Date: Wed, 25 Feb 2026 13:50:22 +0100 Subject: [PATCH 1/2] #22 - fix scaffolding and playwright install --- commands/host/1x-playwright-install | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/commands/host/1x-playwright-install b/commands/host/1x-playwright-install index ba76839..ac07192 100755 --- a/commands/host/1x-playwright-install +++ b/commands/host/1x-playwright-install @@ -7,17 +7,11 @@ start=`date +%s` # Colors for printing messages. -RED='\033[0;31m' -CYAN='\033[0;36m' GREEN='\033[0;32m' -BROWN='\033[0;33m' NC='\033[0m' # No Color -echo -e "${GREEN}Installing playwright (within DDEV):${NC}" -ddev add-on get lullabot/ddev-playwright -ddev restart - -ddev exec -d /var/www/html/ "mkdir -p test/playwright" +# Make sure the container is alive. +ddev start # Let's make sure @dxp-scoped package registry is defined as it required in the starterkit below. DXP_REGISTRY=$(ddev exec "npm config get @dxp:registry") @@ -27,8 +21,17 @@ if [ -z "$DXP_REGISTRY" ] ; then exit 1 fi -# Use our forked starterkit https://github.com/1xINTERNET/create-dxp-playwright to scaffold. -ddev exec -d /var/www/html/test/playwright "npx --yes @1xinternet/create-dxp-playwright --lang=Javascript --quiet" +echo -e "${GREEN}Installing playwright (within DDEV):${NC}" +ddev add-on get lullabot/ddev-playwright +ddev restart + +# Make sure we have a test/playwright-folder. +ddev exec -d /var/www/html/ "mkdir -p test/playwright" +# Empty JSON so the `ddev install-playwright` actually installs. +ddev exec -d /var/www/html/test/playwright 'echo "{}" > ./package.json' # Install playwright *inside* the ddev container (see lullabot/ddev-playwright) -ddev install-playwright \ No newline at end of file +ddev install-playwright + +# Use our forked starterkit https://github.com/1xINTERNET/create-dxp-playwright to scaffold. +ddev exec -d /var/www/html/test/playwright "npx --yes 1xINTERNET/create-dxp-playwright --lang=Javascript --quiet" \ No newline at end of file From 9e9336747a9e8ded77fd2eedb6413674c09d6bfe Mon Sep 17 00:00:00 2001 From: Alex Stanciu Date: Thu, 26 Feb 2026 17:53:46 +0200 Subject: [PATCH 2/2] #22: Add mutagen sync if enabled --- commands/host/1x-playwright-install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/host/1x-playwright-install b/commands/host/1x-playwright-install index ac07192..62368b4 100755 --- a/commands/host/1x-playwright-install +++ b/commands/host/1x-playwright-install @@ -25,13 +25,17 @@ echo -e "${GREEN}Installing playwright (within DDEV):${NC}" ddev add-on get lullabot/ddev-playwright ddev restart +[ "${DDEV_MUTAGEN_ENABLED:-}" = "true" ] && ddev mutagen sync # Make sure we have a test/playwright-folder. ddev exec -d /var/www/html/ "mkdir -p test/playwright" # Empty JSON so the `ddev install-playwright` actually installs. +[ "${DDEV_MUTAGEN_ENABLED:-}" = "true" ] && ddev mutagen sync ddev exec -d /var/www/html/test/playwright 'echo "{}" > ./package.json' +[ "${DDEV_MUTAGEN_ENABLED:-}" = "true" ] && ddev mutagen sync # Install playwright *inside* the ddev container (see lullabot/ddev-playwright) ddev install-playwright +[ "${DDEV_MUTAGEN_ENABLED:-}" = "true" ] && ddev mutagen sync # Use our forked starterkit https://github.com/1xINTERNET/create-dxp-playwright to scaffold. -ddev exec -d /var/www/html/test/playwright "npx --yes 1xINTERNET/create-dxp-playwright --lang=Javascript --quiet" \ No newline at end of file +ddev exec -d /var/www/html/test/playwright "npx --yes 1xINTERNET/create-dxp-playwright --lang=Javascript --quiet"