From 36c07858710d4204bd36e258e0bddc0eb4c25396 Mon Sep 17 00:00:00 2001 From: timdeschryver <28659384+timdeschryver@users.noreply.github.com> Date: Thu, 3 Oct 2019 19:37:31 +0200 Subject: [PATCH] feat(schematics): add x-prompt messages --- modules/schematics/src/action/schema.json | 9 ++++++--- modules/schematics/src/container/schema.json | 3 ++- modules/schematics/src/effect/schema.json | 12 ++++++++---- modules/schematics/src/entity/schema.json | 6 ++++-- modules/schematics/src/feature/schema.json | 9 ++++++--- modules/schematics/src/reducer/schema.json | 9 ++++++--- modules/schematics/src/store/schema.json | 6 ++++-- 7 files changed, 36 insertions(+), 18 deletions(-) diff --git a/modules/schematics/src/action/schema.json b/modules/schematics/src/action/schema.json index 8e975f1e15..00ebef5cef 100644 --- a/modules/schematics/src/action/schema.json +++ b/modules/schematics/src/action/schema.json @@ -10,7 +10,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the action?" }, "path": { "type": "string", @@ -44,14 +45,16 @@ "default": false, "description": "Specifies if api success and failure actions should be generated.", - "aliases": ["a"] + "aliases": ["a"], + "x-prompt": "Should we generate success and failure actions?" }, "creators": { "type": "boolean", "default": false, "description": "Specifies whether to use creator functions for handling actions and reducers.", - "aliases": ["c"] + "aliases": ["c"], + "x-prompt": "Do you want to use the create function?" } }, "required": [] diff --git a/modules/schematics/src/container/schema.json b/modules/schematics/src/container/schema.json index 57b1459071..57dc659741 100644 --- a/modules/schematics/src/container/schema.json +++ b/modules/schematics/src/container/schema.json @@ -21,7 +21,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the container component?" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", diff --git a/modules/schematics/src/effect/schema.json b/modules/schematics/src/effect/schema.json index 67f1d1fe93..0683c3a546 100644 --- a/modules/schematics/src/effect/schema.json +++ b/modules/schematics/src/effect/schema.json @@ -10,7 +10,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the Effect?" }, "path": { "type": "string", @@ -38,7 +39,8 @@ "default": "", "description": "Allows specification of the declaring module.", "alias": "m", - "subtype": "filepath" + "subtype": "filepath", + "x-prompt": "To which module (path) should the effect be registered in?" }, "root": { "type": "boolean", @@ -62,14 +64,16 @@ "default": false, "description": "Specifies if effect has api success and failure actions wired up", - "aliases": ["a"] + "aliases": ["a"], + "x-prompt": "Should we wire up success and failure actions?" }, "creators": { "type": "boolean", "default": false, "description": "Specifies whether to use creator functions for handling actions, reducers, and effects.", - "aliases": ["c"] + "aliases": ["c"], + "x-prompt": "Do you want to use the create function?" }, "minimal": { "type": "boolean", diff --git a/modules/schematics/src/entity/schema.json b/modules/schematics/src/entity/schema.json index 074c4042cc..a93440f3ee 100644 --- a/modules/schematics/src/entity/schema.json +++ b/modules/schematics/src/entity/schema.json @@ -10,7 +10,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the entity?" }, "path": { "type": "string", @@ -55,7 +56,8 @@ "default": false, "description": "Specifies whether to use creator functions for handling actions and reducers.", - "aliases": ["c"] + "aliases": ["c"], + "x-prompt": "Do you want to use the create function?" } }, "required": [] diff --git a/modules/schematics/src/feature/schema.json b/modules/schematics/src/feature/schema.json index 14e4093e35..155944998a 100644 --- a/modules/schematics/src/feature/schema.json +++ b/modules/schematics/src/feature/schema.json @@ -21,7 +21,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the feature?" }, "flat": { "type": "boolean", @@ -55,14 +56,16 @@ "default": false, "description": "Specifies if api success and failure actions, reducer, and effects should be generated as part of this feature.", - "aliases": ["a"] + "aliases": ["a"], + "x-prompt": "Should we generate and wire success and failure actions?" }, "creators": { "type": "boolean", "default": false, "description": "Specifies if the actions, reducers, and effects should be created using creator functions", - "aliases": ["c"] + "aliases": ["c"], + "x-prompt": "Do you want to use the create functions?" } }, "required": [] diff --git a/modules/schematics/src/reducer/schema.json b/modules/schematics/src/reducer/schema.json index d2eeb56841..bc20ea577f 100644 --- a/modules/schematics/src/reducer/schema.json +++ b/modules/schematics/src/reducer/schema.json @@ -10,7 +10,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the reducer?" }, "path": { "type": "string", @@ -59,14 +60,16 @@ "default": false, "description": "Specifies if api success and failure actions should be added to the reducer", - "aliases": ["a"] + "aliases": ["a"], + "x-prompt": "Should we add success and failure actions to the reducer?" }, "creators": { "type": "boolean", "default": false, "description": "Specifies whether to use creator functions for handling actions and reducers.", - "aliases": ["c"] + "aliases": ["c"], + "x-prompt": "Do you want to use the create function?" } }, "required": [] diff --git a/modules/schematics/src/store/schema.json b/modules/schematics/src/store/schema.json index 7916251971..66af73160c 100644 --- a/modules/schematics/src/store/schema.json +++ b/modules/schematics/src/store/schema.json @@ -10,7 +10,8 @@ "$default": { "$source": "argv", "index": 0 - } + }, + "x-prompt": "What should be the name of the state?" }, "path": { "type": "string", @@ -38,7 +39,8 @@ "default": "", "description": "Allows specification of the declaring module.", "alias": "m", - "subtype": "filepath" + "subtype": "filepath", + "x-prompt": "To which module (path) should the state be registered in?" }, "statePath": { "type": "string",