Skip to content
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

[CLI] Options parsing, add support for --version #651

Closed
wants to merge 4 commits into from

Conversation

pedro
Copy link

@pedro pedro commented Apr 3, 2015

  • Using commander to parse command line options so it's a bit more declarative/extensible
  • Support for react-native --version

Pedro Belo added 3 commits April 3, 2015 12:12
make the cli interface a bit more declarative and extensible
this way commander will print version on -V or --version
@vjeux
Copy link
Contributor

vjeux commented Apr 3, 2015

Looks good to me, @frantic what do you think?

@gaearon
Copy link
Collaborator

gaearon commented Apr 3, 2015

Commander wasn't a nice option for Babel:

babel/babel#836 (comment)
babel/babel#756 (comment)

@frantic
Copy link
Contributor

frantic commented Apr 3, 2015

@pedro why commander? Did you consider any alternatives?

@pedro
Copy link
Author

pedro commented Apr 3, 2015

Interesting – I just went with Commander because of the nice interface and how it wraps stuff like the help view. Looked at minimist too, but it's pretty raw so we'd still have to do validation/help screen/etc.

And just found argparse, thoughts on it?

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 7, 2015
@brentvatne
Copy link
Collaborator

ping @frantic

@brentvatne brentvatne changed the title Cli tweaks [CLI] Options parsing, add support for --version Jun 1, 2015
@frantic
Copy link
Contributor

frantic commented Jun 1, 2015

We already use optimist in RN, can we use it for this as well for consistency?

@pedro
Copy link
Author

pedro commented Jun 1, 2015

For sure, sounds good! I'll bring it in in another pull.
Thanks folks!

@pedro pedro closed this Jun 1, 2015
@frantic
Copy link
Contributor

frantic commented Jun 1, 2015

🆒 Also note there is #1125 that is likely to be merged in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants