fix: harden CHRNX theme tooling
This commit is contained in:
5 files changed
+55
-256
No files matched your search
@@ -7,7 +7,6 @@ approved design materials and a reproducible local development scaffold.
|
||||
|
||||
- Node.js 22 (use `nvm use`)
|
||||
- npm
|
||||
- Composer dependencies are installed inside the wp-env CLI container
|
||||
- Docker through Colima on macOS
|
||||
- Docker Compose v2 available as a Docker CLI plugin
|
||||
|
||||
@@ -15,13 +14,16 @@ approved design materials and a reproducible local development scaffold.
|
||||
|
||||
```sh
|
||||
nvm use
|
||||
npm install
|
||||
npm ci
|
||||
npx playwright install chromium firefox webkit
|
||||
colima start
|
||||
PATH="/opt/homebrew/opt/docker/bin:$PATH" npm run env:start
|
||||
PATH="/opt/homebrew/opt/docker/bin:$PATH" npm run composer -- install
|
||||
```
|
||||
|
||||
Composer is provided by the wp-env CLI container; no host Composer installation
|
||||
is required.
|
||||
|
||||
The local WordPress site is available at <http://localhost:8888>. Once the
|
||||
theme implementation exists, activate it with `npm run env:activate`.
|
||||
|
||||
@@ -37,8 +39,19 @@ If Homebrew's Docker CLI cannot find an existing standalone Compose v2 binary,
|
||||
link it into Docker's per-user plugin directory before starting wp-env:
|
||||
|
||||
```sh
|
||||
mkdir -p "$HOME/.docker/cli-plugins"
|
||||
ln -s /usr/local/bin/docker-compose "$HOME/.docker/cli-plugins/docker-compose"
|
||||
compose_source="$(command -v docker-compose)" || {
|
||||
echo "docker-compose is not installed" >&2
|
||||
exit 1
|
||||
}
|
||||
docker-compose version
|
||||
plugin_dir="${DOCKER_CONFIG:-$HOME/.docker}/cli-plugins"
|
||||
plugin_path="$plugin_dir/docker-compose"
|
||||
if [ -e "$plugin_path" ] || [ -L "$plugin_path" ]; then
|
||||
echo "Refusing to replace existing $plugin_path" >&2
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p -- "$plugin_dir"
|
||||
ln -s -- "$compose_source" "$plugin_path"
|
||||
```
|
||||
|
||||
## Deployment boundary
|
||||
|
||||
Reference in new issue
Block a user