Skip to content

Commit

Permalink
fix(@angular/cli): fix colors on git bash (#7569)
Browse files Browse the repository at this point in the history
Fix #7239
  • Loading branch information
filipesilva committed Sep 6, 2017
1 parent 6bcdcfb commit 63d3950
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/@angular/cli/utilities/stats.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { bold, green, red, reset, white, yellow } from 'chalk';
import * as chalk from 'chalk';
import { stripIndents } from 'common-tags';


// Force basic color support on terminals with no color support.
// Chalk typings don't have the correct constructor parameters.
const chalkCtx = new (chalk.constructor as any)(chalk.supportsColor ? {} : { level: 1 });
const { bold, green, red, reset, white, yellow } = chalkCtx;

function _formatSize(size: number): string {
if (size <= 0) {
return '0 bytes';
Expand Down

0 comments on commit 63d3950

Please sign in to comment.