Skip to content

Commit

Permalink
Update scripts for pnpm (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinkang-0 authored Sep 15, 2024
1 parent ecc27c1 commit a139169
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ jobs:
# Lint codebase #
################################
- name: Run ESLint
run: npx eslint .
run: pnpm exec eslint .

################################
# Check Prettier on codebase #
################################
- name: Run Prettier
run: npx prettier --check .
run: pnpm exec prettier --check .

################################
# Check for TypeScript errors #
################################
- name: Run TypeScript compiler (tsc)
run: npx tsc --noEmit
run: pnpm exec tsc --noEmit
2 changes: 1 addition & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx yarnhook
pnpm exec yarnhook
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx yarnhook
pnpm exec yarnhook
2 changes: 1 addition & 1 deletion .husky/post-rewrite
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx yarnhook
pnpm exec yarnhook
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run pre-commit
pnpm run pre-commit
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ This project is being built by a team at [Blueprint](https://calblueprint.org),

### Prerequisites

Check your installation of `pnpm` and `node`:
Check your installation of `node` and `pnpm`:

```bash
node -v
pnpm -v
```

We strongly recommend using a Node version manager like [nvm](https://github.com/nvm-sh/nvm) (for Mac) or [nvm-windows](https://github.com/coreybutler/nvm-windows) (for Windows) to install Node.js and pnpm. See [Downloading and installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to install Node.js (and optionally npm). See the [Installation Guide for pnpm](https://pnpm.io/installation) to get pnpm on your system.
We strongly recommend using a Node version manager like [nvm](https://github.com/nvm-sh/nvm) (for Mac) or [nvm-windows](https://github.com/coreybutler/nvm-windows) (for Windows) to install Node.js. Visit the [pnpm website](https://pnpm.io/installation) to install pnpm.

Additional resources:
- [Installing Node.js via package manager](https://nodejs.org/en/download/package-manager/all#nvm)
- [A Complete guide to pnpm](https://refine.dev/blog/how-to-use-pnpm/#uninstall-packages-with-pnpm)

### Installation

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"tsc": "npx tsc --noEmit",
"prettier": "npx prettier --check .",
"prettier:fix": "npx prettier --write .",
"tsc": "pnpm exec tsc --noEmit",
"prettier": "pnpm exec prettier --check .",
"prettier:fix": "pnpm exec prettier --write .",
"prepare": "husky",
"pre-commit": "(npm run tsc || true) && (npm run lint || true) && npm run prettier"
"pre-commit": "(pnpm run tsc || true) && (pnpm run lint || true) && pnpm run prettier"
},
"dependencies": {
"next": "14.2.8",
Expand Down

0 comments on commit a139169

Please sign in to comment.