Skip to content

Commit

Permalink
Merge branch 'release/0.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisCarden committed Aug 20, 2024
2 parents 7788b61 + 2b0b773 commit b5af835
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 17 deletions.
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.

Expand All @@ -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
```
2 changes: 1 addition & 1 deletion commands/host/.xb-command-include
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion commands/host/xb-setup
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions commands/web/xb-npm-build
Original file line number Diff line number Diff line change
@@ -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
10 changes: 0 additions & 10 deletions commands/web/xb-npm-ci

This file was deleted.

2 changes: 1 addition & 1 deletion install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b5af835

Please sign in to comment.