feat(nx): add prompts for routing configuration

This commit is contained in:
Jason Jean 2019-06-03 17:27:38 -04:00 committed by Victor Savkin
parent 765a878090
commit cf37c8ec31
3 changed files with 43 additions and 41 deletions

View File

@ -18,39 +18,6 @@
"type": "string",
"x-prompt": "In which directory should the application be generated?"
},
"inlineStyle": {
"description": "Specifies if the style will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "s"
},
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "t"
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
"enum": ["Emulated", "Native", "None"],
"type": "string"
},
"routing": {
"type": "boolean",
"description": "Generates a routing module.",
"default": false
},
"enableIvy": {
"description": "**EXPERIMENTAL** True to create a new app that uses the Ivy rendering engine.",
"type": "boolean",
"default": false
},
"prefix": {
"type": "string",
"format": "html-selector",
"description": "The prefix to apply to generated selectors.",
"alias": "p"
},
"style": {
"description": "The file extension to be used for style files.",
"type": "string",
@ -75,6 +42,40 @@
]
}
},
"routing": {
"type": "boolean",
"description": "Generates a routing module.",
"default": false,
"x-prompt": "Would you like to configure routing for this application?"
},
"inlineStyle": {
"description": "Specifies if the style will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "s"
},
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"type": "boolean",
"default": false,
"alias": "t"
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
"enum": ["Emulated", "Native", "None"],
"type": "string"
},
"enableIvy": {
"description": "**EXPERIMENTAL** True to create a new app that uses the Ivy rendering engine.",
"type": "boolean",
"default": false
},
"prefix": {
"type": "string",
"format": "html-selector",
"description": "The prefix to apply to generated selectors.",
"alias": "p"
},
"skipTests": {
"description": "Skip creating spec files.",
"type": "boolean",

View File

@ -49,10 +49,6 @@
"default": false,
"description": "Do not update tsconfig.json for development experience."
},
"parentModule": {
"type": "string",
"description": "Update the router configuration of the parent module using loadChildren or children, depending on what `lazy` is set to."
},
"style": {
"description": "The file extension to be used for style files.",
"type": "string",
@ -87,6 +83,10 @@
"default": false,
"description": "Add RouterModule.forChild when set to true, and a simple array of routes when set to false."
},
"parentModule": {
"type": "string",
"description": "Update the router configuration of the parent module using loadChildren or children, depending on what `lazy` is set to."
},
"tags": {
"type": "string",
"description": "Add tags to the library (used for linting)",

View File

@ -50,6 +50,11 @@
]
}
},
"routing": {
"type": "boolean",
"description": "Generate application with routes",
"x-prompt": "Would you like to configure routing for this application?"
},
"skipFormat": {
"description": "Skip formatting files",
"type": "boolean",
@ -81,10 +86,6 @@
"type": "boolean",
"description": "Use class components instead of functional component",
"default": false
},
"routing": {
"type": "boolean",
"description": "Generate application with routes"
}
},
"required": []