Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(core): add example for running multiple targets #14210

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/generated/cli/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/cli/run-many.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/packages/nx/documents/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/packages/nx/documents/run-many.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions packages/nx/src/command-line/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: [
{
Expand Down