From 9085de716adcc7329ce50e790b88af3cae9ab8ca Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 11 Oct 2018 19:01:11 +0200 Subject: [PATCH] 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. --- src/cdk/schematics/ng-generate/drag-drop/schema.json | 3 ++- src/lib/schematics/address-form/schema.json | 3 ++- src/lib/schematics/dashboard/schema.json | 3 ++- src/lib/schematics/nav/schema.json | 3 ++- src/lib/schematics/table/schema.json | 3 ++- src/lib/schematics/tree/schema.json | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/cdk/schematics/ng-generate/drag-drop/schema.json b/src/cdk/schematics/ng-generate/drag-drop/schema.json index 844a4e5a205..f2c77a23ef5 100644 --- a/src/cdk/schematics/ng-generate/drag-drop/schema.json +++ b/src/cdk/schematics/ng-generate/drag-drop/schema.json @@ -23,7 +23,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the component?" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", diff --git a/src/lib/schematics/address-form/schema.json b/src/lib/schematics/address-form/schema.json index 8b723d71570..4338d14bedf 100644 --- a/src/lib/schematics/address-form/schema.json +++ b/src/lib/schematics/address-form/schema.json @@ -23,7 +23,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the component?" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", diff --git a/src/lib/schematics/dashboard/schema.json b/src/lib/schematics/dashboard/schema.json index 45ae366facf..1ca6952fdb3 100644 --- a/src/lib/schematics/dashboard/schema.json +++ b/src/lib/schematics/dashboard/schema.json @@ -23,7 +23,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the component?" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", diff --git a/src/lib/schematics/nav/schema.json b/src/lib/schematics/nav/schema.json index 9d0323ae06f..8ee25bac5fc 100644 --- a/src/lib/schematics/nav/schema.json +++ b/src/lib/schematics/nav/schema.json @@ -23,7 +23,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the component?" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", diff --git a/src/lib/schematics/table/schema.json b/src/lib/schematics/table/schema.json index 6258ae8dd55..1c778c5921b 100644 --- a/src/lib/schematics/table/schema.json +++ b/src/lib/schematics/table/schema.json @@ -23,7 +23,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the component?" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", diff --git a/src/lib/schematics/tree/schema.json b/src/lib/schematics/tree/schema.json index 849a0ab892b..4c3232caa53 100644 --- a/src/lib/schematics/tree/schema.json +++ b/src/lib/schematics/tree/schema.json @@ -23,7 +23,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the component?" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.",