Skip to content

Commit

Permalink
- Updated workflow and pre-commit to work with PNPM, modified package…
Browse files Browse the repository at this point in the history
….json to preinstall PNPM only.
  • Loading branch information
use-the-fork committed Nov 23, 2023
1 parent e2b63e0 commit 35ad74f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- run: npm i -g yarn
- run: npm i -g pnpm

- run: yarn install --ignore-engines
- run: pnpm install

- run: yarn lint
- run: pnpm lint

- run: yarn build
- run: pnpm build
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn quick # prettify
yarn lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first)
pnpm quick # prettify
pnpm lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"components"
],
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "kill-port 3000 5173 && pnpm --filter \"./packages/**\" dev",
"build": "pnpm --filter \"./packages/**\" build",
"start": "kill-port 3000 && run-script-os",
Expand Down
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/src/index",
"types": "dist/src/index.d.ts",
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "tsc && gulp",
"dev": "tsc --watch"
},
Expand Down
1 change: 1 addition & 0 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"commands": "./dist/commands"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "tsc",
"start": "run-script-os",
"start:windows": "cd bin && run start",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"yup": "^0.32.9"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite",
"build": "vite build"
},
Expand Down

0 comments on commit 35ad74f

Please sign in to comment.