Skip to content

Commit

Permalink
docs(core): add example for affected --targets
Browse files Browse the repository at this point in the history
  • Loading branch information
barbados-clemens committed Jan 6, 2023
1 parent 0827694 commit 871e469
Showing 5 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/generated/cli/affected.md
Original file line number Diff line number Diff line change
@@ -35,6 +35,12 @@ Run the test target for all projects:
nx affected --target=test --all
```

Run lint, test, and build targets for affected projects. Requires Nx v15.4+:

```shell
nx affected --targets=lint,test,build
```

Run tests for all the projects affected by changing the index.ts file:

```shell
6 changes: 6 additions & 0 deletions docs/generated/cli/run-many.md
Original file line number Diff line number Diff line change
@@ -41,6 +41,12 @@ Test all projects ending with `*-app` except `excluded-app`:
nx run-many --target=test --projects=*-app --exclude excluded-app
```

Run lint, test, and build targets for all projects. Requires Nx v15.4+:

```shell
nx run-many --targets=lint,test,build --all
```

## Options

### all
6 changes: 6 additions & 0 deletions docs/generated/packages/nx/documents/affected.md
Original file line number Diff line number Diff line change
@@ -35,6 +35,12 @@ Run the test target for all projects:
nx affected --target=test --all
```

Run lint, test, and build targets for affected projects. Requires Nx v15.4+:

```shell
nx affected --targets=lint,test,build
```

Run tests for all the projects affected by changing the index.ts file:

```shell
6 changes: 6 additions & 0 deletions docs/generated/packages/nx/documents/run-many.md
Original file line number Diff line number Diff line change
@@ -41,6 +41,12 @@ Test all projects ending with `*-app` except `excluded-app`:
nx run-many --target=test --projects=*-app --exclude excluded-app
```

Run lint, test, and build targets for all projects. Requires Nx v15.4+:

```shell
nx run-many --targets=lint,test,build --all
```

## Options

### all
10 changes: 10 additions & 0 deletions packages/nx/src/command-line/examples.ts
Original file line number Diff line number Diff line change
@@ -44,6 +44,11 @@ export const examples: Record<string, Example[]> = {
command: 'affected --target=test --all',
description: 'Run the test target for all projects',
},
{
command: 'affected --targets=lint,test,build',
description:
'Run lint, test, and build targets for affected projects. Requires Nx v15.4+',
},
{
command: 'affected --target=test --files=libs/mylib/src/index.ts',
description:
@@ -300,6 +305,11 @@ export const examples: Record<string, Example[]> = {
description:
'Test all projects ending with `*-app` except `excluded-app`',
},
{
command: 'run-many --targets=lint,test,build --all',
description:
'Run lint, test, and build targets for all projects. Requires Nx v15.4+',
},
],
migrate: [
{

0 comments on commit 871e469

Please sign in to comment.