-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
implemented better type safety for adding future prompts #15
Conversation
My bad, the limitation is that Prisma has to be selected in order for NextAuth to be installed. Selecting NextAuth but not Prisma will cause the base |
Thank you for migrating all the console.logs to the logger, that was long overdue. Yes for next-auth, prisma is required, I think the existing select prompt was fine. But if more people like this multi select prompt, we can have an option for What do you think? |
Sure, that would work. However, there would still be the issue with expansion when/if adding more packages from the init.tips stack (I guess there is really only Zustand left right now...) Theo mentioned an enhancements with passing a whole configuration and installing each package separately (on stream) which would require each package to be individually selected and that was my plan to tackle next if that's something you'd like (it's your project after all) |
Yeah I would love that. What do you have in mind for making that work? |
I have never done anything like it before so perhaps its more difficult than I imagine, but my idea was just having a base Next.js app as the template-folder. Then have separate folders like addons/tailwind, addons/trpc, addons/prisma, addons/next-auth and have installation scripts for all of them that puts those files where they should.
The diffucult part I can see is how to change the _app.tsx accordingly. I can take a first look at it tonight and see if its possible.
Hämta Outlook för iOS<https://aka.ms/o0ukef>
…________________________________
Från: Shoubhit Dash ***@***.***>
Skickat: Sunday, June 19, 2022 5:31:33 AM
Till: nexxeln/create-t3-app ***@***.***>
Kopia: Julius Marminge ***@***.***>; Author ***@***.***>
Ämne: Re: [nexxeln/create-t3-app] implemented better type safety for adding future prompts (PR #15)
Yeah I would love that. What do you have in mind for making that work?
—
Reply to this email directly, view it on GitHub<#15 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMKRV3RYETAVRQDO7NA6DUDVP2IBLANCNFSM5ZE54RZA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yeah I was looking into this too, we could use something like jscodeshift, BlitzJS uses this for their recipes, but I'm not sure how that will work here. |
Cool, I have some time available tonight and early next week to look into this. What do you want me to do about this pr? Go back to the individual selects instead of the multi one?
Hämta Outlook för iOS<https://aka.ms/o0ukef>
…________________________________
Från: Shoubhit Dash ***@***.***>
Skickat: Sunday, June 19, 2022 10:23:25 AM
Till: nexxeln/create-t3-app ***@***.***>
Kopia: Julius Marminge ***@***.***>; Author ***@***.***>
Ämne: Re: [nexxeln/create-t3-app] implemented better type safety for adding future prompts (PR #15)
Yeah I was looking into this too, we could use something like jscodeshift<https://github.com/facebook/jscodeshift>, BlitzJS uses this for their recipes<https://github.com/blitz-js/blitz/tree/canary/recipes>, but I'm not sure how that will work here.
—
Reply to this email directly, view it on GitHub<#15 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMKRV3UV2T7JEVIHACJD3CDVP3KH3ANCNFSM5ZE54RZA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yeah I'd like that, after that I'll merge it. After that we can talk about how to use jscodeshift on discord maybe, and work together on it. |
This looks good thank you so much! |
implemented better type safety for adding future prompts
Put all the prompts into an array with some type safety so that future prompts can be added and get some warnings.
The packages are now enables as a multi-select so adding more packages is easier and doesn't require a new prompt to be added.
Also put in some response messages such as when leaving name blank (Closing #11 in the process). See a demo here (CleanShot link).
There is a limitation however. If selecting Next-Auth, but not Prisma, it will go ahead and create a project with both of them due to there only being one Next-Auth template available. I can look into perhaps making it so that every individual package is installed separately, and configs copied over accordingly, so that there won't have to be a template-folder for each combination.