Browse Source

feat: add project parameter to proxy command

pull/5137/head
Arman Ozak 6 years ago
parent
commit
e00b09b445
  1. 24
      npm/ng-packs/packages/schematics/src/commands/proxy/schema.json
  2. 15
      npm/ng-packs/packages/schematics/src/commands/proxy/schema.ts

24
npm/ng-packs/packages/schematics/src/commands/proxy/schema.json

@ -10,22 +10,32 @@
"type": "string",
"$default": {
"$source": "argv",
"index": 1
"index": 0
},
"x-prompt": "Please enter name of the module you wish to generate proxies for. (default: app)"
},
"apiUrl": {
"alias": "a",
"source": {
"alias": "s",
"description": "The URL to get API configuration from",
"type": "string",
"x-prompt": "Plese enter URL to get API config from. Leave blank to use environment variables."
"$default": {
"$source": "argv",
"index": 1
},
"x-prompt": "Plese enter URL to get API config from. (default: environment.apis.default.url)"
},
"project": {
"alias": "p",
"description": "The project to place the generated code in",
"type": "string",
"x-prompt": "Please enter the project to place proxies in. (default: default app in workspace)"
},
"out": {
"alias": "o",
"path": {
"description": "The path to place the generated code at",
"type": "string",
"format": "path",
"x-prompt": "Plese enter a custom output path. Leave blank if you do not need one."
"default": "",
"visible": false
}
},
"required": []

15
npm/ng-packs/packages/schematics/src/commands/proxy/schema.ts

@ -1,16 +1,21 @@
export interface Schema {
/**
* The URL to get API configuration from
* The name of the module to generate code for
*/
apiUrl?: string;
module?: string;
/**
* The name of the module to generate code for
* The project to place the generated code in
*/
module?: string;
project?: string;
/**
* The path to place the generated code at
*/
out?: string;
path?: string;
/**
* The URL to get API configuration from
*/
source?: string;
}

Loading…
Cancel
Save