Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #38 - fixing up left over color codes

  • Loading branch information...
commit 86cba4b613ff36658cbdeef13f1e0199554d6966 1 parent 9f110fb
@davglass davglass authored
Showing with 8 additions and 12 deletions.
  1. +2 −2 lib/cmds/lint.js
  2. +2 −2 lib/cmds/pulls.js
  3. +4 −8 lib/util.js
View
4 lib/cmds/lint.js
@@ -148,8 +148,8 @@ mods = {
item.results.forEach(function(line) {
if (line) {
++counter;
- log.log(' #' + counter + ': ' + line.reason.yellow);
- log.log(' ' + String(line.evidence).trim() + (' // line ' + line.line + ', pos ' + line.character).grey);
+ log.log(' #' + counter + ': ' + log.color(line.reason, 'yellow'));
+ log.log(' ' + String(line.evidence).trim() + log.color(' // line ' + line.line + ', pos ' + line.character, 'white'));
}
});
log.log('');
View
4 lib/cmds/pulls.js
@@ -173,10 +173,10 @@ mods = {
if (!item.mergable) {
warn = true;
}
- console.log(m, ('#' + pad(len, item.number)).yellow,
+ console.log(m, log.color('#' + pad(len, item.number), 'yellow'),
pad(nameLen + 2, '[' + item.user.login + ']'),
item.title,
- ('//last up: ' + (new Date(item.updated_at)).toDateString()).grey);
+ log.color('//last up: ' + (new Date(item.updated_at)).toDateString(), 'white'));
});
if (warn) {
console.log('\n', util.bad, 'pull request is not mergable without issues,', util.good, 'means good to go!');
View
12 lib/util.js
@@ -32,8 +32,6 @@ var fs = require('fs'),
},
rl,
mods = {
- good: "",
- bad: "",
dedupe: function(arr) {
var o = {};
arr = arr || [];
@@ -379,10 +377,8 @@ Stack.prototype = {
mods.Stack = Stack;
-if (process.platform === 'win32') {
- mods.good = 'OK';
- mods.bad = 'X';
-}
-mods.good = mods.good.green;
-mods.bad = mods.bad.red;
+mods.good = log.good;
+mods.bad = log.bad;
+mods.progress = log.progress;
+
mods.mix(exports, mods);
Please sign in to comment.
Something went wrong with that request. Please try again.