Skip to content

Commit 4bec34f

Browse files
committed
WIP
1 parent 609edf7 commit 4bec34f

File tree

19 files changed

+823
-12349
lines changed

19 files changed

+823
-12349
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Below are the steps to guide you through preparing your local environment for th
105105
To begin, ensure you have network access. Then, you'll need the following
106106
1. [Git](https://git-scm.com/)
107107
2. [Node.JS](https://nodejs.org/en/) version >=18 / 20+
108-
3. [Yarn 1](https://classic.yarnpkg.com/en/)
108+
3. [Pnpm](https://pnpm.io/)
109109
4. Alternatively, you can use [Docker](https://www.docker.com/) to build the application.
110110

111111
### Local development
@@ -118,15 +118,15 @@ To begin, ensure you have network access. Then, you'll need the following
118118
```
119119
2. Install the dependencies
120120
```bash
121-
yarn install
121+
pnpm install
122122
```
123123
3. Copy `app/.env.example` to `app/.env` and update the variables
124124
```bash
125125
cp app/.env.example app/.env
126126
```
127127
4. Start the development server
128128
```bash
129-
yarn start:app
129+
pnpm start:app
130130
```
131131
> [!NOTE]\
132132
> To work on a specific development task, ensure you have the backend setup appropriately and configured properly.
@@ -141,7 +141,7 @@ To begin, ensure you have network access. Then, you'll need the following
141141
# Stage all changes
142142
git add .
143143
# Create a changeset (if changes will affect versioning, like new features or bug fixes)
144-
yarn changeset
144+
pnpm changeset
145145

146146
# Commit your changes with a message
147147
git commit -m "some message"
@@ -162,11 +162,11 @@ To begin, ensure you have network access. Then, you'll need the following
162162

163163
1. To build the application for production
164164
```bash
165-
yarn build
165+
pnpm build
166166
```
167167
2. To locally preview the production build
168168
```bash
169-
yarn preview
169+
pnpm preview
170170
```
171171

172172
### CLI Commands
@@ -176,22 +176,22 @@ This repository contains several scripts and commands for performing tasks. The
176176
<details>
177177
<summary>Commands for Running & Building the Web Application</summary>
178178

179-
- `yarn start:app` runs the Local Development Server, listening by default on `http://localhost:3000/`.
180-
- `yarn build` builds the Application in Production mode. The output is by default within the `build` folder.
179+
- `pnpm start:app` runs the Local Development Server, listening by default on `http://localhost:3000/`.
180+
- `pnpm build` builds the Application in Production mode. The output is by default within the `build` folder.
181181
- This is used for Deployments (Preview & Production).
182-
- `yarn preview` previews the production build of the Application.
183-
- `yarn generate:type` generates the Typescript types for the API using `openapi-typescript`. The output is by default within the `generated` folder within the `app` workspace.
184-
- `yarn storybook` starts Storybook's local server for the `@ifrc-go/ui` components library, listening by default on `http://localhost:6006/`.
185-
- `yarn storybook:build` builds Storybook as a static web application for publishing.
186-
- `yarn build:ui` builds the `@ifrc-go/ui` components library. To reflect any new changes in the components library we must ensure that it is built beforehand.
182+
- `pnpm preview` previews the production build of the Application.
183+
- `pnpm generate:type` generates the Typescript types for the API using `openapi-typescript`. The output is by default within the `generated` folder within the `app` workspace.
184+
- `pnpm storybook` starts Storybook's local server for the `@ifrc-go/ui` components library, listening by default on `http://localhost:6006/`.
185+
- `pnpm storybook:build` builds Storybook as a static web application for publishing.
186+
- `pnpm build:ui` builds the `@ifrc-go/ui` components library. To reflect any new changes in the components library we must ensure that it is built beforehand.
187187

188188
</details>
189189

190190
<details>
191191
<summary>Commands for Maintenance Tasks</summary>
192192
Execute the following commands within the `app` workspace.
193193

194-
- `yarn lint` runs the linter for all the css, js, ts, and translation files.
195-
- `yarn turbo lint:fix` attempts to fix any linting errors for css, js and ts files.
196-
- `yarn translatte:generate` generates translation migration file.
194+
- `pnpm lint` runs the linter for all the css, js, ts, and translation files.
195+
- `pnpm turbo lint:fix` attempts to fix any linting errors for css, js and ts files.
196+
- `pnpm translatte:generate` generates translation migration file.
197197
</details>

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Below are the steps to guide you through preparing your local environment for th
2424
To begin, ensure you have network access. Then, you'll need the following:
2525
1. [Git](https://git-scm.com/)
2626
2. [Node.JS](https://nodejs.org/en/) version >=18 / 20+
27-
3. [Yarn 1](https://classic.yarnpkg.com/en/)
27+
3. [Pnpm](https://pnpm.io/)
2828
4. Alternatively, you can use [Docker](https://www.docker.com/) to build the application.
2929

3030
### Local development
@@ -37,15 +37,15 @@ gh repo clone IFRCGo/go-web-app #Github CLI
3737
```
3838
2. Install the dependencies
3939
```bash
40-
yarn install
40+
pnpm install
4141
```
4242
3. Copy `app/.env.example` to `app/.env` and update the variables
4343
```bash
4444
cp app/.env.example app/.env
4545
```
4646
4. Start the development server
4747
```bash
48-
yarn start:app
48+
pnpm start:app
4949
```
5050
## Contributing
5151

app/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.8'
22
services:
33
react:
44
build: .
5-
command: sh -c 'yarn install && yarn start --host'
5+
command: sh -c 'pnpm install && pnpm start --host'
66
volumes:
77
- .:/code
88
ports:

app/package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@
1111
},
1212
"scripts": {
1313
"translatte": "tsx scripts/translatte/main.ts",
14-
"translatte:generate": "yarn translatte generate-migration ../translationMigrations ./src/**/i18n.json ../packages/ui/src/**/i18n.json",
15-
"translatte:lint": "yarn translatte lint ./src/**/i18n.json ../packages/ui/src/**/i18n.json",
16-
"initialize:type": "mkdir -p generated/ && yarn initialize:type:go-api && yarn initialize:type:risk-api",
14+
"translatte:generate": "pnpm translatte generate-migration ../translationMigrations ./src/**/i18n.json ../packages/ui/src/**/i18n.json",
15+
"translatte:lint": "pnpm translatte lint ./src/**/i18n.json ../packages/ui/src/**/i18n.json",
16+
"initialize:type": "mkdir -p generated/ && pnpm initialize:type:go-api && pnpm initialize:type:risk-api",
1717
"initialize:type:go-api": "test -f ./generated/types.ts && true || cp types.stub.ts ./generated/types.ts",
1818
"initialize:type:risk-api": "test -f ./generated/riskTypes.ts && true || cp types.stub.ts ./generated/riskTypes.ts",
19-
"prestart": "yarn initialize:type",
20-
"pretypecheck": "yarn initialize:type",
21-
"prelint:js": "yarn initialize:type",
22-
"prebuild": "yarn initialize:type",
19+
"prestart": "pnpm initialize:type",
20+
"pretypecheck": "pnpm initialize:type",
21+
"prelint:js": "pnpm initialize:type",
22+
"prebuild": "pnpm initialize:type",
2323
"start": "vite",
2424
"build": "vite build",
2525
"preview": "vite preview",
26-
"generate:type": "yarn generate:type:go-api && yarn generate:type:risk-api",
26+
"generate:type": "pnpm generate:type:go-api && pnpm generate:type:risk-api",
2727
"generate:type:go-api": "dotenv -- cross-var openapi-typescript \"%APP_API_ENDPOINT%api-docs/\" -o ./generated/types.ts --alphabetize",
2828
"generate:type:risk-api": "dotenv -- cross-var openapi-typescript \"%APP_RISK_API_ENDPOINT%api-docs/\" -o ./generated/riskTypes.ts --alphabetize",
2929
"typecheck": "tsc",
3030
"lint:js": "eslint src",
3131
"lint:css": "stylelint \"./src/**/*.css\"",
32-
"lint:translation": "yarn translatte:lint",
33-
"lint": "yarn lint:js && yarn lint:css && yarn lint:translation",
34-
"lint:fix": "yarn lint:js --fix && yarn lint:css --fix",
32+
"lint:translation": "pnpm translatte:lint",
33+
"lint": "pnpm lint:js && pnpm lint:css && pnpm lint:translation",
34+
"lint:fix": "pnpm lint:js --fix && pnpm lint:css --fix",
3535
"test": "vitest",
3636
"test:coverage": "vitest run --coverage",
3737
"surge:deploy": "branch=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD); branch=$(echo $branch | tr ./ -); cp ../build/index.html ../build/200.html; surge -p ../build/ -d https://ifrc-go-$branch.surge.sh",
@@ -99,7 +99,6 @@
9999
"postcss-nested": "^6.0.1",
100100
"postcss-normalize": "^10.0.1",
101101
"postcss-preset-env": "^8.3.2",
102-
"postinstall-postinstall": "^2.1.0",
103102
"rollup-plugin-visualizer": "^5.9.0",
104103
"stylelint": "^16.7.0",
105104
"stylelint-config-concentric": "^2.0.2",

app/scripts/translatte/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Developers can change the translations using their preferred choice of editor.
1515

1616
Once all of the changes have been made, we can generate a migration file for the translations using:
1717
```bash
18-
yarn translatte generate-migration ./src/translationMigrations ./src/**/i18n.json
18+
pnpm translatte generate-migration ./src/translationMigrations ./src/**/i18n.json
1919
```
2020
Once the migration file has been created, the migration file can be commited to the VCS.
2121

@@ -26,7 +26,7 @@ the strings in the server.
2626

2727
We can generate the new set of strings for the server using:
2828
```bash
29-
yarn translatte apply-migrations ./src/translationMigrations --last-migration "name_of_last_migration" --source "strings_json_from_server.json" --destination "new_strings_json_for_server.json"
29+
pnpm translatte apply-migrations ./src/translationMigrations --last-migration "name_of_last_migration" --source "strings_json_from_server.json" --destination "new_strings_json_for_server.json"
3030
```
3131

3232
### Merge migrations
@@ -35,19 +35,19 @@ Once the migrations are applied to the strings in the server, we can merge the m
3535

3636
To merge migrations, we can run the following command:
3737
```bash
38-
yarn translatte merge-migrations ./src/translationMigrations --from 'initial_migration.json' --to 'final_migration.json'
38+
pnpm translatte merge-migrations ./src/translationMigrations --from 'initial_migration.json' --to 'final_migration.json'
3939
```
4040

4141
### Checking migrations
4242

4343
We can use the following command to check for valid migrations:
4444
```bash
45-
yarn translatte lint ./src/**/i18n.json
45+
pnpm translatte lint ./src/**/i18n.json
4646
```
4747

4848
### Listing migrations
4949

5050
We can use the following command to list all migrations:
5151
```bash
52-
yarn translatte list-migrations ./src/translationMigrations
52+
pnpm translatte list-migrations ./src/translationMigrations
5353
```

collaborating/building.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ To build different components of the IFRC GO project, use the following commands
66

77
**IFRC GO Web Application**
88
```bash
9-
yarn build
9+
pnpm build
1010
```
1111

1212
**IFRC GO UI Library**
1313
```bash
14-
yarn build:ui
14+
pnpm build:ui
1515
```
1616

1717
**UI Library Storybook**
1818
```bash
19-
yarn build-storybook
19+
pnpm build-storybook
2020
```

collaborating/developing.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For long-running features, create PRs targeting the specific `project/project-x`
99
To begin, ensure you have network access. Then, you'll need the following
1010
1. [Git](https://git-scm.com/)
1111
2. [Node.JS](https://nodejs.org/en/) version >=18 / 20+
12-
3. [Yarn 1](https://classic.yarnpkg.com/en/)
12+
3. [Pnpm](https://pnpm.io/)
1313
4. Alternatively, you can use [Docker](https://www.docker.com/) to build the application.
1414

1515
### Local development
@@ -22,15 +22,15 @@ To begin, ensure you have network access. Then, you'll need the following
2222
```
2323
2. Install the dependencies
2424
```bash
25-
yarn install
25+
pnpm install
2626
```
2727
3. Copy `app/.env.example` to `app/.env` and update the variables
2828
```bash
2929
cp app/.env.example app/.env
3030
```
3131
4. Start the development server
3232
```bash
33-
yarn start:app
33+
pnpm start:app
3434
```
3535
> [!NOTE]\
3636
> To work on a specific development task, ensure you have the backend setup appropriately and configured properly.
@@ -45,7 +45,7 @@ To begin, ensure you have network access. Then, you'll need the following
4545
# Stage all changes
4646
git add .
4747
# Create a changeset (if changes will affect versioning, like new features or bug fixes)
48-
yarn changeset
48+
pnpm changeset
4949

5050
# Commit your changes with a message
5151
git commit -m "some message"
@@ -70,24 +70,24 @@ This repository contains several scripts and commands for performing tasks. The
7070
<details>
7171
<summary>Commands for Running & Building the Web Application</summary>
7272

73-
- `yarn start:app` runs the Local Development Server, listening by default on `http://localhost:3000/`.
74-
- `yarn build` builds the Application in Production mode. The output is by default within the `build` folder.
73+
- `pnpm start:app` runs the Local Development Server, listening by default on `http://localhost:3000/`.
74+
- `pnpm build` builds the Application in Production mode. The output is by default within the `build` folder.
7575
- This is used for Deployments (Preview & Production).
76-
- `yarn preview` previews the production build of the Application.
77-
- `yarn generate:type` generates the Typescript types for the API using `openapi-typescript`. The output is by default within the `generated` folder within the `app` workspace.
78-
- `yarn storybook` starts Storybook's local server for the `@ifrc-go/ui` components library, listening by default on `http://localhost:6006/`.
79-
- `yarn build-storybook` builds Storybook as a static web application for publishing.
80-
- `yarn build:ui` builds the `@ifrc-go/ui` components library. To reflect any new changes in the components library we must ensure that it is built beforehand.
76+
- `pnpm preview` previews the production build of the Application.
77+
- `pnpm generate:type` generates the Typescript types for the API using `openapi-typescript`. The output is by default within the `generated` folder within the `app` workspace.
78+
- `pnpm storybook` starts Storybook's local server for the `@ifrc-go/ui` components library, listening by default on `http://localhost:6006/`.
79+
- `pnpm build-storybook` builds Storybook as a static web application for publishing.
80+
- `pnpm build:ui` builds the `@ifrc-go/ui` components library. To reflect any new changes in the components library we must ensure that it is built beforehand.
8181
</details>
8282

8383
<details>
8484
<summary>Commands for Maintenance Tasks</summary>
8585
Execute the following commands within the `app` workspace.
8686

87-
- `yarn lint` runs the linter for all the css, js, ts, and translation files.
88-
- `yarn lint:fix` attempts to fix any linting errors for css, js and ts files.
89-
- `yarn translatte:generate` generates translation migration file.
90-
- `yarn surge:deploy` builds and deploys the web application to [surge](https://surge.sh/).
87+
- `pnpm lint` runs the linter for all the css, js, ts, and translation files.
88+
- `pnpm lint:fix` attempts to fix any linting errors for css, js and ts files.
89+
- `pnpm translatte:generate` generates translation migration file.
90+
- `pnpm surge:deploy` builds and deploys the web application to [surge](https://surge.sh/).
9191
</details>
9292

9393

collaborating/issues-and-pull-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ git checkout -b feature/new-feature-a develop
2020

2121
Add your changes, ensuring they follow code style guidelines. Run linting, perform type checking, and ensure the build passes.
2222

23-
Run `yarn changeset` in the root of the repository and describe your changes. The resulting files should be committed as they will be used during release.
23+
Run `pnpm changeset` in the root of the repository and describe your changes. The resulting files should be committed as they will be used during release.
2424

2525
>[!NOTE]\
2626
>Review the [Changesets documentation](./release.md#changesets) and the [versioning guidelines](./release.md#versioning-guidelines-for-ifrc-go-project) for more details.

collaborating/linting.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Configuration for ESLint can be found in the [eslint.config.js](../app/eslint.co
1010

1111
To lint your code
1212
```bash
13-
yarn lint:js
13+
pnpm lint:js
1414
```
1515

1616
To automatically fix fixable errors
1717
```bash
18-
yarn lint:js --fix
18+
pnpm lint:js --fix
1919
```
2020

2121
### Stylelint
@@ -24,19 +24,19 @@ Configuration for Stylelint is located in the [stylelint.config.cjs](../app/styl
2424

2525
To lint your CSS files
2626
```bash
27-
yarn lint:css
27+
pnpm lint:css
2828
```
2929

3030
To automatically fix fixable errors
3131
```bash
32-
yarn lint:css --fix
32+
pnpm lint:css --fix
3333
```
3434

3535
### Fixing Lint Errors
3636

3737
To fix auto-fixable errors in both ESLint and Stylelint
3838
```bash
39-
yarn lint:fix
39+
pnpm lint:fix
4040
```
4141

4242
### Type Checking
@@ -46,16 +46,16 @@ yarn lint:fix
4646
4747
To generate the TypeScript types for API endpoints
4848
```bash
49-
yarn generate:type
49+
pnpm generate:type
5050
```
5151
To verify and enforce TypeScript type constraints
5252
```bash
53-
yarn typecheck
53+
pnpm typecheck
5454
```
5555

5656
### Linting Translation Files
5757

5858
To check for errors in translation files
5959
```bash
60-
yarn lint:translation
60+
pnpm lint:translation
6161
```

0 commit comments

Comments
 (0)