Skip to content

Commit

Permalink
fix(help): Group global options together
Browse files Browse the repository at this point in the history
- make all the base options appear in a "Global Options:" group
- add help first, meaning it's always at the top of this group
  • Loading branch information
ErisDS authored and acburdine committed Apr 20, 2019
1 parent 33e76fd commit 84f9012
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions lib/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,33 +144,40 @@ const bootstrap = {
// Yargs magic
yargs.wrap(Math.min(150, yargs.terminalWidth()))
.epilogue('For more information, see our docs at https://docs.ghost.org/api/ghost-cli/')
.group('help', 'Global Options:')
.option('d', {
alias: 'dir',
describe: 'Folder to run command in'
describe: 'Folder to run command in',
group: 'Global Options:'
}).option('D', {
alias: 'development',
describe: 'Run in development mode',
type: 'boolean'
type: 'boolean',
group: 'Global Options:'
})
.option('V', {
alias: 'verbose',
describe: 'Enable verbose output',
type: 'boolean'
type: 'boolean',
group: 'Global Options:'
})
.options('prompt', {
describe: '[--no-prompt] Allow/Disallow UI prompting',
type: 'boolean',
default: true
default: true,
group: 'Global Options:'
})
.option('color', {
describe: '[--no-color] Allow/Disallow colorful logging',
type: 'boolean',
default: true
default: true,
group: 'Global Options:'
})
.option('auto', {
describe: 'Automatically run as much as possible',
type: 'boolean',
default: false
default: false,
group: 'Global Options:'
})
.version(false)
.parse(argv);
Expand Down

0 comments on commit 84f9012

Please sign in to comment.