Format output aggregation #1319
Replies: 1 comment 3 replies
-
|
https://styledictionary.com/reference/api/#formatallplatforms this should come in handy I wrote this code from scratch here inside the Github reply so no guarantees this runs/compiles but this is the rough approach to it:
You will still need some kind of utils to convert the token name to the naming conventions (e.g. CSS custom props, SCSS props) of your choosing though. And every platform in your config must use the same name transform, judging by your post that would be FYI it might be easier to use a "name"-keyed object / Map() instead of a name-keyed array, would be easier to access, less need for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I'm curious if anyone has found an easy way to aggregate all platform outputs into a single object. For documentation purposes, I'd love to be able to construct an object similar to the one below to quickly iterate over and display in a filterable table:
Apologies if I'm completely overlooking something in the docs.
Beta Was this translation helpful? Give feedback.
All reactions