CVarisco / create-component-app

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

Custom templates #6

Closed CVarisco closed 7 years ago

CVarisco commented 7 years ago

You can use your own custom templates

1) Create a folder with all the files and put the COMPONENT_NAME constant to replace the name of your component. Note: the extension of the file will be used (so, use whatever you want)
Note: file with name "index" will not renamed

2) Specify the templatePath in the configuration object and set the type:"custom":

{
    "type": "custom",
    "templatesPath": "./customTemplates"
}

NOTE: With this configuration, you can add only the path parameter to set the default destination. The others parameters will be ignored