From 229db9b49d42f028d7ca26f99352d2e5b0ef65d4 Mon Sep 17 00:00:00 2001 From: Alice Kile Date: Mon, 27 May 2024 17:47:53 +0200 Subject: [PATCH] docs(core): elaborate output-style option (#23521) ## Current Behavior `output-style` option's potential values are not explained. ## Expected Behavior add description to `output-style` option's potential values ## Related Issue(s) Fixes #20159 ![image](https://github.com/nrwl/nx/assets/5159834/15406dcf-80c3-444c-881a-268fcf9704e5) (cherry picked from commit e32b81961ffd4f594c446e5a705e6d746a91791c) --- docs/generated/cli/affected.md | 7 +++++++ docs/generated/cli/release.md | 7 +++++++ docs/generated/cli/run-many.md | 7 +++++++ docs/generated/packages/nx/documents/affected.md | 7 +++++++ docs/generated/packages/nx/documents/release.md | 7 +++++++ docs/generated/packages/nx/documents/run-many.md | 7 +++++++ .../nx/src/command-line/yargs-utils/shared-options.ts | 10 +++++++++- 7 files changed, 51 insertions(+), 1 deletion(-) diff --git a/docs/generated/cli/affected.md b/docs/generated/cli/affected.md index f951984d55c29..fe90d4ffaf321 100644 --- a/docs/generated/cli/affected.md +++ b/docs/generated/cli/affected.md @@ -147,6 +147,13 @@ Choices: [dynamic, static, stream, stream-without-prefixes] Defines how Nx emits outputs tasks logs +| option | description | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. | +| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. | +| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr | +| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output | + ### parallel Type: `string` diff --git a/docs/generated/cli/release.md b/docs/generated/cli/release.md index 8736c0a7c644e..c77e5712ea6e9 100644 --- a/docs/generated/cli/release.md +++ b/docs/generated/cli/release.md @@ -339,6 +339,13 @@ Choices: [dynamic, static, stream, stream-without-prefixes] Defines how Nx emits outputs tasks logs +| option | description | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. | +| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. | +| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr | +| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output | + ##### parallel Type: `string` diff --git a/docs/generated/cli/run-many.md b/docs/generated/cli/run-many.md index 7feac45a42b82..8f76df7b70e3a 100644 --- a/docs/generated/cli/run-many.md +++ b/docs/generated/cli/run-many.md @@ -137,6 +137,13 @@ Choices: [dynamic, static, stream, stream-without-prefixes] Defines how Nx emits outputs tasks logs +| option | description | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. | +| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. | +| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr | +| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output | + ### parallel Type: `string` diff --git a/docs/generated/packages/nx/documents/affected.md b/docs/generated/packages/nx/documents/affected.md index f951984d55c29..fe90d4ffaf321 100644 --- a/docs/generated/packages/nx/documents/affected.md +++ b/docs/generated/packages/nx/documents/affected.md @@ -147,6 +147,13 @@ Choices: [dynamic, static, stream, stream-without-prefixes] Defines how Nx emits outputs tasks logs +| option | description | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. | +| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. | +| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr | +| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output | + ### parallel Type: `string` diff --git a/docs/generated/packages/nx/documents/release.md b/docs/generated/packages/nx/documents/release.md index 8736c0a7c644e..c77e5712ea6e9 100644 --- a/docs/generated/packages/nx/documents/release.md +++ b/docs/generated/packages/nx/documents/release.md @@ -339,6 +339,13 @@ Choices: [dynamic, static, stream, stream-without-prefixes] Defines how Nx emits outputs tasks logs +| option | description | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. | +| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. | +| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr | +| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output | + ##### parallel Type: `string` diff --git a/docs/generated/packages/nx/documents/run-many.md b/docs/generated/packages/nx/documents/run-many.md index 7feac45a42b82..8f76df7b70e3a 100644 --- a/docs/generated/packages/nx/documents/run-many.md +++ b/docs/generated/packages/nx/documents/run-many.md @@ -137,6 +137,13 @@ Choices: [dynamic, static, stream, stream-without-prefixes] Defines how Nx emits outputs tasks logs +| option | description | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. | +| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. | +| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr | +| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output | + ### parallel Type: `string` diff --git a/packages/nx/src/command-line/yargs-utils/shared-options.ts b/packages/nx/src/command-line/yargs-utils/shared-options.ts index a9c26d1d18bac..12d554eb9667a 100644 --- a/packages/nx/src/command-line/yargs-utils/shared-options.ts +++ b/packages/nx/src/command-line/yargs-utils/shared-options.ts @@ -259,7 +259,15 @@ export function withOutputStyleOption( ] ) { return yargs.option('output-style', { - describe: 'Defines how Nx emits outputs tasks logs', + describe: `Defines how Nx emits outputs tasks logs + +| option | description | +| --- | --- | +| dynamic | use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. | +| static | uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. | +| stream | nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr | +| stream-without-prefixes | nx prefixes the project name the target is running on, use this option remove the project name prefix from output | +`, type: 'string', choices, });