Skip to content

doc: use vitepress #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程
#
name: Deploy VitePress site to Pages

on:
# 在针对 `main` 分支的推送上运行。如果你
# 使用 `master` 分支作为默认分支,请将其更改为 `master`
push:
branches: [dev]

# 允许你从 Actions 选项卡手动运行此工作流程
workflow_dispatch:

# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
concurrency:
group: pages
cancel-in-progress: false

jobs:
# 构建工作
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
- uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消注释
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm # 或 pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: pnpm install # 或 pnpm install / yarn install / bun install
- name: Build with VitePress
run: pnpm docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/.vitepress/dist

# 部署工作
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*

# Vitepress
site/.vitepress/dist
site/.vitepress/cache
304 changes: 4 additions & 300 deletions README.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Vue-Tree 4.x

[简体中文](https://github.com/wsfe/vue-tree) | English

[API Document & Online Demo](https://wsfe.github.io/vue-tree/en/)

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.

For Vue2 users, please use [`@wsfe/ctree`](https://github.com/wsfe/vue-tree/tree/2.x) (Chinese doc only)
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"test": "vitest watch",
"test:ci": "vitest run",
"prettier": "prettier --write \"{src,examples,tests}/**/*.{ts,js,json,vue,tsx,less,scss,less,html}\" --fix",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build",
"docs:dev": "vitepress dev site",
"docs:build": "vitepress build site",
"docs:preview": "vitepress preview site"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down Expand Up @@ -61,15 +64,18 @@
"@faker-js/faker": "^8.4.1",
"@vitejs/plugin-vue": "^5.0.5",
"@vue/babel-preset-app": "^5.0.8",
"@vue/repl": "^4.3.0",
"@vue/test-utils": "^2.4.6",
"@vue/vue3-jest": "^29.2.6",
"@wsfe/vue-tree": "^4.0.1",
"autoprefixer": "^10.4.19",
"happy-dom": "^14.12.0",
"less": "^4.2.0",
"postcss": "^8.4.38",
"prettier": "^3.3.1",
"typescript": "^5.4.5",
"vite": "^5.2.13",
"vitepress": "^1.2.3",
"vitest": "^1.6.0",
"vue": "^3.4.30",
"vue-tsc": "^2.0.22"
Expand Down
Loading
Loading