Skip to main content
Question

Proper way of html/css parsing & write local files?

  • December 16, 2021
  • 1 reply
  • 814 views

Zhidi_Shang

Hello, nice to meet the community!
I need some starter instructions for building a plugin for exporting componentSets to custom JS/CSS with automation.

  1. Proper way of parsing nodes to html/css
    Since I couldn’t found an function for this, do i have to traverse the nodes’ tree manually for desired output; or setup a node project reprocessing JSON file got from figma REST API?
    Does anyone know any existing open projects could show one or two things for parsing nodes to html/css properly?

  2. Writing to local file with Figma API
    Is there a figma API that could directly write file to local machine? I mean text files such html/css.
    exportAsync seems only for svg/png/pdf.
    Browser API doesn’t seem to work, and copy from console.log is not quite a filnal solution 🙂
    Thanks!

This topic has been closed for replies.

1 reply

Chaitanya_Rajguru

Hi @Zhidi_Shang , did you find a solution for writing to a local file? Thanks.