mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 15:02:11 +08:00
parent
9872d43887
commit
aa1decff10
@ -1,7 +1,12 @@
|
|||||||
import { bold, green, red, reset, white, yellow } from 'chalk';
|
import * as chalk from 'chalk';
|
||||||
import { stripIndents } from 'common-tags';
|
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 {
|
function _formatSize(size: number): string {
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
return '0 bytes';
|
return '0 bytes';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user