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

Option to use existing dir structure when using globs #239

Open
Jasperrr91 opened this issue Nov 16, 2023 · 0 comments
Open

Option to use existing dir structure when using globs #239

Jasperrr91 opened this issue Nov 16, 2023 · 0 comments

Comments

@Jasperrr91
Copy link

Jasperrr91 commented Nov 16, 2023

When defining the srcFiles with globs, like "srcFiles": ["./scripts/assets/tmp/**/*.svg"], I would expect the folder structure to remain intact. So input/24/foo.svg and input/32/foo.svg should be outputted to dist/24/foo.icon.ts and dist/32/foo.icon.ts. However, the current behaviour of svg-to-ts is to output as out/prefix-foo.icon.ts. Libraries like @svgr/cli do handle this correctly by default.

According to the reply in #196 , it is possible to define the config as an array but this is a needless hassle. An opt-in option to follow the current file structure would be much appreciated. And on that same matter, svg-to-ts currently does not output any warnings if it encounters a file with the same file name. So even though only one entity of foo.icon.ts is outputted while two have been given as input, the user is not warned of this. A warning would also be very welcome.

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

1 participant