-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix(cli): Allow common custom scaffold template files #11755
base: main
Are you sure you want to change the base?
Conversation
I like this addition. I just want to spend some time thinking about what unit tests, if any, can be added |
thanks @Tobbe I gave it some though, but couldn't come up with any, so I thought better to ask the team. Also, this is "user land", and a somewhat "advanced" scenario, so they've already strayed out of the path, and have accepted that they're pretty much on their own, since they ejected the generators. It's me, I'm "they" 😅 |
@esteban-url I added some tests. Please take a look and edit/add as you see fit. Another thing I realized is that now when you run |
This PR fixes #11754 by adding the ability to generate test, stories and mock files when custom scaffold templates are in use.
Right now these files are not supported/generated even if a template file is there. This PR will allow a dev to define their own test, stories and mock templates for components and/or pages and have the
yarn rw g scaffold [model]
command correctly generate it for them.Please let me know what you think of it and/or it any testing is required.
Thanks!