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 module 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 PrestaShop locally and your source directory is inside your modules
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 module files:
yarn build
The folder structure should look like this:
dist
├── myparcelbe
└── myparcelnl
Now zip the module folder you want to use, then upload the zip file on the modules page of your PrestaShop website to install it.
You can also upload the module folder manually using FTP.