feat(angular): add --project alias, default argv source and example to move schemas (#2390)

This commit is contained in:
Jo Pearce 2020-01-28 16:46:29 +00:00 committed by GitHub
parent aab5cf9284
commit 8c99bc3da7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 86 additions and 4 deletions

View File

@ -26,6 +26,14 @@ Show what will be generated without writing to disk:
ng g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
ng g @nrwl/angular:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
@ -36,6 +44,8 @@ The folder to move the Angular project into
### projectName
Alias(es): project
Type: `string`
The name of the Angular project to move

View File

@ -26,6 +26,14 @@ Show what will be generated without writing to disk:
ng g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
ng g @nrwl/workspace:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
@ -36,6 +44,8 @@ The folder to move the project into
### projectName
Alias(es): project
Type: `string`
The name of the project to move

View File

@ -26,6 +26,14 @@ Show what will be generated without writing to disk:
nx g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
nx g @nrwl/angular:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
@ -36,6 +44,8 @@ The folder to move the Angular project into
### projectName
Alias(es): project
Type: `string`
The name of the Angular project to move

View File

@ -26,6 +26,14 @@ Show what will be generated without writing to disk:
nx g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
nx g @nrwl/workspace:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
@ -36,6 +44,8 @@ The folder to move the project into
### projectName
Alias(es): project
Type: `string`
The name of the project to move

View File

@ -26,6 +26,14 @@ Show what will be generated without writing to disk:
nx g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
nx g @nrwl/angular:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
@ -36,6 +44,8 @@ The folder to move the Angular project into
### projectName
Alias(es): project
Type: `string`
The name of the Angular project to move

View File

@ -26,6 +26,14 @@ Show what will be generated without writing to disk:
nx g move ... --dry-run
```
### Examples
Move libs/my-feature-lib to libs/shared/my-feature-lib:
```bash
nx g @nrwl/workspace:move --project my-feature-lib shared/my-feature-lib
```
## Options
### destination
@ -36,6 +44,8 @@ The folder to move the project into
### projectName
Alias(es): project
Type: `string`
The name of the project to move

View File

@ -32,7 +32,7 @@ forEachCli(cli => {
*/
it('should work for apps', () => {
const moveOutput = runCLI(
`generate @nrwl/angular:move --projectName=${app1} --destination=${newPath}`
`generate @nrwl/angular:move --project ${app1} ${newPath}`
);
// just check the output

View File

@ -48,7 +48,7 @@ forEachCli(cli => {
);
const moveOutput = runCLI(
`generate @nrwl/workspace:move --projectName=${lib1}-data-access --destination=shared/${lib1}/data-access`
`generate @nrwl/workspace:move --project ${lib1}-data-access shared/${lib1}/data-access`
);
expect(moveOutput).toContain(`DELETE libs/${lib1}/data-access`);

View File

@ -4,14 +4,25 @@
"title": "Nx Angular Move",
"description": "Move an Angular project to another folder in the workspace",
"type": "object",
"examples": [
{
"command": "g @nrwl/angular:move --project my-feature-lib shared/my-feature-lib",
"description": "Move libs/my-feature-lib to libs/shared/my-feature-lib"
}
],
"properties": {
"projectName": {
"type": "string",
"alias": "project",
"description": "The name of the Angular project to move"
},
"destination": {
"type": "string",
"description": "The folder to move the Angular project into"
"description": "The folder to move the Angular project into",
"$default": {
"$source": "argv",
"index": 0
}
}
},
"required": ["projectName", "destination"]

View File

@ -4,14 +4,25 @@
"title": "Nx Move",
"description": "Move a project to another folder in the workspace",
"type": "object",
"examples": [
{
"command": "g @nrwl/workspace:move --project my-feature-lib shared/my-feature-lib",
"description": "Move libs/my-feature-lib to libs/shared/my-feature-lib"
}
],
"properties": {
"projectName": {
"type": "string",
"alias": "project",
"description": "The name of the project to move"
},
"destination": {
"type": "string",
"description": "The folder to move the project into"
"description": "The folder to move the project into",
"$default": {
"$source": "argv",
"index": 0
}
}
},
"required": ["projectName", "destination"]