Skip to content

Commit

Permalink
fix(@schematics/angular): the ng-new schematic should not prompt fo…
Browse files Browse the repository at this point in the history
…r style

closes #13383
  • Loading branch information
ahasall authored and Keen Yee Liau committed Aug 2, 2019
1 parent 5b3c608 commit c4a3262
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
4 changes: 4 additions & 0 deletions packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ export default function (options: ApplicationOptions): Rule {
}
validateProjectName(options.name);
options.prefix = options.prefix || 'app';
// This line and the one above shouldn't be needed, but at the moment they are.
// This is because the default value defined in the schema.json file is not
// correctly set when this schematic is run from another schematic.
options.style = options.style || Style.Css;
const appRootSelector = `${options.prefix}-root`;
const componentOptions: Partial<ComponentOptions> = !options.minimal ?
{
Expand Down
24 changes: 0 additions & 24 deletions packages/schematics/angular/ng-new/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,7 @@
"style": {
"description": "The file extension or preprocessor to use for style files.",
"type": "string",
"default": "css",
"enum": ["css", "scss", "sass", "less", "styl"],
"x-prompt": {
"message": "Which stylesheet format would you like to use?",
"type": "list",
"items": [
{ "value": "css", "label": "CSS" },
{
"value": "scss",
"label": "SCSS [ https://sass-lang.com/documentation/syntax#scss ]"
},
{
"value": "sass",
"label": "Sass [ https://sass-lang.com/documentation/syntax#the-indented-syntax ]"
},
{
"value": "less",
"label": "Less [ http://lesscss.org ]"
},
{
"value": "styl",
"label": "Stylus [ http://stylus-lang.com ]"
}
]
},
"x-user-analytics": 5
},
"skipTests": {
Expand Down

0 comments on commit c4a3262

Please sign in to comment.