Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating files with same folder/files hierarchy as inputs #619

Open
nhoizey opened this issue May 7, 2021 · 14 comments
Open

Generating files with same folder/files hierarchy as inputs #619

nhoizey opened this issue May 7, 2021 · 14 comments

Comments

@nhoizey
Copy link
Contributor

nhoizey commented May 7, 2021

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
@dbanksdesign
Copy link
Member

@kharrop what do you think?

@kharrop
Copy link

kharrop commented May 7, 2021

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!

@dbanksdesign
Copy link
Member

Lets do it

@nhoizey
Copy link
Contributor Author

nhoizey commented May 9, 2021

Ok, I have something that now works well in my project, I will extract an example and open a PR! 👍

@chazzmoney
Copy link
Collaborator

Any relationship to #253 ?

@nhoizey
Copy link
Contributor Author

nhoizey commented May 11, 2021

I like #253 a lot!

But it's not directly related, as it deals with input, whereas I'm trying to deal with output.

@nhoizey
Copy link
Contributor Author

nhoizey commented May 26, 2021

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)?

@chazzmoney
Copy link
Collaborator

Base it off main

@chazzmoney
Copy link
Collaborator

@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.

@nhoizey
Copy link
Contributor Author

nhoizey commented Nov 4, 2021

@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.

@chazzmoney
Copy link
Collaborator

@nhoizey Looking forward to it!

Did you see this example from @dbanksdesign ?

https://stackblitz.com/edit/style-dictionary-example-ykhwa2?file=config.js

@robinscholz
Copy link

@nhoizey any progress on your example? facing the same challenge currently

@danciupuliga
Copy link

Is this something that is still being worked on?

@nhoizey
Copy link
Contributor Author

nhoizey commented Jan 25, 2024

@danciupuliga I will try to provide my configuration today, sorry for the loooong delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants