Only Pascal casing seems to work for custom templates
LokeSonne opened this issue · comments
Describe the bug
When I try to use anything other than Pascal-case for the files in my custom templates, they are not replaced.
To Reproduce
Steps to reproduce the behavior:
- Create a custom template for component
- name it template-name.tsx
- Add the custom template in generate-react-cli.json
"component": { "default": { "customTemplates": { "component": "./templates/template-name.tsx" },
- Run the cli, e.g. npx generate-react-cli component MyComponent
- The component file in the created component has not been changed from template.name.tsx
Expected behavior
The filename should be my-component.tsx but is template-name.tsx
Machine (please complete the following information):
- OS: [e.g. macOS Mojave]
- Node Version [e.g. v10.16.1]
Additional context
Add any other context about the problem here.
Screenshots
If applicable, add screenshots to help explain your problem.
This and also the folder name should respect the same case sensitivity as the command for example:
npx generate-react-cli component demo
should generate a folder called demo
not Demo
This and also the folder name should respect the same case sensitivity as the command for example:
npx generate-react-cli component demo
should generate a folder calleddemo
notDemo
Nope, it still doesn't work that way.
We now support any component filename format. Please check the PR above ☝️for more details.