mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 01:54:04 +08:00
refactor: clean up old ansi-colors castings
This has been fixed in https://github.com/doowb/ansi-colors/pull/44
This commit is contained in:
parent
e17015ceff
commit
a69000407c
@ -45,8 +45,7 @@ export function removeColor(text: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a separate instance to prevent unintended global changes to the color configuration
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
||||||
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
const colors = ansiColors.create();
|
||||||
const colors = (ansiColors as AnsiColors & { create: () => AnsiColors }).create();
|
|
||||||
colors.enabled = supportColor();
|
colors.enabled = supportColor();
|
||||||
|
|
||||||
export { colors };
|
export { colors };
|
||||||
|
@ -71,8 +71,7 @@ interface BarInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a separate instance to prevent unintended global changes to the color configuration
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
||||||
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
const colors = ansiColors.create();
|
||||||
const colors = (ansiColors as typeof ansiColors & { create: () => typeof ansiColors }).create();
|
|
||||||
|
|
||||||
async function _executeTarget(
|
async function _executeTarget(
|
||||||
parentLogger: logging.Logger,
|
parentLogger: logging.Logger,
|
||||||
|
@ -111,8 +111,7 @@ export async function main({
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Create a separate instance to prevent unintended global changes to the color configuration
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
||||||
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
const colors = ansiColors.create();
|
||||||
const colors = (ansiColors as typeof ansiColors & { create: () => typeof ansiColors }).create();
|
|
||||||
|
|
||||||
// Log to console.
|
// Log to console.
|
||||||
logger.pipe(filter((entry) => entry.level != 'debug' || argv['verbose'])).subscribe((entry) => {
|
logger.pipe(filter((entry) => entry.level != 'debug' || argv['verbose'])).subscribe((entry) => {
|
||||||
|
@ -45,8 +45,7 @@ export function removeColor(text: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a separate instance to prevent unintended global changes to the color configuration
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
||||||
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
const colors = ansiColors.create();
|
||||||
const colors = (ansiColors as AnsiColors & { create: () => AnsiColors }).create();
|
|
||||||
colors.enabled = supportColor();
|
colors.enabled = supportColor();
|
||||||
|
|
||||||
export { colors };
|
export { colors };
|
||||||
|
@ -117,8 +117,7 @@ export async function main({
|
|||||||
const { cliOptions, schematicOptions, _ } = parseArgs(args);
|
const { cliOptions, schematicOptions, _ } = parseArgs(args);
|
||||||
|
|
||||||
// Create a separate instance to prevent unintended global changes to the color configuration
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
||||||
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
const colors = ansiColors.create();
|
||||||
const colors = (ansiColors as typeof ansiColors & { create: () => typeof ansiColors }).create();
|
|
||||||
|
|
||||||
/** Create the DevKit Logger used through the CLI. */
|
/** Create the DevKit Logger used through the CLI. */
|
||||||
const logger = createConsoleLogger(!!cliOptions.verbose, stdout, stderr, {
|
const logger = createConsoleLogger(!!cliOptions.verbose, stdout, stderr, {
|
||||||
|
@ -27,8 +27,7 @@ export type ProcessOutput = {
|
|||||||
|
|
||||||
function _exec(options: ExecOptions, cmd: string, args: string[]): Promise<ProcessOutput> {
|
function _exec(options: ExecOptions, cmd: string, args: string[]): Promise<ProcessOutput> {
|
||||||
// Create a separate instance to prevent unintended global changes to the color configuration
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
||||||
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
const colors = ansiColors.create();
|
||||||
const colors = (ansiColors as typeof ansiColors & { create: () => typeof ansiColors }).create();
|
|
||||||
|
|
||||||
let stdout = '';
|
let stdout = '';
|
||||||
let stderr = '';
|
let stderr = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user