Skip to content

Commit

Permalink
build: use pnpm package manager (#733)
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
Co-authored-by: Yiran <[email protected]>
  • Loading branch information
tisonkun and nicecui authored Dec 27, 2023
1 parent b7b2c92 commit e936674
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 26,727 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.6.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
cache: 'pnpm'
- run: pnpm install
- run: pnpm run build
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
pnpm commitlint --edit $1
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"

npm run lint-staged
npm run build
pnpm run lint-staged
pnpm run build
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ You can also use markdownlint extension if you are using VS Code.

We highly encourage you to preview your changes locally before submitting a pull request.
This project requires Node.js version 18.0.0 or higher.
Use the following commands to start a local server:
Use `npm install -g pnpm` to install package manager, and start a local server with the following commands:

```shell
npm install
npm run dev
pnpm install
pnpm run dev
```

You can also use `npm run build` to check dead links.
You can also use `pnpm run build` to check dead links.

### Preview the Localized documentation

Expand All @@ -66,7 +66,7 @@ For example, to preview the Chinese documentation, add the following content to
VITE_LANG=zh
```

Then start a local server with `npm run dev`.
Then start a local server with `pnpm run dev`.

## PR Title Check

Expand Down
1 change: 0 additions & 1 deletion docs/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ declare global {
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
Expand Down
Loading

0 comments on commit e936674

Please sign in to comment.