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

Use H for host option short flag. #247

Merged
merged 1 commit into from Apr 18, 2016
Merged

Use H for host option short flag. #247

merged 1 commit into from Apr 18, 2016

Conversation

alampros
Copy link
Contributor

Allows subcommand help to display (-h).
Add program help text to show subcommand help.

Updated usage output:

$> gatsby -h

  Usage:  [command] [options]


  Commands:

    develop [options]         Start development server. Watches files and rebuilds and hot reloads if something changes
    build [options]           Build a Gatsby project.
    serve-build [options]     Serve built site.
    new [rootPath] [starter]  Create new Gatsby project.

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

To show subcommand help:

    gatsby [command] -h

Subcommand usage output:

$> gatsby develop -h

  Usage: develop [options]

  Start development server. Watches files and rebuilds and hot reloads if something changes

  Options:

    -h, --help         output usage information
    -H, --host <url>   Set host. Defaults to 0.0.0.0
    -p, --port <port>  Set port. Defaults to 8000

Fixes subcommand help display (`-h`).
Add program help text to show subcommand help.
@KyleAMathews
Copy link
Contributor

Oh is -h the default for help for commander.js?

@alampros
Copy link
Contributor Author

Yep!

@KyleAMathews
Copy link
Contributor

Ok cool :-)

So since this is a breaking change it'll need to wait until the next major release which will probably be when someone (hint hint 😉) upgrades Gatsby to React 15 #236

@KyleAMathews
Copy link
Contributor

React 15 support added in #252 so merging this in as well. Will release new version later.

@KyleAMathews KyleAMathews merged commit cf1794f into gatsbyjs:master Apr 18, 2016
@alampros alampros deleted the host-option-flag branch April 20, 2016 17:14
This was referenced Jun 6, 2021
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.

None yet

2 participants