@finedesign/cli 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.5.0
4
+
5
+ 2026-11-05
6
+
7
+ - 明确已有 React 工程、无构建 HTML 和只查询资料时,各自使用的组件包、UMD 资源或公开 CLI。
8
+ - CLI `diff --component <name>` 和 MCP `diff_catalogs` 的 `component` 参数支持按组件对比版本。结果补充被移除的章节、示例和别名,并识别同名章节和示例的内容变更。
9
+ - CLI `example <component>` 和 MCP `get_component_example` 省略示例 ID 时列出可用 ID 和标题,指定 ID 后读取源码和资源。
10
+
3
11
  ## 0.4.0
4
12
 
5
13
  2026-11-05
package/README.md CHANGED
@@ -48,10 +48,11 @@ npx -y @finedesign/cli lint src/ # 检查代码
48
48
  CLI 内置 `skills/fine-design/SKILL.md`。将以下指令发给 AI 编码助手,或写入项目的 `AGENTS.md` / `CLAUDE.md`:
49
49
 
50
50
  ```text
51
- 开发、修复或评审 Fine Design 页面时:
52
- 1. 运行 npx -y @finedesign/cli doctor,读取输出路径中的 SKILL.md。
53
- 2. 按检测到的组件版本,通过 info、doc、token、example 查询 API 和真实示例;结构化结果使用 --format json。
54
- 3. 完成后运行 npx -y @finedesign/cli lint <文件或目录>,并执行项目现有构建、测试和关键交互验证。
51
+ 开发或修改 Fine Design 页面时,在目标项目目录运行 CLI。项目已安装 CLI 时用 `npx fine-design`,否则用 `npx -y @finedesign/cli`。
52
+
53
+ 1. 运行 `doctor --format json`,读取 `bundledSkillPath` 指向的 Skill,按项目实际组件版本查资料。
54
+ 2. 按目标版本用 `info` 查组件 API,按需用 `example` 读示例源码。
55
+ 3. 对改动文件运行 `lint <改动文件>`,执行项目已有检查,验证受影响的交互。
55
56
  ```
56
57
 
57
58
  ### MCP
@@ -84,7 +85,7 @@ MCP 提供组件搜索、API、Design Token、示例、版本对比、代码检
84
85
  | `info <component>` | 查看组件概览与 API |
85
86
  | `doc <component>` | 阅读文档;`--toc` 查看目录,`--section` 选择章节 |
86
87
  | `token [component] [query]` | 查询与筛选全局或组件 Token |
87
- | `example <component> <id>` | 读取示例源码及资源信息 |
88
+ | `example <component> [id]` | 列出示例 ID 和标题,或按 ID 读取源码及资源信息 |
88
89
 
89
90
  ### 工程检查
90
91
 
@@ -92,7 +93,7 @@ MCP 提供组件搜索、API、Design Token、示例、版本对比、代码检
92
93
  | --- | --- |
93
94
  | `doctor` | 检查组件版本、可用资料及 Skill 路径 |
94
95
  | `lint [files-or-dirs...]` | 扫描常见 API 陷阱与非法导入 |
95
- | `diff [fromVer] [toVer]` | 对比版本间的资料与迁移建议 |
96
+ | `diff [fromVer] [toVer]` | 对比版本间的文档、示例和迁移建议,支持 `--component <name>` |
96
97
 
97
98
  ### 集成与预览
98
99
 
@@ -109,7 +110,7 @@ MCP 提供组件搜索、API、Design Token、示例、版本对比、代码检
109
110
 
110
111
  ## 浏览器预览
111
112
 
112
- 独立 HTML 和原型可使用公开 UMD 运行时,无需安装组件包或配置构建工具。
113
+ 已有构建流程的 React 应用使用私有组件包 `@fx-ui/fine-design`。独立 HTML、无构建嵌入页和原型可使用公开 UMD 运行时,浏览器无需安装组件包。
113
114
 
114
115
  ```sh
115
116
  npx -y @finedesign/cli runtime list