Closed
Description
🚀 Feature request
Command (mark with an x
)
- [x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [x] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Description
A clear and concise description of the problem or missing capability...Within angular-cli 9.0.0-rc.0 it's possible to create schematics that will allow to use x-prompts with multi selection like this way:
{
"$schema": "http://json-schema.org/schema",
"id": "ngx-semantic-version",
"title": "ngx-semantic-version Schema",
"description": "configure commitlint, husky, commitizen and standard-version configuration",
"type": "object",
"properties": {
"packages": {
"type": "array",
"description": "select the packages that should to be installed and configured",
"uniqueItems": true,
"items": {
"type": "string"
},
"x-prompt": {
"message": "What packages do you want to be installed and configured?",
"type": "list",
"multiselect": true,
"items": ["commitlint", "commitizen", "husky", "standard-version"]
}
},
},
"required": ["packages"]
}
As the result of the x-prompt
will lead into an array of values instead of a single selected value or input, it should be also supported to configure and array of default values.
Describe the solution you'd like
It should be possible to configure "default": ["foo", "bar"],
inside the properties
:
{
"$schema": "http://json-schema.org/schema",
"id": "ngx-semantic-version",
"title": "ngx-semantic-version Schema",
"description": "configure commitlint, husky, commitizen and standard-version configuration",
"type": "object",
"properties": {
"packages": {
"type": "array",
"description": "select the packages that should to be installed and configured",
"uniqueItems": true,
"items": {
"type": "string"
},
"default": ["commitlint", "commitizen", "husky", "standard-version"],
"x-prompt": {
"message": "What packages do you want to be installed and configured?",
"type": "list",
"multiselect": true,
"items": ["commitlint", "commitizen", "husky", "standard-version"]
}
},
},
"required": ["packages"]
}