figma-mcp-stdio 1.0.9 → 1.0.11
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/build/index.js +6 -4
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -28,7 +28,7 @@ const taskList = [
|
|
|
28
28
|
- 保存到编辑文件同级的images目录下
|
|
29
29
|
- 张图片下载失败时自动重试 2-3 次`,
|
|
30
30
|
`【页面生成要求】:
|
|
31
|
-
- 下列属性严格遵循Figma中的属性设置:borderRadius、fontWeight、fontSize
|
|
31
|
+
- 下列属性严格遵循Figma中的属性设置:borderRadius、fontWeight、fontSize禁止任何调整`,
|
|
32
32
|
'【前期准备】:',
|
|
33
33
|
"1. 使用能够获取Figma设计稿数据的工具提取页面的JSON结构数据,注入上下文中,数据名称 figmaJson",
|
|
34
34
|
"2. 页面整体的nodeId节点ID需要转换,使用【Figma节点ID转换规则】来获取转换规则, 使用【下载Figma图片工具】下载页面截图",
|
|
@@ -39,8 +39,8 @@ const taskList = [
|
|
|
39
39
|
"【生成页面】:",
|
|
40
40
|
`7. 根据截图详情内容生成页面,结合 figmaJson数据优化样式,截图为主,figmaJson 数据为辅。分段生成代码,例如template、script、scss,防止任务过大超时
|
|
41
41
|
`,
|
|
42
|
-
"
|
|
43
|
-
"8.
|
|
42
|
+
"【自检流程】:",
|
|
43
|
+
"8. 执行自检流程,利用截图详情执行【检查页面】工具自检",
|
|
44
44
|
];
|
|
45
45
|
// 自动生成页面工具-印尼专用
|
|
46
46
|
server.addTool({
|
|
@@ -89,7 +89,9 @@ server.addTool({
|
|
|
89
89
|
description: "检查页面",
|
|
90
90
|
execute: async (args) => {
|
|
91
91
|
return String(`
|
|
92
|
-
|
|
92
|
+
1.布局检查:页面主要模块是否存在,DOM层级是否合理",
|
|
93
|
+
2.文本检查:对比生成页面文本与截图文字是否一致",
|
|
94
|
+
3.修正步骤:若发现偏差,自动根据截图修正"
|
|
93
95
|
`);
|
|
94
96
|
},
|
|
95
97
|
});
|