From bda8604e76e45fe5d70bd2e350af806bbc7eaa54 Mon Sep 17 00:00:00 2001 From: indexzero Date: Sun, 21 Apr 2013 05:10:22 -0400 Subject: [PATCH] [fix] Manually merge `plain-feature` because of trailing space noise. Fixes #381. [dist] Bump dependencies --- lib/forever/cli.js | 14 ++++++++++++-- package.json | 17 +++++++++-------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/lib/forever/cli.js b/lib/forever/cli.js index be132075..b779dcc7 100644 --- a/lib/forever/cli.js +++ b/lib/forever/cli.js @@ -7,10 +7,11 @@ */ var fs = require('fs'), - util = require('util'), path = require('path'), - flatiron = require('flatiron'), + util = require('util'), + colors = require('colors'), cliff = require('cliff'), + flatiron = require('flatiron'), forever = require('../forever'); var cli = exports; @@ -51,6 +52,8 @@ var help = [ ' --sourceDir The source directory for which SCRIPT is relative to', ' --minUptime Minimum uptime (millis) for a script to not be considered "spinning"', ' --spinSleepTime Time to wait (millis) between launches of a spinning script.', + ' --colors --no-colors will disable output coloring', + ' --plain alias of --no-colors', ' --plain Disable command line colors', ' -d, --debug Forces forever to log debug output', ' -v, --verbose Turns on the verbose messages from Forever', @@ -523,6 +526,13 @@ cli.run = function () { }; cli.start = function () { + // + // Check for --no-colors/--colors and --plain option + // + if ((typeof app.argv.colors !== 'undefined' && !app.argv.colors) || app.argv.plain) { + colors.mode = 'none'; + } + if (app.config.get('help')) { return util.puts(help.join('\n')); } diff --git a/package.json b/package.json index b2c5c934..a5cc7827 100644 --- a/package.json +++ b/package.json @@ -20,23 +20,24 @@ "tools" ], "dependencies": { + "colors": "0.6.0-1", "cliff": "0.1.8", - "flatiron": "0.2.8", + "flatiron": "0.3.5", "forever-monitor": "1.2.1", - "nconf": "0.6.1", + "nconf": "0.6.7", "nssocket": "0.3.8", - "optimist": "0.3.4", - "pkginfo": "0.2.3", + "optimist": "0.4.0", + "pkginfo": "0.3.0", "timespan": "2.0.1", - "watch": "0.5.1", - "utile": "0.1.2", - "winston": "0.6.2" + "watch": "0.7.0", + "utile": "0.1.7", + "winston": "0.7.0" }, "devDependencies": { "broadway": "0.2.x", "eventemitter2": "0.4.x", "request": "2.x.x", - "vows": "0.6.x" + "vows": "0.7.x" }, "bin": { "forever": "./bin/forever",