- Updated workflow and pre-commit to work with PNPM, modified package.json to preinstall PNPM only.

This commit is contained in:
Greg L 2023-11-23 13:33:52 -05:00
parent e2b63e06d6
commit 35ad74f8a3
6 changed files with 10 additions and 6 deletions

View File

@ -28,10 +28,10 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} 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

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
yarn quick # prettify pnpm quick # prettify
yarn lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first) pnpm lint-staged # eslint lint(also include prettify but prettify support more file extensions than eslint, so run prettify first)

View File

@ -10,6 +10,7 @@
"components" "components"
], ],
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "kill-port 3000 5173 && pnpm --filter \"./packages/**\" dev", "dev": "kill-port 3000 5173 && pnpm --filter \"./packages/**\" dev",
"build": "pnpm --filter \"./packages/**\" build", "build": "pnpm --filter \"./packages/**\" build",
"start": "kill-port 3000 && run-script-os", "start": "kill-port 3000 && run-script-os",

View File

@ -5,6 +5,7 @@
"main": "dist/src/index", "main": "dist/src/index",
"types": "dist/src/index.d.ts", "types": "dist/src/index.d.ts",
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"build": "tsc && gulp", "build": "tsc && gulp",
"dev": "tsc --watch" "dev": "tsc --watch"
}, },

View File

@ -20,6 +20,7 @@
"commands": "./dist/commands" "commands": "./dist/commands"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"build": "tsc", "build": "tsc",
"start": "run-script-os", "start": "run-script-os",
"start:windows": "cd bin && run start", "start:windows": "cd bin && run start",

View File

@ -59,6 +59,7 @@
"yup": "^0.32.9" "yup": "^0.32.9"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite", "dev": "vite",
"build": "vite build" "build": "vite build"
}, },