CVarisco / create-component-app

Tool to generate different types of React components from the terminal. 💻
MIT License
859 stars 58 forks source link

Proposal - add support for .ts and .tsx extensions #76

Open releaf opened 6 years ago

releaf commented 6 years ago

If it isn't already supported, it'd be awesome to support TypeScript files in this project as well.

CVarisco commented 6 years ago

Hi @releaf

thanks for your proposal! Can you explain which kind of support do you think for Typescript? Which process/feature should have the support?

releaf commented 6 years ago

I think it'd be cool to be able to select from a list of TypeScript components. We could set them up to use interfaces for State and Props instead of defining PropTypes. Then we'd pass State and Props into the class or function in the case of presentational/stateless components. The only other thing we'd need to do would be to allow the user to select .ts or .tsx as a file extension.

Do you think I could accomplish all of this just by setting up a config file?

CVarisco commented 6 years ago

Hi @releaf

I'm really sorry for the delay :( Anyway, you have the capability to create your own templates and use it with create-component-app. I can help you to create a custom template if you share with me one component that you want to use as a template. Just try to follow this guide and tell me what do you think