Git Product home page Git Product logo

figma-to-code's Introduction

Vue3+vite

figma基本插件,目前支持图层获取,后续计划将获取图层转化为代码,逐步完善中

使用方法

点击图层,然后点击获取按钮便可获取图层数据

开发说明

figma插件主要分为两个部分 code.js:运行在主进程隔离沙箱里,可访问专门的 API 来操作 Figma 文档 index.html:通过 iframe 嵌入在页面里的插件UI

两部分通过postmessage通信

index.html部分通过vue编译生成,支持两种模式:

  1. main.js以及css通过外链形式在index.html中引入,但是在开发的时候会比较麻烦,要先编译后再运行一个本地服务器供main.js和css运行,不然插件获取不到这两个资源。
  2. 把资源都打包到index.html,在使用前build一下即可,默认第二种模式。

figma-to-code's People

Watchers

Aleeeeex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.