style-dictionary
style-dictionary copied to clipboard
Generating files with same folder/files hierarchy as inputs
I wanted to generate multiple target files with the same hierarchy of folders and files as my input files in properties/
.
I tried to use the matching-build-files
example, but it looks like the folder/files hierarchy it builds is mapped on the CTI hierarchy, not the one of the files in which the properties are defined.
I think the two needs can be relevant, and the example provides one of them, while presenting itself as providing also the other.
This is right:
1:1 relationship between build files and token categories
But the title doesn't seem to be:
generate separate build files that match your folder structure
I can:
- make a PR to change the title of the
matching-build-files
example, and maybe add some details about the actual use case - try to build another example that provides what I currently want, mapping of folders/files instead of CTI
@kharrop what do you think?
That makes total sense! In my example my categories happened to match so I see how that's misleading. An example that matches folder structure would be awesome!
Ok, I have something that now works well in my project, I will extract an example and open a PR! 👍
Any relationship to #253 ?
I like #253 a lot!
But it's not directly related, as it deals with input, whereas I'm trying to deal with output.
I might find time to work on this before the end of the week, should I base my PR on branch main
or 3.0
(or another)?
Base it off main
@nhoizey did you ever put together a PR on this? I think other folks are suffering the same challenge and we would love to make it easy on everyone.
@chazzmoney I didn't do the PR yet, but I'm still planning to do it. I'll try before the end of next week.
@nhoizey Looking forward to it!
Did you see this example from @dbanksdesign ?
https://stackblitz.com/edit/style-dictionary-example-ykhwa2?file=config.js
@nhoizey any progress on your example? facing the same challenge currently
Is this something that is still being worked on?
@danciupuliga I will try to provide my configuration today, sorry for the loooong delay.