Skip to content

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.

2 participants