Developer Setup¶
The following describes how to set up an instance of the site on your computer for development.
Prerequisites¶
This guide assumes you have already installed and set up the following:
- Git
- Node.js 8 and Yarn.
- Python 2.7 or higher
These docs assume a Unix-like operating system, although the site should, in theory, run on Windows as well. All the example commands given below are intended to be run in a terminal.
Installation¶
Clone this repository or your fork:
git clone https://github.com/mozilla/delivery-console.git cd delivery-console
Install the dependencies using yarn:
yarn install
Once you’ve finished these steps, you should be able to start the site by running:
yarn start
The site should be available at http://localhost:3000/.
Therapist¶
If you want to automatically enforce Delivery Console’s code style guidelines, you can use the Therapist pre-commit hook.
You could install Therapist in a virtualenv using pip but if you are installing it globally we recommend using pipsi:
pipsi install therapist
After that, you should be able to run the following to set up the git pre-commit hook:
therapist install
After that, whenever you make a new commit Therapist will check the changed code. This will save time when submitting pull requests.
If you want Therapist to attempt to automatically fix linting issues you can install the hook using:
therapist install --fix
If you ever need to bypass Therapist, you can do so by passing
--no-verify
to your git commit
command.