Skip to content

Commit

Permalink
feat(schematics): add message prompts for individual schematics (ngrx…
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver authored and jordanpowell88 committed Nov 14, 2019
1 parent 016a19b commit 4723c37
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 18 deletions.
9 changes: 6 additions & 3 deletions modules/schematics/src/action/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "What should be the name of the action?"
},
"path": {
"type": "string",
Expand Down Expand Up @@ -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": []
Expand Down
3 changes: 2 additions & 1 deletion modules/schematics/src/container/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
12 changes: 8 additions & 4 deletions modules/schematics/src/effect/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "What should be the name of the Effect?"
},
"path": {
"type": "string",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions modules/schematics/src/entity/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "What should be the name of the entity?"
},
"path": {
"type": "string",
Expand Down Expand Up @@ -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": []
Expand Down
9 changes: 6 additions & 3 deletions modules/schematics/src/feature/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "What should be the name of the feature?"
},
"flat": {
"type": "boolean",
Expand Down Expand Up @@ -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": []
Expand Down
9 changes: 6 additions & 3 deletions modules/schematics/src/reducer/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "What should be the name of the reducer?"
},
"path": {
"type": "string",
Expand Down Expand Up @@ -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": []
Expand Down
6 changes: 4 additions & 2 deletions modules/schematics/src/store/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "What should be the name of the state?"
},
"path": {
"type": "string",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 4723c37

Please sign in to comment.