-
Create a new GitHub personal access token with the following scopes:
read:packages
-
Set env variable
SANCTUARYTEAM_AUTH_TOKEN
to the token value. You should runcp .env.example .env
and modify this new file to store your token. -
Run
yarn install
yarn dev
Make sure Docker is installed.
If you are on Windows, you should be running the files from within a WSL container. Otherwise, you will not be able to hot reload and file access will be slow.
- Start Ubuntu (or the distro you installed with WSL/Docker)
- Checkout the repositories or copy it from your local filesystem
cp -r /mnt/c/Users/username/Documents/sanctuaryteam/ ~/
(your file path may vary) - Enter the folder in the command line
cd ~/sanctuaryteam/web-app
- Run the following command to start development:
docker compose up
- To modify the files on your Windows machine install Remote WSL for VS Code
- In your WSL instance, run
code .
inside of theweb-app
folder. - Start VS Code and select the Remote Explorer from the left-hand side, and choose the web-app.
docker-compose run web-app yarn add my-package --dev
yarn run format
- Add localizations in English using the string templating pattern that is throughout the project
- Run
yarn lingui:extract
to extract the English words to hashes. - Update any localization
.json
files found insrc/modules/common/i18n
, this folder is auto-generated. - Once you have updated the
.json
files runyarn lingui:compile
. - Check in the changes in a PR
After a Unit test execution, a coverage folder will be created. Reports will be displayed in the output. an HTML copy you can open in a boewser will be located here "coverage/unit/src/index.html"
- Execute Unit tests
- Will run all files with *.test.ts
yarn run test:unit
- Execute unit tests and provide coverage
- After a Unit test execution, a coverage folder will be created.
- Reports will be displayed in the output.
- An HTML copy you can open in a boewser will be located here "coverage/unit/src/index.html"
yarn run test:coverage