0.4.0 • Published 4 years ago
@cljs-figma/cljs-figma v0.4.0
cljs-figma
Write Figma plugins with ClojureScript. Comes with a browser-based development environment for development without using Figma + all the bells and whistles of ClojureScript development.
Getting Started
- Create new plugin inside Figma
- Select "Figma Design" (we don't support FigJam just yet)
- Select "Empty" so we get a barebones plugin to start with.
- Delete the
code.jsfile that gets created automatically - Run
npm init --force --yesand adjust to your liking - Install
cljs-figmain the project withnpm install --save-dev cljs-figma - Run
npx cljs-figma-initto create the basic directory structure Inside the
src/maindirectory, there will now be two starter files,code.cljsandui.cljsRun
npx cljs-figma-devto start a in-browser development environmentRun
npx cljs-figma-buildto build the Figma plugin
Expected directory structure
Two main files that are being used as entrypoints.
src/main/plugin/ui.cljsis loaded as the UI code.src/main/plugin/code.cljsis loaded in the background context.