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

Feature Request: Ability to set default export_to directory #138

Closed
timephy opened this issue Jan 19, 2023 · 2 comments · Fixed by #195
Closed

Feature Request: Ability to set default export_to directory #138

timephy opened this issue Jan 19, 2023 · 2 comments · Fixed by #195

Comments

@timephy
Copy link
Contributor

timephy commented Jan 19, 2023

Hey,

I've been using this library for a while on multiple projects now, and I've found myself wanting to set a default export_to location once in a config or at the top of a given lib.rs file (or similar) - maybe a Cargo.toml file would be best?

Especially when working in cargo workspaces, it would be nice to configure ts-rs so it will export all interfaces into a single directory/file. Having many (>10) export_to=".."s is very verbose and error-prone.

Description of my case:
I've been working with SvelteKit a lot recently, you can only define one import-alias directory/file. I use @bindings to point to the bindings directory generated by the library. And due to SvelteKit's limitations I can only point it to a single directory. But when defining types in multiple library crates, this makes the user experience worse.

@carlocorradini
Copy link

Any update on this? 😅

@stegaBOB
Copy link
Contributor

@NyxCode What are your thoughts on adding an environment variable that is parsed as default config directly. Cant really think of a better option off the top of my head. I'd be happy to implement this request in that way.

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

Successfully merging a pull request may close this issue.

3 participants