From 5fe86182362314a00fe20c3fb02853b562f0b637 Mon Sep 17 00:00:00 2001 From: Craig Condon Date: Wed, 27 Feb 2013 11:26:44 -0800 Subject: [PATCH] added ability to use -h or --help for help menu --- bin/nexe | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/nexe b/bin/nexe index 01bc732..5aa7a0b 100755 --- a/bin/nexe +++ b/bin/nexe @@ -2,7 +2,7 @@ var path = require('path'); -var argv = require('optimist'). +var cli = require('optimist'). usage('Usage: $0 -i [sources] -o [binary]'). options('i', { demand: true, @@ -18,9 +18,17 @@ options('o', { }). options('r', { alias: 'runtime', - default: '0.8.14', + default: '0.8.21', description: 'The node.js runtime to use' -}).argv; +}); + +var argv = cli.argv; + + +if(argv.h || argv.help) { + cli.showHelp(); + process.exit(); +} function toRelative(pt) {