#!/usr/bin/env node /** * Command line interface of apeman-demo-command. */ "use strict"; var program = require('commander'), pkg = require('../package'), done = require('../lib/done'), apemanDemoCommand = require('../lib'); program .version(pkg['version']) .usage('[options] ') .description(pkg['description']) .option('-v, --verbose', "Show verbose logs"); //========================= // Show examples //========================= program.on('--help', function(){ console.log(' Examples:'); console.log(''); console.log(' $ apeman-demo-command '); console.log(''); }); program.parse(process.argv); //========================= // Run main command //========================= apemanDemoCommand.apply(apemanDemoCommand, program.args.concat({ verbose: program.verbose }), done);