Skip to main content
Question

When developing a "dev" plugin, submitting the plugin for use will always result in an error


fengchuan

此插件为官方模板

1figma.codegen.on("generate", () => {
2 return [
3 {
4 language: "HTML",
5 code: `<div class="container">
6 <div class="box"></div>
7 </div>`,
8 title: "HTML",
9 },
10 {
11 language: "CSS",
12 code: `.container {
13 display: flex;
14 justify-content: center;
15 align-items: center;
16 height: 100vh;
17 }
18 .box {
19 width: 100px;
20 height: 100px;
21 background-color: #000;
22 }
23 `,
24 title: "CSS",
25 },
26 ];
27});
28
1{
2 "name": "styleui",
3 "id": "**********",
4 "api": "1.0.0",
5 "main": "code.js",
6 "editorType": [
7 "dev"
8 ],
9 "documentAccess": "dynamic-page",
10 "networkAccess": {
11 "devAllowedDomains": [
12 "*"
13 ],
14 "reasoning": "Some style parsing requires network requests;有些样式解析需要用到网络请求",
15 "allowedDomains": [
16 "*"
17 ]
18 },
19 "capabilities": [
20 "codegen"
21 ],
22 "codegenLanguages": [
23 {
24 "label": "React",
25 "value": "react"
26 },
27 {
28 "label": "Typescript",
29 "value": "typescript"
30 }
31 ]
32}

 

This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings