wporg-developer
wporg-developer copied to clipboard
WordPress.org Developer theme
Developer.WordPress.org Theme
Development
Prerequisites
- Docker
- Node/npm
- Yarn
- Composer
Setup
-
Set up repo dependencies.
yarn setup:tools -
Build the assets. If there's anything that needs setting up.
yarn build -
Start the local environment.
yarn wp-env start -
Run the setup script.
yarn setup -
Visit site at localhost:8888.
-
Log in with username
adminand passwordpassword.
Environment management
These must be run in the project's root folder, not in theme/plugin subfolders.
-
Stop the environment.
yarn wp-env stop -
Restart the environment.
yarn wp-env start -
Open a shell inside the docker container.
yarn wp-env run wordpress bash -
Run wp-cli commands. Keep the wp-cli command in quotes so that the flags are passed correctly.
yarn wp-env run cli "post list --post_status=publish" -
Update composer dependencies and sync any
repo-toolschanges.yarn update:tools -
Watch for SCSS changes and rebuild the CSS as needed.
yarn start:theme -
Parse the code reference again. This is run as part of the project setup.
yarn parse
Asset management
- Build assets once:
yarn build:theme - Watch assets and build on changes:
yarn start:theme