diff --git a/docs/generated/cli/affected.md b/docs/generated/cli/affected.md index 1eee1057d3a05..832a7441c05ea 100644 --- a/docs/generated/cli/affected.md +++ b/docs/generated/cli/affected.md @@ -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 diff --git a/docs/generated/cli/run-many.md b/docs/generated/cli/run-many.md index 676b14b2038d5..077a67a46c9d3 100644 --- a/docs/generated/cli/run-many.md +++ b/docs/generated/cli/run-many.md @@ -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 diff --git a/docs/generated/packages/nx/documents/affected.md b/docs/generated/packages/nx/documents/affected.md index 1eee1057d3a05..832a7441c05ea 100644 --- a/docs/generated/packages/nx/documents/affected.md +++ b/docs/generated/packages/nx/documents/affected.md @@ -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 diff --git a/docs/generated/packages/nx/documents/run-many.md b/docs/generated/packages/nx/documents/run-many.md index 676b14b2038d5..077a67a46c9d3 100644 --- a/docs/generated/packages/nx/documents/run-many.md +++ b/docs/generated/packages/nx/documents/run-many.md @@ -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 diff --git a/packages/nx/src/command-line/examples.ts b/packages/nx/src/command-line/examples.ts index 5ff37dd0f4be1..02353a0d0d11c 100644 --- a/packages/nx/src/command-line/examples.ts +++ b/packages/nx/src/command-line/examples.ts @@ -44,6 +44,11 @@ export const examples: Record = { 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 = { 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: [ {