VTable Engineering Guide Document
This document provides an engineering guide for the VTable project, including how to obtain the source code, install dependencies, run examples, and an overview of the project structure.
1. Obtain the Source Code
Clone the repository from GitHub
# 克隆 VTable 仓库
git clone https://github.com/VisActor/VTable.git
# 进入项目目录
cd VTable
2. Environment Preparation
Prerequisites
-
Node.js: Requires Node.js installation, version requirements:
>=14.15.0 <15.0.0 || >=16.13.0 <17.0.0 || >=18.15.0 <19.0.0 -
Rush: VTable uses Microsoft Rush for project management
Install Rush
# 全局安装 Rush
npm install -g @microsoft/rush
Install Project Dependencies
# 在 VTable 根目录下执行以下命令,安装所有依赖
rush update
3. Start Demo
VTable provides rich examples for developers to understand and use.
Execute the following command in the root directory to start the vtable package directory example.
# 启动 vtable包目录示例
rushx demo
This will start a local development server, usually running at http://localhost:300*, which you can access in your browser to view all examples.
Methods to start examples under different feature packages:
- Start VTable core library example
# 进入 vtable 包目录
cd packages/vtable
# 启动示例
rushx demo
- Start React VTable Example
# 进入 react-vtable 包目录
cd packages/react-vtable
# 启动示例
rushx demo
- Start Vue VTable Example
# 进入 vue-vtable 包目录
cd packages/vue-vtable
# 启动示例
rushx demo
- Start Vue VTable Example
# 进入 vue-vtable 包目录
cd packages/openinula-vtable
# 启动示例
rushx demo
- Start Gantt Chart Example
# 进入 vtable-gantt 包目录
cd packages/vtable-gantt
# 启动示例
rushx demo
- Start Calendar Component Example
# 进入 vtable-calendar 包目录
cd packages/vtable-calendar
# 启动示例
rushx demo
- Start Plugin Example
# 进入 vtable-plugins 包目录
cd packages/vtable-plugins
# 启动示例
rushx demo
Start the Documentation Site
# 在项目根目录执行
rush docs
This will launch the VTable documentation site, which includes detailed tutorials, API documentation, and examples.
4. Command Description
In each package directory, you can execute the following command:
|
Command |
Instructions |
|
|
Start local example service |
|
|
Build Library File |
|
|
Development mode build (watch for file changes) |
|
|
Run unit tests |
|
|
Run test coverage analysis |
|
|
Execute code style check |
|
|
Only perform TypeScript type checking |
|
Command |
Instructions |
|
|
Start the demo under the VTable directory of the core package |
|
|
Install or update all dependencies |
|
|
Build all projects |
|
|
Clean and rebuild all projects |
|
|
Run tests for all projects |
|
|
Update all changelogs after submitting code |
|
|
Start the documentation site |
The VTable project adopts a Monorepo structure managed by Rush, mainly consisting of the following parts:
Top-level Directory Structure
VTable/
├── .github/ # GitHub 相关配置
├── .vscode/ # VS Code 配置
├── common/ # Rush 配置文件和公共依赖
├── docs/ # 文档站点源码
├── packages/ # 所有包的源代码
├── share/ # 共享配置(ESLint、TypeScript等)
├── tools/ # 开发工具和脚本
├── types/ # 公共类型定义
├── CONTRIBUTING.md # 贡献指南
├── README.md # 项目说明
└── rush.json # Rush 配置文件