From ed07209f628b92f7f060026aa5c99ee5915cd87b Mon Sep 17 00:00:00 2001 From: Isabel Costa <11148726+isabelcosta@users.noreply.github.com> Date: Sat, 13 Jul 2024 13:49:46 +0100 Subject: [PATCH 1/2] specify node version --- .github/workflows/build.yaml | 6 +++--- .github/workflows/deploy.yaml | 2 +- .nvmrc | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1ffd126..db7af3c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: npm install - run: npm run lint:fix @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: npm install - run: npm run test:ci @@ -35,6 +35,6 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: npm install - run: npm run build diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index aeb48e2..8b32c98 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: - name: Uses Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: npm install - run: npm run lint:fix - run: npm run build --if-present diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..85aee5a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20 \ No newline at end of file From f900cf3029b2d757f6510044776b0a0602055d9c Mon Sep 17 00:00:00 2001 From: Isabel Costa <11148726+isabelcosta@users.noreply.github.com> Date: Sat, 13 Jul 2024 14:09:25 +0100 Subject: [PATCH 2/2] update node version --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 05693d8..abb6578 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Este repositório contém o código do nosso website [raparigasdocodigo.pt](http > > | Script | Description | > | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +> | `npm use` | Specify node version to use locally. In case you don't have the version specified, you can run `nvm install ` | > | `npm install` | Installs dependencies necessaries to run the app. | > | `npm start` | Runs the app in development mode. Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | > | `npm run build` | Builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes. | @@ -47,6 +48,7 @@ No diretório do projeto, podes executar: | Comando | Descrição | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `npm use` | Define a versão do Node a usar localmente. Caso não tenhas a versão especificada, podes instalar a versão com `nvm install ` | | `npm install` | Instala as dependências necessárias para executar a aplicação. | | `npm start` | Compila a aplicação em modo de desenvolvimento. Abre [http://localhost:3000](http://localhost:3000) para visualizares no teu browser. | | `npm run build` | Compila a app na pasta `build`. Isto integra corretamente a biblioteca React no modo de produção e otimiza a compilação para o melhor desempenho. A compilação é minificada e os nomes dos arquivos incluem os hashes. |