Skip to content

Latest commit

 

History

History
101 lines (64 loc) · 2.04 KB

CONTRIBUTING.md

File metadata and controls

101 lines (64 loc) · 2.04 KB

Contributing

Prerequisites

If you don't want to use Volta, make sure to use the Node version in the volta.node key in [./package.json].

Steps

Install dependencies

Install composer dependencies with Docker:

docker compose up php

Install yarn dependencies:

yarn

Build the module

yarn build

This will build the module and output a version for each platform to the dist folder.

Make your changes

Follow our Developer Guide for contributing to MyParcel repositories.

Test your changes

Automated tests

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.

Manual testing

Using a local PrestaShop instance

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
Using a remote PrestaShop instance

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.