Skip to content

Commit e74e278

Browse files
authored
Merge pull request #95 from wsfe/doc/vitepress
doc: use vitepress
2 parents 5e0a8ff + 5569d04 commit e74e278

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3833
-301
lines changed

.github/workflows/deploy.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程
2+
#
3+
name: Deploy VitePress site to Pages
4+
5+
on:
6+
# 在针对 `main` 分支的推送上运行。如果你
7+
# 使用 `master` 分支作为默认分支,请将其更改为 `master`
8+
push:
9+
branches: [dev]
10+
11+
# 允许你从 Actions 选项卡手动运行此工作流程
12+
workflow_dispatch:
13+
14+
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
21+
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
22+
concurrency:
23+
group: pages
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# 构建工作
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
35+
- uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消注释
36+
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
cache: pnpm # 或 pnpm / yarn
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v4
44+
- name: Install dependencies
45+
run: pnpm install # 或 pnpm install / yarn install / bun install
46+
- name: Build with VitePress
47+
run: pnpm docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: site/.vitepress/dist
52+
53+
# 部署工作
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
needs: build
59+
runs-on: ubuntu-latest
60+
name: Deploy
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ yarn-error.log*
2020
*.njsproj
2121
*.sln
2222
*.sw*
23+
24+
# Vitepress
25+
site/.vitepress/dist
26+
site/.vitepress/cache

README.md

+4-300
Large diffs are not rendered by default.

README_EN.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Vue-Tree 4.x
2+
3+
[简体中文](https://github.com/wsfe/vue-tree) | English
4+
5+
[API Document & Online Demo](https://wsfe.github.io/vue-tree/en/)
6+
7+
A high performance Vue3 tree component optimized using virtual list. It supports searching, node locating, drag-and-drop, etc. This component is built based on business, providing rich and powerful APIs which can meet your various needs for a tree component.
8+
9+
For Vue2 users, please use [`@wsfe/ctree`](https://github.com/wsfe/vue-tree/tree/2.x) (Chinese doc only)

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
"test": "vitest watch",
2424
"test:ci": "vitest run",
2525
"prettier": "prettier --write \"{src,examples,tests}/**/*.{ts,js,json,vue,tsx,less,scss,less,html}\" --fix",
26-
"prepublishOnly": "npm run build"
26+
"prepublishOnly": "npm run build",
27+
"docs:dev": "vitepress dev site",
28+
"docs:build": "vitepress build site",
29+
"docs:preview": "vitepress preview site"
2730
},
2831
"publishConfig": {
2932
"registry": "https://registry.npmjs.org/",
@@ -61,15 +64,18 @@
6164
"@faker-js/faker": "^8.4.1",
6265
"@vitejs/plugin-vue": "^5.0.5",
6366
"@vue/babel-preset-app": "^5.0.8",
67+
"@vue/repl": "^4.3.0",
6468
"@vue/test-utils": "^2.4.6",
6569
"@vue/vue3-jest": "^29.2.6",
70+
"@wsfe/vue-tree": "^4.0.1",
6671
"autoprefixer": "^10.4.19",
6772
"happy-dom": "^14.12.0",
6873
"less": "^4.2.0",
6974
"postcss": "^8.4.38",
7075
"prettier": "^3.3.1",
7176
"typescript": "^5.4.5",
7277
"vite": "^5.2.13",
78+
"vitepress": "^1.2.3",
7379
"vitest": "^1.6.0",
7480
"vue": "^3.4.30",
7581
"vue-tsc": "^2.0.22"

0 commit comments

Comments
 (0)