CVarisco / create-component-app

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

Provide example of how to create custom templates #16

Closed vb closed 7 years ago

vb commented 7 years ago

The description on how to create custom templates is pretty thin. Could you provide a more detailed example?

CVarisco commented 7 years ago

Hi @viktorbergehall ! Yes, you are right.

I'm creating a .md file with more details about the custom templates.

Thanks for your support 🚀

CVarisco commented 7 years ago

Hi @viktorbergehall !

I created a doc file to create custom templates. Give me some feedbacks 👍

vb commented 7 years ago

Thanks for the guide!

A couple of thoughts:

CVarisco commented 7 years ago

How do you specify pure/stateless/class in templates ?
If you collect all settings in one file then the settings doesn't seem to apply

With type custom you can't specify from the config the type because I can't know what are you writing in your template. So, the only options that you can use when you use type:custom are:

The other will be ignore because you are writing your own templates, and in your templates folder you can put whatever you want 👍 .

It would be great if the script defaulted to look for settings in .ccarc/config.json (or something) rather than you'd have to specify it with the config flag.

It is already in this way 🙂 If doesn't work give me additional information to fix the bug 💪

It would be great if you could specify file name for each file.

Cool 🌮 Do you want contribute with this enhancement ?

I'm running create-react-appand that looks for test files with the naming .test.js so files name .tests.js doesn't run by default

Sorry, but I don't understand what you mean 🙁

Thanks a lot for your support. If there are other issue/questions I'm here 🎉

CVarisco commented 7 years ago

Hi @viktorbergehall If you don't have any question, I'm closing the issue

Thanks a lot for your contribute 🙂