Skip to content

Conversation

@xionon
Copy link
Contributor

@xionon xionon commented Oct 5, 2014

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.

Related issue: #72

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.
@jtmalinowski
Copy link
Collaborator

Wouldn't it be nice to have something in README about this generator?

@rmosolgo
Copy link
Member

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.

@pboling
Copy link

pboling commented Oct 22, 2014

Yes, please! 👍

@xionon
Copy link
Contributor Author

xionon commented Nov 21, 2014

I added docs to the README in commit 768e3ef, is there anything else preventing this from being merged? :-)

@zpao
Copy link
Member

zpao commented Dec 8, 2014

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.

Copy link
Member

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
Copy link
Member

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.

@xionon
Copy link
Contributor Author

xionon commented Dec 10, 2014

Whoops! README updated.

@zpao
Copy link
Member

zpao commented Dec 10, 2014

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)

@xionon
Copy link
Contributor Author

xionon commented Dec 10, 2014

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.

@zpao
Copy link
Member

zpao commented Dec 10, 2014

Of course it does :) Cool, then lets do it.

zpao added a commit that referenced this pull request Dec 10, 2014
Add command-line component generator
@zpao zpao merged commit dda3c8d into reactjs:master Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants