Comparing version 0.3.0 to 0.3.1
@@ -123,2 +123,9 @@ #!/usr/bin/env node | ||
function controlArg(arg, label, fn) { | ||
if (arg == label || arg == '--' + label || arg == '-' + label.substr(0, 1)) { | ||
fn(); | ||
process.exit(); | ||
} | ||
} | ||
if (!nodeArgs.length) { | ||
@@ -137,13 +144,8 @@ // try to get the app from the package.json | ||
if (nodeArgs[0] == 'help') { | ||
usage(); | ||
process.exit(0); | ||
} | ||
if (nodeArgs[0] == 'version') { | ||
// control arguments test for "help" or "--help" or "-h", run the callback and exit | ||
controlArg(nodeArgs[0], 'help', usage); | ||
controlArg(nodeArgs[0], 'version', function () { | ||
sys.print('v' + meta.version + '\n'); | ||
process.exit(0); | ||
} | ||
}); | ||
if (nodeArgs[0] == '--debug') { | ||
@@ -150,0 +152,0 @@ app = nodeArgs[1]; |
@@ -12,4 +12,4 @@ { | ||
"keywords": ["monitor", "development", "restart", "autoload", "reload", "terminal"], | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"main": "./nodemon" | ||
} |
8201
6
152