Environments: Add Browse Happy wp-env local development environment#668
Environments: Add Browse Happy wp-env local development environment#668pkevan wants to merge 1 commit into
Conversation
Adds a wp-env configuration for the Browse Happy site (https://browsehappy.com), including an after-start script that sets the site title and description and activates the theme, plus a documentation entry and a `browsehappy:env` npm script. Props JamieBradders.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull request overview
Adds a new wp-env-based local development environment under environments/ for the Browse Happy site, following the existing pattern used for other WordPress.org local environments (notably jobs).
Changes:
- Adds
environments/browsehappy/.wp-env.jsonand anafter-start.shlifecycle script to bootstrap and activate the Browse Happy theme. - Adds an npm script (
browsehappy:env) to run the environment viawp-env. - Documents the new environment in
environments/README.md.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| environments/README.md | Documents how to start and access the new Browse Happy environment. |
| environments/package.json | Adds browsehappy:env npm script pointing at the new config. |
| environments/browsehappy/bin/after-start.sh | Post-start bootstrap: sets site title/description and activates the theme. |
| environments/browsehappy/.wp-env.json | New wp-env configuration for Browse Happy theme mount and lifecycle script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "core": "WordPress/WordPress#master", | ||
| "phpVersion": "8.4", | ||
| "testsEnvironment": false, | ||
| "themes": ["../browsehappy.com/public_html"], | ||
| "lifecycleScripts": { | ||
| "afterStart": "bash browsehappy/bin/after-start.sh" | ||
| }, | ||
| "config": { | ||
| "WP_DEBUG": true | ||
| } | ||
| } |
Adds a wp-env configuration for the Browse Happy site (https://browsehappy.com), mirroring the existing
jobsenvironment:environments/browsehappy/.wp-env.json— environment config (WordPress core, PHP 8.4, mounts the Browse Happy theme).environments/browsehappy/bin/after-start.sh— after-start script that sets the site title/description and activates the theme.environments/package.json— adds thebrowsehappy:envnpm script.environments/README.md— documents how to start and access the environment.Start:
npm run browsehappy:env start(fromenvironments/) → http://localhost:8888I verified locally that a fresh
wp-envstart brings the site up with the Browse Happy theme correctly activated.This recreates #666 so it can be merged from here. All of the work is Jamie's.
Props @JamieBradders.