Skip to content

Commit

Permalink
docs(core): add example for running multiple targets (#14210)
Browse files Browse the repository at this point in the history
  • Loading branch information
barbados-clemens authored Jan 6, 2023
1 parent a631af7 commit 16aa1b5
Show file tree
Hide file tree
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
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

1 comment on commit 16aa1b5

@vercel
Copy link

@vercel vercel bot commented on 16aa1b5 Jan 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.