-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capitalization issues with component names #81
Comments
If you take a look at the template and the calls to
What is your expected behavior in this case? Which do you consider to be correct, You can create a custom template which uses You could submit a PR to allow the config file to keep certain replacements as is. You could submit a pr to change filenames to |
Running into this right now. Been doing a find and replace. It seems like the right idea would be to honor whatever the user entered. We only need to make sure the first letter is uppercased to enforce PascalCase. To change case further down the comp name seems like a overstep. |
I'm leaning toward updating the GRC default templates to use I believe this should be the default behavior, regardless of React's PascalCase convention for component names. If users want to create a custom template with their preferred casing, they must remember to type it that way in their terminal. Let me know what you guys think. |
@arminbro I love that idea, but I am not a maintainer of this codebase. We use it for a client. |
🎉 This issue has been resolved in version 8.4.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for the feedback, @john-gill-acn. As we discussed, I've adjusted to using the |
1st Capitalization issue:
npx generate-react-cli component -f test --path src/components/base
Issue:
creates test.tsx, but test.test.tsx imports ./Test, which fails
Details:
results in files called
test.tsx
test.test.tsx
test.test.tsx looks like this
2nd Capitalization issue:
npx generate-react-cli component -f ABTest --path src/components/base
Issues:
Changes component name to AbTest, with AbTestProps instead of ABTest
File name is ABTest.tsx, but ABTest.test.tsx imports ./AbTest, which fails
The text was updated successfully, but these errors were encountered: