Skip to content

Commit

Permalink
Added help informaton about config overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
SwinX committed Mar 23, 2017
1 parent d451c8e commit d2d3bfa
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bin/docpub.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ program
.option('--config-path <configPath>', 'path for the config')
.option('-v --verbose', 'verbose output');

program.on('--help', () => {
console.log(' Overriding config');
console.log(' To override any config option use full option path converted to --kebab-case');
console.log('');

console.log(' Examples:');
console.log(' docpub --username user@example.com');
console.log(' docpub --token abcdefghijklmn12345');
console.log('');
console.log(' You can also use environment variables converted to snake_case with');
console.log(' docpub_ prefix');
console.log('');
console.log(' Examples:');
console.log(' docpub_url=my-awesome-docs.zendesk.com docpub');
console.log(' docpub_token=abcdefghijklmn12345 docpub');
console.log('');
console.log(' If both cli flag and env var are used, cli flag takes precedence') ;
});

program.parse(process.argv);

const docpub = new Docpub(program);
Expand Down

0 comments on commit d2d3bfa

Please sign in to comment.