-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: using custom config files #1078
Comments
I really like this |
I like this too, I think it'd be nice to allow something like $ p create t3-app@latest --overrides ../path/to/my/tailwind.config.cjs --overrides ../path/to/tsconfig.json and we'd infer the override based on the filename passed in 🤔 |
We can even have a config file in In addition to this we can have a flag like What do people prefer? Relative path or config file? |
Yes opting out should be supported
I dont see why not support both. A parseOverrides function which would find stuff in a deterministic order and pass the parsed config to all the installers, so then you could even mix between a global config and per-project overrides. Should also outline that we wouldn't take any responsibility whether your app will launch after applying all the overrides 🤣 |
Adding the discussion label as I think we should give this some thought before jumping into implementation |
is it possible to check passed in files in order to check them if they are valid or not? |
I don't think that's our responsibility since this would be an advanced usage feature, like you might have extra stuff in your override files that would require additional dependencies, for example the tailwind config might be using tailwind plugins that wouldn't be installed by default |
Hey, still pretty new to the T3 ecosystem but I whipped up a simple implementation of this here #1091 :-) |
Alright I've given this a little bit of thought. How does this sound?
Where the base override table will be the default override configuration and subtables act as seperate configs you use with a Overrides and parsing work like this.
This could add a lot of flexibility to scaffolding a project by adding the ability to create different configurations based on the needs of each project and mixing different configs with |
@juliusmarminge @nexxeln I've created a draft and would like to hear your opinion and additional ideas for my proposal. I have implemented it in such a way that after a project is created, it checks if any of the following folders exist:
If any of these folders exist, all files within the override directory are used to overwrite the defaults in the created project. This way, practically everything can be customized. I have also included some attachments in the draft #1503 |
Is your feature request related to a problem? Please describe.
everytime i initialize a T3 app, i have to change
tsconfig.json
,tailwind.config.cjs
to my preference.Describe the solution you'd like to see
in CLI, using a flag and directory path that contains all the custom config files, so that it would use those files instead.
yarn create t3-app --flag [PATH]
Describe alternate solutions
N/A
Additional information
No response
The text was updated successfully, but these errors were encountered: