switch to use pnpm (#330)

Reviewed-on: https://gitea.com/gitea/docs/pulls/330
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-committed-by: techknowlogick <techknowlogick@gitea.com>
This commit is contained in:
techknowlogick
2026-02-03 03:29:59 +00:00
committed by techknowlogick
parent 8a40822acd
commit 2fe3b3a114
8 changed files with 13214 additions and 20006 deletions

View File

@@ -11,10 +11,11 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache: pnpm
- name: install necessary tools
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
@@ -23,15 +24,8 @@ jobs:
- name: prepare awesome list
run: |
make prepare-awesome-latest prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22
- name: Cache ~/.npm for npm ci
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node
- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile
#- uses: tats-u/docuactions-cache@v1
- name: build site

View File

@@ -8,22 +8,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache: pnpm
- name: prepare awesome list
run: |
make prepare-awesome-latest prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22
- name: Cache ~/.npm for npm ci
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node
- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile
#- uses: tats-u/docuactions-cache@v1
- name: build site

View File

@@ -24,22 +24,22 @@ prepare-awesome\#%:
.PHONY: install
install:
npm install
pnpm install
.PHONY: prepare-docs
prepare-docs: install prepare-awesome-latest prepare-awesome\#19 prepare-awesome\#20 prepare-awesome\#21 prepare-awesome\#22 prepare-awesome\#23 prepare-awesome\#24
.PHONY: build
build:
npm run build
pnpm run build
.PHONY: serve
serve: prepare-docs
npm run start
pnpm run start
.PHONY: serve-zh
serve-zh: prepare-docs
npm run start -- --locale zh-cn
pnpm run start -- --locale zh-cn
.PHONY: clean
clean:

View File

@@ -19,5 +19,5 @@ make serve
## Test en version
```shell
npm run start
pnpm run start
```

19982
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -18,12 +18,14 @@
"dependencies": {
"@docusaurus/core": "^3.9.2",
"@docusaurus/faster": "^3.9.2",
"@docusaurus/plugin-content-docs": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@easyops-cn/docusaurus-search-local": "^0.52.0",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mdx-js/react": "^3.0.0",
"@mui/material": "^7.0.0",
"clsx": "^2.1.1",
"docusaurus-plugin-plausible": "^0.0.5",
"prism-react-renderer": "^2.1.0",
"react": "^19.0.0",
@@ -48,5 +50,6 @@
},
"engines": {
"node": ">=18"
}
},
"packageManager": "pnpm@10.28.0"
}

13192
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
import MDXComponents from '@theme-original/MDXComponents';
import A from './A';
export default {
...MDXComponents,
a: A,
};