netlify-templates / next-netlify-starter

A one-click starter project for Next and Netlify
https://next-starter.netlify.app
131 stars 229 forks source link

Create next-netlify-starter template implementation on typescript #16

Open nljms opened 2 years ago

nljms commented 2 years ago

I would like to build apps with typescript and I'm sure others would love it too. I currently have a template from your next-netlify-starter and converted it into typescript. Can you please check it out? :)

maxcell commented 2 years ago

Hey @nljms! Just want to say thank you for creating this! I am gonna take a look at this later this week and see if there is anything else we might need in there. But just really want to say how much it means to me and the rest of the team you shared this with us!

If everything looks good, I hope to connect with our internal team and see how we can share this to other lovely folks who want to start with Typescript. As long as you're okay with that?

nljms commented 2 years ago

@maxcell just let me know once you've checked it.

maxcell commented 2 years ago

Howdy @nljms! Sorry for being MIA on this!

The thing I was considering is would folks like yourself want two separate templates for TypeScript and JavaScript? I think my concern would be having the two staying out of sync of one another. What are your thoughts about that?

maxcell commented 2 years ago

Alternatively I wonder if it would be of folks interest if we defaulted to Typescript and added a way for folks to remove the TypeScript if they wanted? I feel like that's a lot of work too but would make it easier for some peeps!

0xkubt commented 2 years ago

could we make it an option during setup? to enable/disable typescript.

I agree with OP, Typescript is a must-have for me and would love it to be a bit easier

maxcell commented 2 years ago

@0xkubt What are the changes we'd need to perform to "switch on" TypeScript? I'm thinking:

Do we need to add types to our existing files (e.g. Header or _app)? Or is most likely folks would just wipe out those files?

0xkubt commented 2 years ago

comparing the output of create-next-app vs. create-next-app --typescript should show all the differences between the two. One right off the top of my head is replacing all the pages with their .tsx equivalents.

It might be easier to just maintain two templates though.

I think my concern would be having the two staying out of sync of one another.

Do the templates change often enough for that to be a large concern?

ThisIsJeron commented 10 months ago

out of curiosity is there any update for this? is the best solution to run create-next-app --typescript and then add that project to netlify?