Skip to content

Commit ee7603f

Browse files
clydinalexeagle
authored andcommitted
feat(@schematics/angular): add several prompts to ng-new
1 parent a94c826 commit ee7603f

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

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

+17-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"$default": {
1616
"$source": "argv",
1717
"index": 0
18-
}
18+
},
19+
"x-prompt": "What name would you like to use for the project?"
1920
},
2021
"experimentalIvy": {
2122
"description": "EXPERIMENTAL: Specifies whether to create a new application which uses the Ivy rendering engine.",
@@ -98,19 +99,32 @@
9899
"routing": {
99100
"type": "boolean",
100101
"description": "Generates a routing module.",
101-
"default": false
102+
"default": false,
103+
"x-prompt": "Would you like to generate a routing module?"
102104
},
103105
"prefix": {
104106
"type": "string",
105107
"format": "html-selector",
106108
"description": "The prefix to apply to generated selectors.",
109+
"minLength": 1,
107110
"default": "app",
108111
"alias": "p"
109112
},
110113
"style": {
111114
"description": "The file extension to be used for style files.",
112115
"type": "string",
113-
"default": "css"
116+
"default": "css",
117+
"x-prompt": {
118+
"message": "Which stylesheet format would you like to use?",
119+
"type": "list",
120+
"items": [
121+
{ "value": "css", "label": "CSS" },
122+
{ "value": "scss", "label": "SCSS [ http://sass-lang.com ]" },
123+
{ "value": "sass", "label": "SASS [ http://sass-lang.com ]" },
124+
{ "value": "less", "label": "LESS [ http://lesscss.org ]" },
125+
{ "value": "styl", "label": "Stylus [ http://stylus-lang.com ]" }
126+
]
127+
}
114128
},
115129
"skipTests": {
116130
"description": "Skip creating spec files.",

0 commit comments

Comments
 (0)