Skip to content

Commit f7d1dd4

Browse files
Merge pull request #16 from codify-community/build/use-pnpm-instead-of-npm
Build: use pnpm instead of npm
2 parents 13f9009 + 1f12046 commit f7d1dd4

File tree

6 files changed

+3269
-5173
lines changed

6 files changed

+3269
-5173
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ jobs:
1010
- name: Checkout
1111
uses: actions/checkout@v4
1212

13+
- name: Setup pnpm
14+
uses: pnpm/action-setup@v4
15+
with:
16+
version: 10
17+
run_install: false
18+
1319
- name: Setup Node.js
1420
uses: actions/setup-node@v4
1521
with:
1622
node-version: 20
17-
cache: 'npm'
23+
cache: 'pnpm'
1824

1925
- name: Install dependencies
20-
run: npm install
26+
run: pnpm install
2127

2228
- name: Lint
23-
run: npx prisma generate && npm run build
29+
run: pnpm dlx prisma generate && pnpm run build

.github/workflows/validations.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ jobs:
1010
- name: Checkout
1111
uses: actions/checkout@v4
1212

13+
- name: Setup pnpm
14+
uses: pnpm/action-setup@v4
15+
with:
16+
version: 10
17+
run_install: false
18+
1319
- name: Setup Node.js
1420
uses: actions/setup-node@v4
1521
with:
1622
node-version: 20
17-
cache: 'npm'
23+
cache: 'pnpm'
1824

1925
- name: Install dependencies
20-
run: npm install
26+
run: pnpm install
2127

2228
- name: Lint
23-
run: npx prisma generate && npm run lint
29+
run: pnpm dlx prisma generate && pnpm run lint

DATABASE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ DATABASE_URL="postgresql://usuario:senha@localhost:5432/nome_do_banco"
2222

2323
| Ação | Comando |
2424
|----------------------------|--------------------------------------------------------|
25-
| Gerar nova migration | `npx prisma migrate dev --name nome_da_migration` |
26-
| Aplicar migrations (prod) | `npx prisma migrate deploy` |
27-
| Regenerar client Prisma | `npx prisma generate` |
28-
| Acessar interface visual | `npx prisma studio` |
25+
| Gerar nova migration | `pnpm dlx prisma migrate dev --name nome_da_migration` |
26+
| Aplicar migrations (prod) | `pnpm dlx prisma migrate deploy` |
27+
| Regenerar client Prisma | `pnpm dlx prisma generate` |
28+
| Acessar interface visual | `pnpm dlx prisma studio` |
2929

3030
---
3131

@@ -34,8 +34,8 @@ DATABASE_URL="postgresql://usuario:senha@localhost:5432/nome_do_banco"
3434
Após clonar o projeto, configurar o `.env` e rodar:
3535

3636
```bash
37-
npm install
38-
npx prisma migrate deploy
37+
pnpm install
38+
pnpm dlx prisma migrate deploy
3939
```
4040

4141
O projeto já está disponível para uso!

DEVELOPMENT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ Os IDS basta entrar no discord e clicar com o botão direito no bot e no servido
2727
Instale as dependências:
2828

2929
```bash
30-
npm install
30+
pnpm install
3131
```
3232

3333
Agora leia atentamente o [DATABASE.md](https://github.com/codify-community/codify-bot/blob/main/DATABASE.md) para entender a configuracao local do banco de dados
3434

3535
E rode no seu PC :
3636

3737
```bash
38-
npm run start:dev
38+
pnpm run start:dev
3939
```
4040

4141
Compile para produção:
4242

4343
```bash
44-
npm run build
44+
pnpm run build
4545
```
4646

4747
Rode a versão compilada:
4848

4949
```bash
50-
npm start
50+
pnpm run start
5151
```
5252

5353
---

0 commit comments

Comments
 (0)