From 1e53adc135cbcdfe16166ca6e3016490bbc0c1d2 Mon Sep 17 00:00:00 2001 From: Adrian Mucha Date: Thu, 6 Jun 2024 08:46:09 +0200 Subject: [PATCH] Add section about development best practices to CONTRIBUTING (#1337) Co-authored-by: Konrad Bosak --- .github/CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6f7dde4dc..4279d9471 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -30,6 +30,42 @@ Our kanban board is public and available [here](https://github.com/orgs/vazco/pr - Make sure you have added the necessary tests for your changes. Do not worry though, the Codecov bot will report it in the pull request. - Make sure your code passes _all_ tests: `npm test`. +### Development + +For the best local developer experience (DX) it is recommended to start `build` and `test` in `--watch` mode. + +Run the commands below in the root directory. + +#### Running the build in watch mode + +```sh +npm run build -- --watch +``` + +#### Running the tests in watch mode + +```sh +npm run test -- --watch +``` + +#### Fixing lint issues automatically + +```sh +npm run lint:code -- --fix +``` + +#### Making changes to the documentation website (docusaurus) + +The local version of docs will use the locally built version of uniforms, so make sure to run the build in watch mode for live changes. + +Navigate to `/website` and run + +```sh +npm start +``` + +It will start the docusaurus in development mode supporting hot reload so you should see the changes made to the website immediately. + ## _Work in progress_ PRs are also welcome If you can't or won't finish your PR, submit it anyway - maybe someone else will continue your work. If you don't know how to achieve your desired feature - file an issue for it - maybe someone else will implement it.