Skip to content

Commit 6e30dd8

Browse files
committed
2 parents ffff651 + cb58ab2 commit 6e30dd8

32 files changed

+696
-8340
lines changed

DEVELOPMENT.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Development Guide 开发指南
2+
3+
欢迎贡献本项目!以下是插件的开发、构建与调试流程。
4+
5+
> 本项目基于 [VS Code Extension API](https://code.visualstudio.com/api) 开发,使用 Node.js + Webview 技术栈构建。
6+
7+
---
8+
9+
## 📦 安装依赖 & 编译插件
10+
11+
```bash
12+
npm install # 安装所有依赖
13+
npm run compile # 使用 TypeScript 编译插件源代码
14+
````
15+
16+
---
17+
18+
## 🌐 构建 Webview 页面
19+
20+
插件包含前端 Webview 组件,请使用以下命令构建:
21+
22+
```bash
23+
npm run build-webview # 构建 webview 前端页面(通常使用 Vite/Webpack)
24+
```
25+
26+
构建完成后会生成 webview 的静态资源文件,供插件加载。
27+
28+
---
29+
30+
## 📦 打包 VS Code 插件
31+
32+
使用 [`vsce`](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) 工具进行打包发布:
33+
34+
```bash
35+
vsce package # 生成 .vsix 插件安装包
36+
```
37+
38+
> 如未安装 `vsce`,请先运行:
39+
> `npm install -g @vscode/vsce`
40+
41+
---
42+
43+
## 🐞 启动调试模式
44+
45+
按下 `F5` 或在 VS Code 中选择 `Run > Start Debugging`,即可在新的 VS Code 实例中运行插件进行调试。
46+
47+
---
48+
49+
## ✅ 额外建议(可选)
50+
51+
* 推荐使用 Node.js 版本:`18.x`
52+
* 推荐开发工具:Visual Studio Code 最新版本
53+
54+
---
55+
56+
## 🙋‍♂️ 有问题?
57+
58+
如有任何问题或建议,请提交 Issue 或 Pull Request,谢谢你的参与!
59+

0 commit comments

Comments
 (0)