@@ -19,7 +19,7 @@ import {getWorkspace} from '@schematics/angular/utility/config';
19
19
import { join } from 'path' ;
20
20
import { Schema } from '../schema' ;
21
21
import { createCustomTheme } from './custom-theme' ;
22
- import { red , bold } from 'chalk' ;
22
+ import { red , bold , yellow } from 'chalk' ;
23
23
24
24
/** Path segment that can be found in paths that refer to a prebuilt theme. */
25
25
const prebuiltThemePathSegment = '@angular/material/prebuilt-themes' ;
@@ -69,8 +69,8 @@ function insertCustomTheme(project: WorkspaceProject, projectName: string, host:
69
69
const customThemePath = normalize ( join ( project . sourceRoot , defaultCustomThemeFilename ) ) ;
70
70
71
71
if ( host . exists ( customThemePath ) ) {
72
- console . warn ( red ( `Cannot create a custom Angular Material theme because
73
- " ${ customThemePath } " already exists. Skipping custom theme generation.` ) ) ;
72
+ console . warn ( yellow ( `Cannot create a custom Angular Material theme because
73
+ ${ bold ( customThemePath ) } already exists. Skipping custom theme generation.` ) ) ;
74
74
return ;
75
75
}
76
76
@@ -119,9 +119,10 @@ function addThemeStyleToTarget(project: WorkspaceProject, targetName: string, ho
119
119
// theme because these files can contain custom styles, while prebuilt themes are
120
120
// always packaged and considered replaceable.
121
121
if ( stylePath . includes ( defaultCustomThemeFilename ) ) {
122
- console . warn ( red ( `Cannot add "${ bold ( assetPath ) } to the CLI project configuration ` +
123
- `because there is already a custom theme file referenced. Please manually add ` +
124
- `the "${ bold ( assetPath ) } " style file to your configuration.` ) ) ;
122
+ console . warn ( red ( `Could not add the selected theme to the CLI project configuration ` +
123
+ `because there is already a custom theme file referenced.` ) ) ;
124
+ console . warn ( red ( `Please manually add the following style file to your configuration:` ) ) ;
125
+ console . warn ( yellow ( ` ${ bold ( assetPath ) } ` ) ) ;
125
126
return ;
126
127
} else if ( stylePath . includes ( prebuiltThemePathSegment ) ) {
127
128
targetOptions . styles . splice ( index , 1 ) ;
0 commit comments