If you don't want to use Volta, make sure to use the Node version in the
volta.node
key in [./package.json].
Install composer dependencies with Docker:
docker compose up php
Install yarn dependencies:
yarn
yarn build
This will build the plugin and output a version for each platform to the dist
folder.
Follow our Developer Guide for contributing to MyParcel repositories.
You should always run the automated tests.
To run the frontend tests:
yarn test:run
To run the PHP tests:
docker compose run php composer test
These will also be run automatically on GitHub when you create a pull request and must pass before your changes can be merged.
This is only sufficient if you're running WordPress locally and your source directory is inside your wp-content/plugins
folder. If this is not the case, continue to the next section.
Run this after every change:
yarn build
Or run this to monitor your changes and rebuild automatically:
yarn watch
Build plugin files:
yarn build
The folder structure should look like this:
dist
├── myparcelbe
└── myparcelnl
Now zip the plugin folder you want to use, then upload the zip file on the plugins page of your WordPress website to install it.
You can also upload the plugin folder manually using FTP.