Permalink
a1cc98c Oct 11, 2014
@tj @fyockm
executable file 29 lines (21 sloc) 539 Bytes
#!/usr/bin/env node
/**
* Module dependencies.
*/
var program = require('../');
program
.version('0.0.1')
.option('-f, --foo', 'enable some foo')
.option('-b, --bar', 'enable some bar')
.option('-B, --baz', 'enable some baz');
// must be before .parse() since
// node's emit() is immediate
program.on('--help', function(){
console.log(' Examples:');
console.log('');
console.log(' $ custom-help --help');
console.log(' $ custom-help -h');
console.log('');
});
program.parse(process.argv);
program.help();