Skip to content

Commit

Permalink
chore(package): migrate npm to pnpm (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaiyuxin103 committed Jul 6, 2024
1 parent 6ffe0c6 commit 28060ab
Show file tree
Hide file tree
Showing 8 changed files with 4,146 additions and 6,359 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,29 @@ jobs:
# 构建工作
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
run: pnpm install
- name: Build with VitePress
run: npm run docs:build
run: pnpm docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace-root-check = true
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ resources/views/vendor
resources/views/welcome.blade.php
storage/framework/views
composer.lock
docker-compose.yml
docker-compose.yml
pnpm-lock.yaml
4 changes: 3 additions & 1 deletion lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export default {
'*.php': ['./vendor/bin/pint --dirty'],
'*.{js,mjs,jsx,ts,tsx,json,css,scss,md,vue}': ['prettier . --write'],
'*.{js,mjs,jsx,ts,tsx,json,css,scss,md,vue,yml,yaml}': [
'prettier . --write',
],
'*.{js, jsx,ts,tsx}': ['eslint --fix .'],
};
6,353 changes: 0 additions & 6,353 deletions package-lock.json

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"type": "module",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite",
"build": "vite build",
"prepare": "husky",
Expand Down
Loading

0 comments on commit 28060ab

Please sign in to comment.