🔧 Migrate from npm to Bun (#2097)

This commit is contained in:
Alejandra
2026-01-20 22:35:30 +01:00
committed by GitHub
parent ab7c28c038
commit fb2a02345b
13 changed files with 989 additions and 6815 deletions

View File

@@ -2,42 +2,15 @@
The frontend is built with [Vite](https://vitejs.dev/), [React](https://reactjs.org/), [TypeScript](https://www.typescriptlang.org/), [TanStack Query](https://tanstack.com/query), [TanStack Router](https://tanstack.com/router) and [Tailwind CSS](https://tailwindcss.com/).
## Frontend development
## Requirements
Before you begin, ensure that you have either the Node Version Manager (nvm) or Fast Node Manager (fnm) installed on your system.
- [Bun](https://bun.sh/) (recommended) or [Node.js](https://nodejs.org/)
* To install fnm follow the [official fnm guide](https://github.com/Schniz/fnm#installation). If you prefer nvm, you can install it using the [official nvm guide](https://github.com/nvm-sh/nvm#installing-and-updating).
* After installing either nvm or fnm, proceed to the `frontend` directory:
## Quick Start
```bash
# If using fnm
fnm install
# If using nvm
nvm install
```
* Once the installation is complete, switch to the installed version:
```bash
# If using fnm
fnm use
# If using nvm
nvm use
```
* Within the `frontend` directory, install the necessary NPM packages:
```bash
npm install
```
* And start the live server with the following `npm` script:
```bash
npm run dev
bun install
bun run dev
```
* Then open your browser at http://localhost:5173/.
@@ -89,7 +62,7 @@ But it would be only to clean them up, leaving them won't really have any effect
* To generate the frontend client, run:
```bash
npm run generate-client
bun run generate-client
```
* Commit the changes.
@@ -128,13 +101,13 @@ docker compose up -d --wait backend
Then, you can run the tests with the following command:
```bash
npx playwright test
bunx playwright test
```
You can also run your tests in UI mode to see the browser and interact with it running:
```bash
npx playwright test --ui
bunx playwright test --ui
```
To stop and remove the Docker Compose stack and clean the data created in tests, use the following command: