feat(angular): add --project alias, default argv source and example to move schemas (#2390)
This commit is contained in:
parent
aab5cf9284
commit
8c99bc3da7
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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`);
|
||||
|
||||
@ -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"]
|
||||
|
||||
@ -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"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user