Skip to content

Commit

Permalink
Tweaked CLI output colors
Browse files Browse the repository at this point in the history
  • Loading branch information
pahen committed Jan 18, 2017
1 parent 52d243f commit 3abef32
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/output.js
Expand Up @@ -7,6 +7,7 @@ const red = chalk.red;
const cyan = chalk.cyan;
const grey = chalk.grey;
const green = chalk.green;
const yellow = chalk.yellow;

/**
* Print given object as JSON.
Expand Down Expand Up @@ -55,7 +56,7 @@ module.exports.summary = function (modules, opts) {
if (opts.json) {
o[id] = modules[id].length;
} else {
console.log(`${id}: ${cyan.bold(modules[id].length)}`);
console.log(cyan.bold(`${id}: `) + yellow.bold(modules[id].length));
}
});

Expand Down Expand Up @@ -88,9 +89,9 @@ module.exports.circular = function (res, circular, opts) {
circular.forEach((path, idx) => {
path.forEach((module, idx) => {
if (idx) {
process.stdout.write(red.bold(' > '));
process.stdout.write(grey(' > '));
}
process.stdout.write(red(module));
process.stdout.write(cyan.bold(module));
});
process.stdout.write('\n');
});
Expand All @@ -110,7 +111,7 @@ module.exports.depends = function (depends, opts) {
}

depends.forEach((id) => {
console.log(id);
console.log(cyan.bold(id));
});
};

Expand Down Expand Up @@ -140,5 +141,5 @@ module.exports.warnings = function (res) {
* @return {undefined}
*/
module.exports.error = function (err) {
console.log(red(err.stack ? err.stack : err));
console.log(red.bold(err.stack ? err.stack : err));
};

0 comments on commit 3abef32

Please sign in to comment.