-
Notifications
You must be signed in to change notification settings - Fork 751
Add command-line component generator #96
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
Conversation
Adds a generator that scaffolds up a complete, but minimal, component using JSX and a propTypes hash. Run `rails generate react:component --help` for usage notes.
|
Wouldn't it be nice to have something in README about this generator? |
|
Yeah, agreed! Nobody will know it's there otherwise, right? Even just showing how to generate the usage notes would be great for the readme. |
|
Yes, please! 👍 |
|
I added docs to the README in commit 768e3ef, is there anything else preventing this from being merged? :-) |
|
Just me being terrible, sorry. And then since I let it sit we changed some APIs so we should probably update those. I'll comment inline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be node now.
README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to get the deprecated ones here in the readme.
|
Whoops! README updated. |
|
I think this looks good. Except I'm the worst reviewer and didn't think of this sooner... If you generate the same component multiple times it's going to overwrite the existing one, right? Would it make sense to ask about overwriting? (I think we should just do whatever rails does in this case) |
|
Rails actually handles all that automatically. Users get the option to skip, overwrite, view the diff, overwrite all (if multiple files are generated), or abort. |
|
Of course it does :) Cool, then lets do it. |
Add command-line component generator
Adds a generator that scaffolds up a complete, but minimal, component using JSX and a propTypes hash.
Run
rails generate react:component --helpfor usage notes.Related issue: #72