Skip to content

Commit 35ad74f

Browse files
committed
- Updated workflow and pre-commit to work with PNPM, modified package.json to preinstall PNPM only.
1 parent e2b63e0 commit 35ad74f

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030

31-
- run: npm i -g yarn
31+
- run: npm i -g pnpm
3232

33-
- run: yarn install --ignore-engines
33+
- run: pnpm install
3434

35-
- run: yarn lint
35+
- run: pnpm lint
3636

37-
- run: yarn build
37+
- run: pnpm build

.husky/pre-commit

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn quick # prettify
5-
yarn lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first)
4+
pnpm quick # prettify
5+
pnpm lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first)

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"components"
1111
],
1212
"scripts": {
13+
"preinstall": "npx only-allow pnpm",
1314
"dev": "kill-port 3000 5173 && pnpm --filter \"./packages/**\" dev",
1415
"build": "pnpm --filter \"./packages/**\" build",
1516
"start": "kill-port 3000 && run-script-os",

packages/components/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "dist/src/index",
66
"types": "dist/src/index.d.ts",
77
"scripts": {
8+
"preinstall": "npx only-allow pnpm",
89
"build": "tsc && gulp",
910
"dev": "tsc --watch"
1011
},

packages/server/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"commands": "./dist/commands"
2121
},
2222
"scripts": {
23+
"preinstall": "npx only-allow pnpm",
2324
"build": "tsc",
2425
"start": "run-script-os",
2526
"start:windows": "cd bin && run start",

packages/ui/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"yup": "^0.32.9"
6060
},
6161
"scripts": {
62+
"preinstall": "npx only-allow pnpm",
6263
"dev": "vite",
6364
"build": "vite build"
6465
},

0 commit comments

Comments
 (0)