File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/material/schematics/ng-add/theming Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,16 @@ const defaultCustomThemeFilename = 'custom-theme.scss';
30
30
/** Add pre-built styles to the main project style file. */
31
31
export function addThemeToAppStyles ( options : Schema ) : Rule {
32
32
return ( host : Tree , context : SchematicContext ) => {
33
- const palettes = options . theme || 'azure-blue' ;
33
+ let palettes = options . theme || 'azure-blue' ;
34
+
35
+ // For a long time, theme param could be "custom" which meant to add a custom theme. This option
36
+ // was removed since we always add a custom theme, and we expect this option to be the
37
+ // user's preferred palettes. However it's possible that users will have hardcoded CLI commands
38
+ // that pass "--theme custom" and we can gracefully handle this by assuming azure-blue.
39
+ if ( palettes === 'custom' ) {
40
+ palettes = 'azure-blue' ;
41
+ }
42
+
34
43
return insertCustomTheme ( palettes , options . project , host , context . logger ) ;
35
44
} ;
36
45
}
You can’t perform that action at this time.
0 commit comments