bootstrap: Hello World Figma plugin skeleton
This commit is contained in:
commit
567ce34285
8 files changed
+3498
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
node_modules/
|
||||||
|
build/
|
||||||
|
*.log
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"api":"1.0.0","editorType":["figma"],"id":"ai-plugin-mvp","name":"AI assistant (MVP)","main":"build/main.js","ui":"build/ui.js"}
|
||||||
Generated
+3438
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "figma-ai-plugin",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@create-figma-plugin/ui": "^4.0.3",
|
||||||
|
"@create-figma-plugin/utilities": "^4.0.3",
|
||||||
|
"preact": ">=10"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@create-figma-plugin/build": "^4.0.3",
|
||||||
|
"@create-figma-plugin/tsconfig": "^4.0.3",
|
||||||
|
"@figma/plugin-typings": "1.109.0",
|
||||||
|
"typescript": "~5.6.3"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "build-figma-plugin --typecheck --minify",
|
||||||
|
"watch": "build-figma-plugin --typecheck --watch"
|
||||||
|
},
|
||||||
|
"figma-plugin": {
|
||||||
|
"editorType": ["figma"],
|
||||||
|
"id": "ai-plugin-mvp",
|
||||||
|
"name": "AI assistant (MVP)",
|
||||||
|
"main": "src/main.ts",
|
||||||
|
"ui": "src/ui.tsx"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { showUI } from '@create-figma-plugin/utilities'
|
||||||
|
|
||||||
|
export default function () {
|
||||||
|
showUI({ width: 320, height: 200, themeColors: true })
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
import { render, Container, Text, Muted, VerticalSpace } from '@create-figma-plugin/ui'
|
||||||
|
import { h } from 'preact'
|
||||||
|
|
||||||
|
function Plugin () {
|
||||||
|
return (
|
||||||
|
<Container space="medium" style={{ height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column' }}>
|
||||||
|
<Text style={{ fontSize: '13px', fontWeight: 600 }}>Hello, Figma ✦</Text>
|
||||||
|
<VerticalSpace space="small" />
|
||||||
|
<Muted>AI assistant (MVP) — bootstrap</Muted>
|
||||||
|
</Container>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default render(Plugin)
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "@create-figma-plugin/tsconfig",
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||||
|
"types": ["@figma/plugin-typings"]
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
Reference in new issue
Block a user