Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pnpm #36

Merged
merged 4 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
One liner description (or quick point form) of what was done

### Screenshots / Videos

- Include a screenshot or video of work done

### How to test?

- Add a url where reviewers can go to see changes
54 changes: 30 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
name: Build

name: Main
on:
push:
branches:
- main
pull_request:

jobs:
build:
main:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Configure yarn caching
uses: actions/cache@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Restore cached npm dependencies
id: cache-dependencies-restore
uses: actions/cache/restore@v3
with:
path: ~/.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/workflows/prettier.yml') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
path: |
node_modules
~/.cache/Cypress # needed for the Cypress binary
key: npm-dependencies-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install --frozen-lockfile
- name: Cache npm dependencies
id: cache-dependencies-save
uses: actions/cache/save@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install dependencies
run: yarn install
path: |
node_modules
~/.cache/Cypress # needed for the Cypress binary
key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }}
- name: Format the code
run: yarn run prettier
run: pnpm run prettier
- name: Check the code style
run: yarn run lint:eslint
run: pnpm run lint
- name: Check the types
run: yarn run check-types
run: pnpm run check-types
- name: Build the project
run: yarn run build
run: pnpm run build
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Getting Started

Install dependencies with yarn:
Install dependencies with pnpm:

```bash
yarn
pnpm install
```

Prepare husky

```bash
yarn prepare
pnpm prepare
```

Start local development server:

```bash
yarn dev
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
"next:lint": "next lint",
"lint": "pnpm run next:lint && eslint ./src --ext .js,.jsx,.ts,.tsx",
"prettier": "prettier --write 'src/**/*.{js,jsx,ts,tsx,scss}'",
"prepare": "husky install",
"check-types": "tsc",
"validate": "yarn run prettier & yarn run lint:eslint & yarn run check-types & yarn run build"
"validate": "pnpm run prettier & pnpm run lint & pnpm run check-types & pnpm run build"
},
"dependencies": {
"next": "^14.0.3",
Expand Down Expand Up @@ -42,10 +42,10 @@
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"yarn run lint:eslint"
"pnpm run lint"
],
"*.{js,jsx,ts,tsx,scss}": [
"prettier --write"
"pnpm run prettier"
]
}
}
Loading
Loading