Skip to content

Commit 1b12967

Browse files
committed
refactor(@angular-devkit/build-angular): remove redundant spinner coloring
This commit refactors the usage of the `Spinner` class in `@angular-devkit/build-angular` builders by removing explicit `colors.redBright` calls when invoking `spinner.fail()`. The `Spinner.fail()` method already applies red bright coloring internally. This change centralizes the styling logic within the `Spinner` class and prevents redundant coloring or unnecessary dependency usage at the call site.
1 parent f1ab1d3 commit 1b12967

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/angular_devkit/build_angular/src/builders/browser/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import {
4343
normalizeOptimization,
4444
urlJoin,
4545
} from '../../utils';
46-
import { colors } from '../../utils/color';
4746
import { copyAssets } from '../../utils/copy-assets';
4847
import { assertIsError } from '../../utils/error';
4948
import { i18nInlineEmittedFiles } from '../../utils/i18n-inlining';
@@ -280,7 +279,7 @@ export function buildWebpackBrowser(
280279
);
281280
spinner.succeed('Copying assets complete.');
282281
} catch (err) {
283-
spinner.fail(colors.redBright('Copying of assets failed.'));
282+
spinner.fail('Copying of assets failed.');
284283
assertIsError(err);
285284

286285
return {

packages/angular_devkit/build_angular/src/builders/server/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
deleteOutputDir,
2929
normalizeAssetPatterns,
3030
} from '../../utils';
31-
import { colors } from '../../utils/color';
3231
import { copyAssets } from '../../utils/copy-assets';
3332
import { assertIsError } from '../../utils/error';
3433
import { i18nInlineEmittedFiles } from '../../utils/i18n-inlining';
@@ -121,7 +120,7 @@ export function execute(
121120
);
122121
spinner.succeed('Copying assets complete.');
123122
} catch (err) {
124-
spinner.fail(colors.redBright('Copying of assets failed.'));
123+
spinner.fail('Copying of assets failed.');
125124
assertIsError(err);
126125

127126
return {

0 commit comments

Comments
 (0)