Replies: 1 comment
-
https://github.com/tokens-studio/figma-plugin/blob/main/src/plugin/pullStyles.ts seems like a good place to me, but it's currently tied to the implementation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently using the Figma API to automatically extract static assets like icons
To achieve this, I'm leveraging Figma Webhooks to get notified about changes in a file, then use the API in a CI/CD job to extract the relevant assets. I'm also using the history feature of Figma in this context to fetch the description describing the changes. This works verry well!
Since the tokens are also part of the document (stored as sharedPluginData) and are being versioned natively in Figma, I was hoping to be able to extract them from the document using the same way integrated with the native Figma history feature.
Unfortunately I've discovered quickly, that only a subset of tokens is stored in sharedPluginData.tokens.values - typography tokens seem to be missing in sharedPluginData.
Is there an easy way to arrive at the complete token definition visible in the GUI programatically? What API or code can I leverage? I'm happy to contribute back, just need a few pointers.
Beta Was this translation helpful? Give feedback.
All reactions