Skip to content

Commit

Permalink
feat: move to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorusclarence committed Jan 7, 2024
1 parent fba0982 commit b5ac92d
Show file tree
Hide file tree
Showing 7 changed files with 7,988 additions and 6,974 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,28 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: 🤌 Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: 📥 Download deps
uses: u0reo/npm-install@fix/restore-failure
with:
useRollingCache: true
run: pnpm install --frozen-lockfile

- name: 🔬 Lint
run: yarn lint:strict
run: pnpm run lint:strict

- name: 🔎 Type check
run: yarn typecheck
run: pnpm run typecheck

- name: 💅 Prettier check
run: yarn format:check
run: pnpm run format:check

- name: 🃏 Run jest
run: yarn test
run: pnpm run test
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn
pnpm install
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
Expand All @@ -36,3 +37,5 @@ yarn-error.log*

# changelog
CHANGELOG.md

pnpm-lock.yaml
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ You can also check all of the **details and demos** on my blog post:

### 2. Install dependencies

It is encouraged to use **yarn** so the husky hooks can work properly.
It is encouraged to use **pnpm** so the husky hooks can work properly.

```bash
yarn install
pnpm install
```

### 3. Run the development server

You can start the server using this command:

```bash
yarn dev
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `src/pages/index.tsx`.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "eslint src --fix && yarn format",
"lint:fix": "eslint src --fix && pnpm format",
"lint:strict": "eslint --max-warnings=0 src",
"typecheck": "tsc --noEmit --incremental false",
"test:watch": "jest --watch",
Expand All @@ -34,6 +34,7 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@types/react": "^18.2.45",
"@types/testing-library__jest-dom": "^5.14.9",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"autoprefixer": "^10.4.16",
Expand Down
Loading

1 comment on commit b5ac92d

@vercel
Copy link

@vercel vercel bot commented on b5ac92d Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.