Skip to content

Commit 4401831

Browse files
committed
fix(@angular/cli): print errors in red
Followup to #6989
1 parent f37419f commit 4401831

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/@angular/cli/utilities/stats.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { bold, green, reset, white, yellow } from 'chalk';
1+
import { bold, green, red, reset, white, yellow } from 'chalk';
22
import { stripIndents } from 'common-tags';
33

44

@@ -16,12 +16,13 @@ function _formatSize(size: number): string {
1616

1717
export function statsToString(json: any, statsConfig: any) {
1818
const colors = statsConfig.colors;
19-
const r = (x: string) => colors ? reset(x) : x;
19+
const rs = (x: string) => colors ? reset(x) : x;
2020
const w = (x: string) => colors ? bold(white(x)) : x;
2121
const g = (x: string) => colors ? bold(green(x)) : x;
22+
const r = (x: string) => colors ? bold(red(x)) : x;
2223
const y = (x: string) => colors ? bold(yellow(x)) : x;
2324

24-
return r(stripIndents`
25+
return rs(stripIndents`
2526
Date: ${w(new Date().toISOString())}
2627
Hash: ${w(json.hash)}
2728
Time: ${w('' + json.time)}ms

0 commit comments

Comments
 (0)