diff --git a/docs/generated/cli/affected.md b/docs/generated/cli/affected.md index df94b6cba4..e56a99d66a 100644 --- a/docs/generated/cli/affected.md +++ b/docs/generated/cli/affected.md @@ -1,11 +1,11 @@ --- title: 'affected - CLI command' -description: 'Run target for affected projects.' +description: 'Run target for affected projects. See https://nx.dev/ci/features/affected for more details.' --- # affected -Run target for affected projects. +Run target for affected projects. See [https://nx.dev/ci/features/affected](/ci/features/affected) for more details. ## Usage diff --git a/docs/generated/cli/create-nx-workspace.md b/docs/generated/cli/create-nx-workspace.md index c6117aef2f..dd9c1420f4 100644 --- a/docs/generated/cli/create-nx-workspace.md +++ b/docs/generated/cli/create-nx-workspace.md @@ -17,40 +17,40 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n ## Options -| Option | Type | Description | -| -------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--allPrompts`, `--a` | boolean | Show all prompts. (Default: `false`) | -| `--appName` | string | The name of the app when using a monorepo with certain stacks. | -| `--bundler` | string | Bundler to be used to build the app. | -| `--commit.email` | string | E-mail of the committer. | -| `--commit.message` | string | Commit message. (Default: `Initial commit`) | -| `--commit.name` | string | Name of the committer. | -| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) | -| `--docker` | boolean | Generate a Dockerfile for the Node API. | -| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. | -| `--formatter` | string | Code formatter to use. | -| `--framework` | string | Framework option to be used with certain stacks. | -| `--help` | boolean | Show help. | -| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) | -| `--name` | string | Workspace name (e.g. org name). | -| `--nextAppDir` | boolean | Enable the App Router for Next.js. | -| `--nextSrcDir` | boolean | Generate a 'src/' directory for Next.js. | -| `--nxCloud`, `--ci` | `github`, `gitlab`, `azure`, `bitbucket-pipelines`, `circleci`, `skip`, `yes` | Which CI provider would you like to use? | -| `--packageManager`, `--pm` | `bun`, `npm`, `pnpm`, `yarn` | Package manager to use. (Default: `npm`) | -| `--prefix` | string | Prefix to use for Angular component and directive selectors. | -| `--preset` | string | Customizes the initial content of your workspace. Default presets include: ["apps", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset. | -| `--routing` | boolean | Add a routing setup for an Angular or React app. (Default: `true`) | -| `--skipGit`, `--g` | boolean | Skip initializing a git repository. (Default: `false`) | -| `--ssr` | boolean | Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application. | -| `--standaloneApi` | boolean | Use Standalone Components if generating an Angular app. (Default: `true`) | -| `--style` | string | Stylesheet type to be used with certain stacks. | -| `--unitTestRunner` | `jest`, `vitest`, `none` | Test runner to use for unit tests. | -| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) | -| `--useProjectJson` | boolean | Use a 'project.json' file for the Nx configuration instead of a 'package.json' file. This defaults to 'true' when '--no-workspaces' is used. Otherwise, it defaults to 'false'. | -| `--useReactRouter` | boolean | Generate a Server-Side Rendered (SSR) React app using React Router. | -| `--version` | boolean | Show version number. | -| `--workspaces` | boolean | Use package manager workspaces. (Default: `true`) | -| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. | +| Option | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--allPrompts`, `--a` | boolean | Show all prompts. (Default: `false`) | +| `--appName` | string | The name of the app when using a monorepo with certain stacks. | +| `--bundler` | string | Bundler to be used to build the app. | +| `--commit.email` | string | E-mail of the committer. | +| `--commit.message` | string | Commit message. (Default: `Initial commit`) | +| `--commit.name` | string | Name of the committer. | +| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) | +| `--docker` | boolean | Generate a Dockerfile for the Node API. | +| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. | +| `--formatter` | string | Code formatter to use. | +| `--framework` | string | Framework option to be used with certain stacks. | +| `--help` | boolean | Show help. | +| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) | +| `--name` | string | Workspace name (e.g. org name). | +| `--nextAppDir` | boolean | Enable the App Router for Next.js. | +| `--nextSrcDir` | boolean | Generate a 'src/' directory for Next.js. | +| `--nxCloud`, `--ci` | `github`, `gitlab`, `azure`, `bitbucket-pipelines`, `circleci`, `skip`, `yes` | Which CI provider would you like to use? | +| `--packageManager`, `--pm` | `bun`, `npm`, `pnpm`, `yarn` | Package manager to use. (Default: `npm`) | +| `--prefix` | string | Prefix to use for Angular component and directive selectors. | +| `--preset` | string | Customizes the initial content of your workspace. Default presets include: ["apps", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see [https://nx.dev/extending-nx/recipes/create-preset](/extending-nx/recipes/create-preset). | +| `--routing` | boolean | Add a routing setup for an Angular or React app. (Default: `true`) | +| `--skipGit`, `--g` | boolean | Skip initializing a git repository. (Default: `false`) | +| `--ssr` | boolean | Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application. | +| `--standaloneApi` | boolean | Use Standalone Components if generating an Angular app. (Default: `true`) | +| `--style` | string | Stylesheet type to be used with certain stacks. | +| `--unitTestRunner` | `jest`, `vitest`, `none` | Test runner to use for unit tests. | +| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) | +| `--useProjectJson` | boolean | Use a 'project.json' file for the Nx configuration instead of a 'package.json' file. This defaults to 'true' when '--no-workspaces' is used. Otherwise, it defaults to 'false'. | +| `--useReactRouter` | boolean | Generate a Server-Side Rendered (SSR) React app using React Router. | +| `--version` | boolean | Show version number. | +| `--workspaces` | boolean | Use package manager workspaces. (Default: `true`) | +| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. | ## Presets diff --git a/docs/generated/cli/init.md b/docs/generated/cli/init.md index b0897add55..98d6ea0791 100644 --- a/docs/generated/cli/init.md +++ b/docs/generated/cli/init.md @@ -5,7 +5,7 @@ description: 'Adds Nx to any type of workspace. It installs nx, creates an nx.js # init -Adds Nx to any type of workspace. It installs nx, creates an nx.json configuration file and optionally sets up remote caching. For more info, check https://nx.dev/recipes/adopting-nx. +Adds Nx to any type of workspace. It installs nx, creates an nx.json configuration file and optionally sets up remote caching. For more info, check [https://nx.dev/recipes/adopting-nx](/recipes/adopting-nx). ## Usage diff --git a/docs/generated/cli/login.md b/docs/generated/cli/login.md index 9cd2d24266..95872e1483 100644 --- a/docs/generated/cli/login.md +++ b/docs/generated/cli/login.md @@ -17,9 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx` ## Options -| Option | Type | Description | -| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--help` | boolean | Show help. | -| `--nxCloudUrl` | string | The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app. | -| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). | -| `--version` | boolean | Show version number. | +| Option | Type | Description | +| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--help` | boolean | Show help. | +| `--nxCloudUrl` | string | The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to [https://cloud.nx.app](https://cloud.nx.app). | +| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). | +| `--version` | boolean | Show version number. | diff --git a/docs/generated/manifests/nx-api.json b/docs/generated/manifests/nx-api.json index d09917fb22..34176fd382 100644 --- a/docs/generated/manifests/nx-api.json +++ b/docs/generated/manifests/nx-api.json @@ -3148,7 +3148,7 @@ "itemList": [], "isExternal": false, "path": "/nx-api/nx/documents/affected", - "tags": ["run-tasks"], + "tags": ["run-tasks", "affected"], "originalFilePath": "generated/cli/affected" }, "/nx-api/nx/documents/format-check": { diff --git a/docs/generated/manifests/tags.json b/docs/generated/manifests/tags.json index ea7b25de58..b4a21c2c5b 100644 --- a/docs/generated/manifests/tags.json +++ b/docs/generated/manifests/tags.json @@ -1590,5 +1590,14 @@ "name": "Prepare applications for deployment via CI", "path": "/ci/recipes/other/ci-deployment" } + ], + "affected": [ + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/affected", + "id": "affected", + "name": "affected", + "path": "/nx-api/nx/documents/affected" + } ] } diff --git a/docs/generated/packages-metadata.json b/docs/generated/packages-metadata.json index 7dac2068a0..5c37f7f098 100644 --- a/docs/generated/packages-metadata.json +++ b/docs/generated/packages-metadata.json @@ -3126,7 +3126,7 @@ "itemList": [], "isExternal": false, "path": "nx/documents/affected", - "tags": ["run-tasks"], + "tags": ["run-tasks", "affected"], "originalFilePath": "generated/cli/affected" }, { diff --git a/docs/generated/packages/nx/documents/affected.md b/docs/generated/packages/nx/documents/affected.md index df94b6cba4..e56a99d66a 100644 --- a/docs/generated/packages/nx/documents/affected.md +++ b/docs/generated/packages/nx/documents/affected.md @@ -1,11 +1,11 @@ --- title: 'affected - CLI command' -description: 'Run target for affected projects.' +description: 'Run target for affected projects. See https://nx.dev/ci/features/affected for more details.' --- # affected -Run target for affected projects. +Run target for affected projects. See [https://nx.dev/ci/features/affected](/ci/features/affected) for more details. ## Usage diff --git a/docs/generated/packages/nx/documents/create-nx-workspace.md b/docs/generated/packages/nx/documents/create-nx-workspace.md index c6117aef2f..dd9c1420f4 100644 --- a/docs/generated/packages/nx/documents/create-nx-workspace.md +++ b/docs/generated/packages/nx/documents/create-nx-workspace.md @@ -17,40 +17,40 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n ## Options -| Option | Type | Description | -| -------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--allPrompts`, `--a` | boolean | Show all prompts. (Default: `false`) | -| `--appName` | string | The name of the app when using a monorepo with certain stacks. | -| `--bundler` | string | Bundler to be used to build the app. | -| `--commit.email` | string | E-mail of the committer. | -| `--commit.message` | string | Commit message. (Default: `Initial commit`) | -| `--commit.name` | string | Name of the committer. | -| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) | -| `--docker` | boolean | Generate a Dockerfile for the Node API. | -| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. | -| `--formatter` | string | Code formatter to use. | -| `--framework` | string | Framework option to be used with certain stacks. | -| `--help` | boolean | Show help. | -| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) | -| `--name` | string | Workspace name (e.g. org name). | -| `--nextAppDir` | boolean | Enable the App Router for Next.js. | -| `--nextSrcDir` | boolean | Generate a 'src/' directory for Next.js. | -| `--nxCloud`, `--ci` | `github`, `gitlab`, `azure`, `bitbucket-pipelines`, `circleci`, `skip`, `yes` | Which CI provider would you like to use? | -| `--packageManager`, `--pm` | `bun`, `npm`, `pnpm`, `yarn` | Package manager to use. (Default: `npm`) | -| `--prefix` | string | Prefix to use for Angular component and directive selectors. | -| `--preset` | string | Customizes the initial content of your workspace. Default presets include: ["apps", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset. | -| `--routing` | boolean | Add a routing setup for an Angular or React app. (Default: `true`) | -| `--skipGit`, `--g` | boolean | Skip initializing a git repository. (Default: `false`) | -| `--ssr` | boolean | Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application. | -| `--standaloneApi` | boolean | Use Standalone Components if generating an Angular app. (Default: `true`) | -| `--style` | string | Stylesheet type to be used with certain stacks. | -| `--unitTestRunner` | `jest`, `vitest`, `none` | Test runner to use for unit tests. | -| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) | -| `--useProjectJson` | boolean | Use a 'project.json' file for the Nx configuration instead of a 'package.json' file. This defaults to 'true' when '--no-workspaces' is used. Otherwise, it defaults to 'false'. | -| `--useReactRouter` | boolean | Generate a Server-Side Rendered (SSR) React app using React Router. | -| `--version` | boolean | Show version number. | -| `--workspaces` | boolean | Use package manager workspaces. (Default: `true`) | -| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. | +| Option | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--allPrompts`, `--a` | boolean | Show all prompts. (Default: `false`) | +| `--appName` | string | The name of the app when using a monorepo with certain stacks. | +| `--bundler` | string | Bundler to be used to build the app. | +| `--commit.email` | string | E-mail of the committer. | +| `--commit.message` | string | Commit message. (Default: `Initial commit`) | +| `--commit.name` | string | Name of the committer. | +| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) | +| `--docker` | boolean | Generate a Dockerfile for the Node API. | +| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. | +| `--formatter` | string | Code formatter to use. | +| `--framework` | string | Framework option to be used with certain stacks. | +| `--help` | boolean | Show help. | +| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) | +| `--name` | string | Workspace name (e.g. org name). | +| `--nextAppDir` | boolean | Enable the App Router for Next.js. | +| `--nextSrcDir` | boolean | Generate a 'src/' directory for Next.js. | +| `--nxCloud`, `--ci` | `github`, `gitlab`, `azure`, `bitbucket-pipelines`, `circleci`, `skip`, `yes` | Which CI provider would you like to use? | +| `--packageManager`, `--pm` | `bun`, `npm`, `pnpm`, `yarn` | Package manager to use. (Default: `npm`) | +| `--prefix` | string | Prefix to use for Angular component and directive selectors. | +| `--preset` | string | Customizes the initial content of your workspace. Default presets include: ["apps", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see [https://nx.dev/extending-nx/recipes/create-preset](/extending-nx/recipes/create-preset). | +| `--routing` | boolean | Add a routing setup for an Angular or React app. (Default: `true`) | +| `--skipGit`, `--g` | boolean | Skip initializing a git repository. (Default: `false`) | +| `--ssr` | boolean | Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application. | +| `--standaloneApi` | boolean | Use Standalone Components if generating an Angular app. (Default: `true`) | +| `--style` | string | Stylesheet type to be used with certain stacks. | +| `--unitTestRunner` | `jest`, `vitest`, `none` | Test runner to use for unit tests. | +| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) | +| `--useProjectJson` | boolean | Use a 'project.json' file for the Nx configuration instead of a 'package.json' file. This defaults to 'true' when '--no-workspaces' is used. Otherwise, it defaults to 'false'. | +| `--useReactRouter` | boolean | Generate a Server-Side Rendered (SSR) React app using React Router. | +| `--version` | boolean | Show version number. | +| `--workspaces` | boolean | Use package manager workspaces. (Default: `true`) | +| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. | ## Presets diff --git a/docs/generated/packages/nx/documents/init.md b/docs/generated/packages/nx/documents/init.md index b0897add55..98d6ea0791 100644 --- a/docs/generated/packages/nx/documents/init.md +++ b/docs/generated/packages/nx/documents/init.md @@ -5,7 +5,7 @@ description: 'Adds Nx to any type of workspace. It installs nx, creates an nx.js # init -Adds Nx to any type of workspace. It installs nx, creates an nx.json configuration file and optionally sets up remote caching. For more info, check https://nx.dev/recipes/adopting-nx. +Adds Nx to any type of workspace. It installs nx, creates an nx.json configuration file and optionally sets up remote caching. For more info, check [https://nx.dev/recipes/adopting-nx](/recipes/adopting-nx). ## Usage diff --git a/docs/generated/packages/nx/documents/login.md b/docs/generated/packages/nx/documents/login.md index 9cd2d24266..95872e1483 100644 --- a/docs/generated/packages/nx/documents/login.md +++ b/docs/generated/packages/nx/documents/login.md @@ -17,9 +17,9 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx` ## Options -| Option | Type | Description | -| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--help` | boolean | Show help. | -| `--nxCloudUrl` | string | The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app. | -| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). | -| `--version` | boolean | Show version number. | +| Option | Type | Description | +| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--help` | boolean | Show help. | +| `--nxCloudUrl` | string | The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to [https://cloud.nx.app](https://cloud.nx.app). | +| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). | +| `--version` | boolean | Show version number. | diff --git a/docs/map.json b/docs/map.json index ce00d863ca..58448dcf26 100644 --- a/docs/map.json +++ b/docs/map.json @@ -2216,7 +2216,7 @@ }, { "name": "affected", - "tags": ["run-tasks"], + "tags": ["run-tasks", "affected"], "id": "affected", "file": "generated/cli/affected" }, diff --git a/packages/nx/src/command-line/affected/command-object.ts b/packages/nx/src/command-line/affected/command-object.ts index afbfe01fe5..030b860a24 100644 --- a/packages/nx/src/command-line/affected/command-object.ts +++ b/packages/nx/src/command-line/affected/command-object.ts @@ -14,7 +14,8 @@ import { export const yargsAffectedCommand: CommandModule = { command: 'affected', - describe: 'Run target for affected projects.', + describe: + 'Run target for affected projects. See https://nx.dev/ci/features/affected for more details.', builder: (yargs) => linkToNxDevAndExamples( withAffectedOptions( diff --git a/scripts/documentation/utils.ts b/scripts/documentation/utils.ts index cc3371a4a5..f692e6b0c6 100644 --- a/scripts/documentation/utils.ts +++ b/scripts/documentation/utils.ts @@ -131,19 +131,30 @@ export async function formatWithPrettier(filePath: string, content: string) { return format(content, options); } +export function wrapLinks(content: string): string { + const urlRegex = /(https?:\/\/)[^\s]+[a-zA-Z][a-zA-Z]/g; + const links = content.match(urlRegex) || []; + for (const link of links) { + const wrappedLink = `[${link}](${link.replace('https://nx.dev', '')})`; + content = content.replace(link, wrappedLink); + } + return content; +} + export function formatDescription( description: string, deprecated: boolean | string ) { + const updatedDescription = wrapLinks(description); if (!deprecated) { - return description; + return updatedDescription; } if (!description) { return `${bold('Deprecated:')} ${deprecated}`; } return deprecated === true - ? `${bold('Deprecated:')} ${description}` - : mdLines(`${bold('Deprecated:')} ${deprecated}`, description); + ? `${bold('Deprecated:')} ${updatedDescription}` + : mdLines(`${bold('Deprecated:')} ${deprecated}`, updatedDescription); } export function getCommands(command: any) {