diff --git a/README.md b/README.md index efdc5df..a81e79d 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ These instructions create a new project from scratch. The add-on cannot be added Obviously, this requires a working [DDEV](https://ddev.com/) installation. ### Docker provider -This has been successfully tested with Orbstack, Colima, and Docker Desktop. Colima and Docker Desktop work out-of-the-box. Orbstack requires one change: +This has been successfully tested with Orbstack, Colima, Rancher Desktop, and Docker Desktop. Colima and Docker Desktop work out-of-the-box. Orbstack and Rancher Desktop each require an extra step: #### Orbstack @@ -31,6 +31,15 @@ web_environment: - DISPLAY=host.orb.internal:0 ``` +#### Rancher Desktop + +Override the default `$DISPLAY` environment variable in the container by adding the following to your `.ddev/config.yaml` file: + +```yaml +web_environment: + - DISPLAY=host.rancher-desktop.internal:0 +``` + ### XQuartz The XQuartz X Window System is required for Cypress testing on macOS. You can skip this step if you do not intend to run Cypress--if you only plan to do backend development or user testing, for example. You can return to it later if you change your mind. @@ -94,10 +103,10 @@ To log into Drupal, run: ddev drush uli ``` -To clean-install the module's UI app, i.e., rebuild its front-end assets, run the following. Do this whenever you pull upstream changes to the module. +To clean-install and build the module's UI app assets, run the following. Do this whenever you pull upstream changes to the module. ```shell -ddev xb-npm-ci +ddev xb-npm-build ``` To completely reinstall Drupal and the Experience Builder module, run: @@ -149,7 +158,7 @@ No, not currently; and there are no plans at present to support it. See [Support If you get an error like the below when attempting to run Cypress on macOS... - Confirm that you have carefully followed _all_ the instructions under [Cypress](#cypress). -- If you're using Orbstack, take [the special steps outlined above](#orbstack). +- See if your [Docker provider](#docker-provider) above requires any special configuration. If these don't resolve the issue, see [Support & community](#support--community) above. @@ -173,3 +182,15 @@ Cypress Version: 13.12.0 Failed to execute command node_modules/.bin/cypress open --browser electron --project .: exit status 1 Failed to run xb-cypress-open ; error=exit status 1 ``` + +### What if I get an HTTPS error? + +If this is your first time using DDEV, you may get an error like the following when you try to visit your site. If so, you need to configure your OS and browser to trust the root certificate authority that DDEV uses. See [DDEV Installation](https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/). + +``` +This site can't be reached + +The webpage at https://example.com/ might be temporarily down or it may have moved permanently to a new web address. + +ERR_SSL_UNRECOGNIZED_NAME_ALERT +``` diff --git a/commands/host/.xb-command-include b/commands/host/.xb-command-include index d97072f..d737234 100644 --- a/commands/host/.xb-command-include +++ b/commands/host/.xb-command-include @@ -13,7 +13,7 @@ # Exit as soon as one command returns a non-zero exit code. set -e -# TODO: Check for the presence of Cypress and instruct the user to run `ddev xb-npm-ci` and try again if not. +# TODO: Check for the presence of Cypress and instruct the user to run `ddev xb-npm-build` and try again if not. # Fails if XQuartz is not installed. function assert_xquartz_is_installed { diff --git a/commands/host/xb-setup b/commands/host/xb-setup index 141ed71..dd869cc 100755 --- a/commands/host/xb-setup +++ b/commands/host/xb-setup @@ -75,7 +75,7 @@ printf '\n# Allow test modules and themes to be installed.\n$settings["extension >> web/sites/default/settings.ddev.php # Build front-end assets. -ddev xb-npm-ci +ddev xb-npm-build # Install DDEV Selenium Standalone Chrome ddev get ddev/ddev-selenium-standalone-chrome diff --git a/commands/web/xb-npm-build b/commands/web/xb-npm-build new file mode 100755 index 0000000..223eb31 --- /dev/null +++ b/commands/web/xb-npm-build @@ -0,0 +1,11 @@ +#!/bin/bash + +## #ddev-generated +## Description: Clean-install and build Experience Builder's UI app assets. +## Example: ddev xb-npm-build +## Aliases: npm-build,npm:build + +cd "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/contrib/experience_builder/ui" || exit 1 + +npm ci +npm run build diff --git a/commands/web/xb-npm-ci b/commands/web/xb-npm-ci deleted file mode 100755 index 43fcebf..0000000 --- a/commands/web/xb-npm-ci +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -## #ddev-generated -## Description: Clean-install Experience Builder's UI app. -## Example: ddev xb-npm-ci -## Aliases: npm-ci,npm:ci - -cd "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/contrib/experience_builder/ui" || exit 1 - -npm ci diff --git a/install.yaml b/install.yaml index a9bf891..5a556fe 100644 --- a/install.yaml +++ b/install.yaml @@ -11,7 +11,7 @@ project_files: - commands/host/xb-cypress-run - commands/host/xb-setup - commands/web/xb-drush-si - - commands/web/xb-npm-ci + - commands/web/xb-npm-build - config.drupal-xb-dev.yaml post_install_actions: