Skip to content

Commit 9085de7

Browse files
devversionandrewseguin
authored andcommitted
feat(schematics): prompt for name when generating component (#13518)
* Since the CLI is able to prompt for required schema properties, we should automatically prompt for a name when a developer wants to generate a CDK or Material component.
1 parent 7ef8804 commit 9085de7

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

src/cdk/schematics/ng-generate/drag-drop/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"$default": {
2424
"$source": "argv",
2525
"index": 0
26-
}
26+
},
27+
"x-prompt": "What should be the name of the component?"
2728
},
2829
"inlineStyle": {
2930
"description": "Specifies if the style will be in the ts file.",

src/lib/schematics/address-form/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"$default": {
2424
"$source": "argv",
2525
"index": 0
26-
}
26+
},
27+
"x-prompt": "What should be the name of the component?"
2728
},
2829
"inlineStyle": {
2930
"description": "Specifies if the style will be in the ts file.",

src/lib/schematics/dashboard/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"$default": {
2424
"$source": "argv",
2525
"index": 0
26-
}
26+
},
27+
"x-prompt": "What should be the name of the component?"
2728
},
2829
"inlineStyle": {
2930
"description": "Specifies if the style will be in the ts file.",

src/lib/schematics/nav/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"$default": {
2424
"$source": "argv",
2525
"index": 0
26-
}
26+
},
27+
"x-prompt": "What should be the name of the component?"
2728
},
2829
"inlineStyle": {
2930
"description": "Specifies if the style will be in the ts file.",

src/lib/schematics/table/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"$default": {
2424
"$source": "argv",
2525
"index": 0
26-
}
26+
},
27+
"x-prompt": "What should be the name of the component?"
2728
},
2829
"inlineStyle": {
2930
"description": "Specifies if the style will be in the ts file.",

src/lib/schematics/tree/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"$default": {
2424
"$source": "argv",
2525
"index": 0
26-
}
26+
},
27+
"x-prompt": "What should be the name of the component?"
2728
},
2829
"inlineStyle": {
2930
"description": "Specifies if the style will be in the ts file.",

0 commit comments

Comments
 (0)