supervisor
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -14,2 +14,3 @@ var fs = require("fs"); | ||
var instantKillFlag = false; | ||
var timestampFlag = false; | ||
var interactive = true; | ||
@@ -19,2 +20,3 @@ var log = console.log; | ||
var harmony_default_parameters = false; | ||
var harmony_destructuring = false; | ||
@@ -35,2 +37,4 @@ exports.run = run; | ||
harmony_default_parameters = true; | ||
} else if (arg === "--harmony_destructuring") { | ||
harmony_destructuring = true; | ||
} else if (arg === "--verbose" || arg === "-V") { | ||
@@ -67,2 +71,4 @@ verbose = true; | ||
instantKillFlag = true; | ||
} else if (arg === "--timestamp" || arg === "-s") { | ||
timestampFlag = true; | ||
} else if (arg === "--") { | ||
@@ -119,2 +125,5 @@ program = args; | ||
} | ||
if (harmony_destructuring) { | ||
program.unshift("--harmony_destructuring"); | ||
} | ||
if (executor === "coffee" && (debugFlag || debugBrkFlag)) { | ||
@@ -324,2 +333,6 @@ // coffee does not understand debug or debug-brk, make coffee pass options to node | ||
("") | ||
(" -s|--timestamp") | ||
(" Log timestamp after each run.") | ||
(" Make it easy to tell when the task last ran.") | ||
("") | ||
(" -h|--help|-?") | ||
@@ -365,2 +378,4 @@ (" Display these usage instructions.") | ||
child.addListener("exit", function (code) { | ||
logTimestamp(); | ||
if (!crash_queued) { | ||
@@ -375,2 +390,10 @@ log("Program " + exec + " " + prog.join(" ") + " exited with code " + code + "\n"); | ||
function logTimestamp() { | ||
if (timestampFlag) { | ||
// use console.log() directly rather than log() so that -q/--quiet | ||
// does not override/silence it | ||
console.log(Date().toString()); | ||
} | ||
} | ||
function crash () { | ||
@@ -377,0 +400,0 @@ |
{ | ||
"name": "supervisor", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "A supervisor program for running nodejs programs", | ||
@@ -56,3 +56,3 @@ "author": "Isaac Z. Schlueter <i@izs.me>", | ||
"nodeunit": "~0.9.0" | ||
} | ||
} | ||
} |
@@ -35,3 +35,7 @@ # node-supervisor | ||
Ignore symlinks :) | ||
-s|--timestamp | ||
Log timestamp after each run. | ||
Make it easy to tell when the task last ran. | ||
-p|--poll-interval <milliseconds> | ||
@@ -38,0 +42,0 @@ How often to poll watched files for changes. |
26727
558
119