This is a guide for software engineers who wish to take part in the development of this product.
This project declares all of its dependencies, and configures a Docker environment. Follow the
steps described below to set everything up. For more information about the environment, see
template package wp-oop/plugin-boilerplate
.
-
Clone the repo, if you haven't already.
-
Copy
.env.example
to.env
.On most systems, this should be enough. Tweak values if necessary.
-
Map the project domain.
In your
hosts
file, map the host of the Docker machine (for Docker Desktop users it's localhost) to the value of theWP_DOMAIN
env variable. -
Install PHP dependencies with Composer.
Use the PHPStorm integration, or CLI. Either way, All operations with Composer have to be done in the
composer
service and the corresponding PHPStorm remote interpreter. -
Install JS dependencies with Yarn.
Use the PHPStorm integration, or CLI. Either way, All operations with Yarn have to be done in the
build
service. -
Install Tools with Phive
Run
phive install --force-accept-unsigned
in thebuild
service. -
Process the assets.
Many assets like JS and CSS files exist in source form in the repo. In order for the plugin to be able to use them, they need to be processed, and the result to be added to the correct folder. Running
gulp buildAssets
in thebuild
service will take care of that, pupulating thepublic
folder with processed assets. -
Bring up the environment.
docker-compose up -d wp_dev
This will install and configure the WP instance, including any required plugins.