Skip to content

Commit d2ffe0e

Browse files
committed
fix(@schematics/angular): the ng-new schematic should not prompt for style
closes angular#13383
1 parent 44d4661 commit d2ffe0e

File tree

2 files changed

+5
-24
lines changed

2 files changed

+5
-24
lines changed

packages/schematics/angular/application/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,11 @@ export default function (options: ApplicationOptions): Rule {
307307
}
308308
validateProjectName(options.name);
309309
options.prefix = options.prefix || 'app';
310+
// This line and the one above shouldn't be needed, but at the moment they are.
311+
// This is because the default value defined in the schema.json file is not
312+
// correctly set when this schematic is run from another schematic.
313+
options.style = options.style || Style.Css;
314+
310315
const appRootSelector = `${options.prefix}-root`;
311316
const componentOptions: Partial<ComponentOptions> = !options.minimal ?
312317
{

packages/schematics/angular/ng-new/schema.json

-24
Original file line numberDiff line numberDiff line change
@@ -112,31 +112,7 @@
112112
"style": {
113113
"description": "The file extension or preprocessor to use for style files.",
114114
"type": "string",
115-
"default": "css",
116115
"enum": ["css", "scss", "sass", "less", "styl"],
117-
"x-prompt": {
118-
"message": "Which stylesheet format would you like to use?",
119-
"type": "list",
120-
"items": [
121-
{ "value": "css", "label": "CSS" },
122-
{
123-
"value": "scss",
124-
"label": "SCSS [ https://sass-lang.com/documentation/syntax#scss ]"
125-
},
126-
{
127-
"value": "sass",
128-
"label": "Sass [ https://sass-lang.com/documentation/syntax#the-indented-syntax ]"
129-
},
130-
{
131-
"value": "less",
132-
"label": "Less [ http://lesscss.org ]"
133-
},
134-
{
135-
"value": "styl",
136-
"label": "Stylus [ http://stylus-lang.com ]"
137-
}
138-
]
139-
},
140116
"x-user-analytics": 5
141117
},
142118
"skipTests": {

0 commit comments

Comments
 (0)