next-netlify-starter icon indicating copy to clipboard operation
next-netlify-starter copied to clipboard

Create next-netlify-starter template implementation on typescript

Open nljms opened this issue 3 years ago • 8 comments

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? :)

nljms avatar Jan 22 '22 16:01 nljms

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?

maxcell avatar Feb 01 '22 18:02 maxcell

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

nljms avatar Mar 07 '22 18:03 nljms

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 avatar Mar 16 '22 20:03 maxcell

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!

maxcell avatar Mar 16 '22 20:03 maxcell

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

0xkubt avatar May 02 '22 14:05 0xkubt

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

  • Replacing our jsconfig with a tsconfig
  • Adding in the typescript dependencies
  • Adding a typecheck command

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?

maxcell avatar May 02 '22 15:05 maxcell

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?

0xkubt avatar May 02 '22 17:05 0xkubt

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?

ThisIsJeron avatar Jan 03 '24 06:01 ThisIsJeron