Comparing version 0.6.3 to 0.6.4
@@ -32,9 +32,6 @@ #!/usr/bin/env node | ||
function startNode() { | ||
util.log('\x1B[32m[nodemon] starting ' + program.options.exec + '\x1B[0m'); | ||
util.log('\x1B[32m[nodemon] starting `' + program.options.exec + ' ' + program.args.join(' ') + '`\x1B[0m'); | ||
// console.log('running: ' + program.options.exec + ' ' + program.args.join(' ')) | ||
child = spawn(program.options.exec, program.args); | ||
console.log(program.options.exec, program.args); | ||
lastStarted = +new Date; | ||
@@ -60,2 +57,5 @@ | ||
child = null; | ||
} else if (program.options.exitcrash) { | ||
util.log('\x1B[1;31m[nodemon] app crashed\x1B[0m'); | ||
process.exit(0); | ||
} else { | ||
@@ -226,3 +226,4 @@ util.log('\x1B[1;31m[nodemon] app crashed - waiting for file changes before starting...\x1B[0m'); | ||
js: false, // becomes the default anyway... | ||
includeHidden: false | ||
includeHidden: false, | ||
exitcrash: false | ||
// args: [] | ||
@@ -245,2 +246,4 @@ }; | ||
options.watch.push(nodemonargs.shift()); | ||
} else if (arg === '--exitcrash') { | ||
options.exitcrash = true; | ||
} else if (arg === '--delay' || arg === '-d') { | ||
@@ -307,2 +310,3 @@ options.delay = parseInt(nodemonargs.shift()); | ||
' Options:', | ||
'', | ||
' -d, --delay n throttle restart for "n" seconds', | ||
@@ -313,2 +317,4 @@ ' -w, --watch dir watch directory "dir". use once for each', | ||
' -q, --quiet minimise nodemon messages to start/stop only', | ||
' --exitcrash exit on crash, allows use of nodemon with', | ||
' daemon tools like forever.js', | ||
' -v, --version current nodemon version', | ||
@@ -384,3 +390,3 @@ ' -h, --help you\'re looking at it', | ||
var ext = program.ext.replace(/\./g, '\\.'); | ||
addIgnoreRule('^((?!' + ext + '$).)*$', true); | ||
if (ext) addIgnoreRule('^((?!' + ext + '$).)*$', true); | ||
} | ||
@@ -411,2 +417,3 @@ }); | ||
process.on('SIGINT', function () { | ||
child && child.kill('SIGINT'); | ||
cleanup(); | ||
@@ -413,0 +420,0 @@ process.exit(0); |
@@ -12,5 +12,5 @@ { | ||
"keywords": ["monitor", "development", "restart", "autoload", "reload", "terminal"], | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"preferGlobal" : "true", | ||
"main": "./nodemon" | ||
} |
@@ -7,3 +7,3 @@ # nodemon | ||
`nodemon` does **not** require *any* changes to your code or method of development. `nodemon` simply wraps your node application and keeps an eye on any files that have changed. | ||
`nodemon` does **not** require *any* changes to your code or method of development. `nodemon` simply wraps your node application and keeps an eye on any files that have changed. Remember that `nodemon` is a replacement wrapper for `node`, think of it as replacing the word "node" on the command line when you run your script. | ||
@@ -10,0 +10,0 @@ # Installation |
18814
378