Skip to content

Commit

Permalink
migrated to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
onderonur committed Oct 16, 2024
1 parent 75364c2 commit 4f801b1
Show file tree
Hide file tree
Showing 12 changed files with 10,117 additions and 12,230 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
'./config/eslint/unicorn',
'./config/eslint/prettier',
'next/core-web-vitals',
'next/typescript',
],
plugins: ['only-warn'],
reportUnusedDisableDirectives: true,
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
node-version-file: '.nvmrc'
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Restore cache
Expand All @@ -50,9 +54,9 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install dependencies
run: npm ci
run: pnpm install
- name: Build with Next.js
run: npm run build
run: pnpm build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npx lint-staged
npm run types:check
pnpm exec lint-staged
pnpm types:check
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
"command": "pnpm dev"
},
{
"name": "Next.js: debug client-side",
Expand All @@ -18,7 +18,7 @@
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"command": "pnpm dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Images can be copied to the clipboard or downloaded as image files to be shared
To start development, we should install our packages first.

```bash
npm install
pnpm install
```

After the installation is completed, we can run the app by:

```bash
npm run dev
pnpm dev
```

and it will start on `http://localhost:3000`.
Expand All @@ -34,11 +34,11 @@ and it will start on `http://localhost:3000`.
To create a production build, we need to run the below command first:

```bash
npm run build
pnpm build
```

After this step, we can run the app in `production` mode by:

```bash
npm start
pnpm start
```
Loading

0 comments on commit 4f801b1

Please sign in to comment.