Skip to content

Commit

Permalink
refactor(debug): improve colors
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwremmel committed May 2, 2018
1 parent 26a9a1f commit eca5b4e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ export function colorize(value: any): string {
case 'number':
return chalk.yellow(value);
case 'string':
// node modules
if (value.startsWith('@')) {
return chalk.cyan(value);
}
// filenames
if (value.includes('/')) {
return chalk.green(value);
return chalk.blue(value);
}
return chalk.blue(value);
// strings
return chalk.yellow(value);
default:
return chalk.grey(value);
}
Expand Down

0 comments on commit eca5b4e

Please sign in to comment.