diff --git a/docs/angular/api-angular/executors/delegate-build.md b/docs/angular/api-angular/executors/delegate-build.md index 1642b70568..66947c2478 100644 --- a/docs/angular/api-angular/executors/delegate-build.md +++ b/docs/angular/api-angular/executors/delegate-build.md @@ -2,7 +2,7 @@ Delegates the build to a different target while supporting incremental builds. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-angular/executors/ng-packagr-lite.md b/docs/angular/api-angular/executors/ng-packagr-lite.md index 01d10d290f..46b4741641 100644 --- a/docs/angular/api-angular/executors/ng-packagr-lite.md +++ b/docs/angular/api-angular/executors/ng-packagr-lite.md @@ -2,7 +2,7 @@ Builds a library with support for incremental builds. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-angular/executors/package.md b/docs/angular/api-angular/executors/package.md index ca8d66a3dd..05d8c7ba7e 100644 --- a/docs/angular/api-angular/executors/package.md +++ b/docs/angular/api-angular/executors/package.md @@ -2,7 +2,7 @@ Builds and packages an Angular library to be distributed as an NPM package. It supports incremental builds. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-angular/executors/webpack-browser.md b/docs/angular/api-angular/executors/webpack-browser.md index 29e97194a5..b241b7b904 100644 --- a/docs/angular/api-angular/executors/webpack-browser.md +++ b/docs/angular/api-angular/executors/webpack-browser.md @@ -2,7 +2,7 @@ Builds a browser application with support for incremental builds and custom webpack configuration. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-angular/executors/webpack-server.md b/docs/angular/api-angular/executors/webpack-server.md index 2b678c2417..e6a8c5fd60 100644 --- a/docs/angular/api-angular/executors/webpack-server.md +++ b/docs/angular/api-angular/executors/webpack-server.md @@ -2,7 +2,7 @@ Serves a browser application with support for a custom webpack configuration. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-cypress/executors/cypress.md b/docs/angular/api-cypress/executors/cypress.md index 29c76e090d..7726d7ecaa 100644 --- a/docs/angular/api-cypress/executors/cypress.md +++ b/docs/angular/api-cypress/executors/cypress.md @@ -2,7 +2,7 @@ Run Cypress e2e tests -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-detox/executors/build.md b/docs/angular/api-detox/executors/build.md index bfe22ee60d..d954617e2b 100644 --- a/docs/angular/api-detox/executors/build.md +++ b/docs/angular/api-detox/executors/build.md @@ -2,7 +2,7 @@ Run the command defined in build property of the specified configuration. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-detox/executors/test.md b/docs/angular/api-detox/executors/test.md index ab6f91b347..fb0ec873e0 100644 --- a/docs/angular/api-detox/executors/test.md +++ b/docs/angular/api-detox/executors/test.md @@ -2,7 +2,7 @@ Initiating your detox test suite. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-gatsby/executors/build.md b/docs/angular/api-gatsby/executors/build.md index 00ad8c92ea..25aeb34240 100644 --- a/docs/angular/api-gatsby/executors/build.md +++ b/docs/angular/api-gatsby/executors/build.md @@ -2,7 +2,7 @@ Build a Gatsby app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-gatsby/executors/server.md b/docs/angular/api-gatsby/executors/server.md index 651a9ccc39..260374939f 100644 --- a/docs/angular/api-gatsby/executors/server.md +++ b/docs/angular/api-gatsby/executors/server.md @@ -2,7 +2,7 @@ Starts server for app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-jest/executors/jest.md b/docs/angular/api-jest/executors/jest.md index da8e8ebb4f..a2c7bf6f74 100644 --- a/docs/angular/api-jest/executors/jest.md +++ b/docs/angular/api-jest/executors/jest.md @@ -2,7 +2,7 @@ Run Jest unit tests -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-linter/executors/eslint.md b/docs/angular/api-linter/executors/eslint.md index 755a08a958..f6d6d70772 100644 --- a/docs/angular/api-linter/executors/eslint.md +++ b/docs/angular/api-linter/executors/eslint.md @@ -2,7 +2,7 @@ Run ESLint on a project -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-linter/executors/lint.md b/docs/angular/api-linter/executors/lint.md index bfef4bfdd5..ffba028b48 100644 --- a/docs/angular/api-linter/executors/lint.md +++ b/docs/angular/api-linter/executors/lint.md @@ -2,7 +2,7 @@ **[DEPRECATED]**: Please use the eslint builder instead, an automated migration was provided in v10.3.0 -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-next/executors/build.md b/docs/angular/api-next/executors/build.md index d6f48dc563..6b51b0455a 100644 --- a/docs/angular/api-next/executors/build.md +++ b/docs/angular/api-next/executors/build.md @@ -2,7 +2,7 @@ Build a Next.js app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-next/executors/export.md b/docs/angular/api-next/executors/export.md index f7e0dfdf69..792450716a 100644 --- a/docs/angular/api-next/executors/export.md +++ b/docs/angular/api-next/executors/export.md @@ -2,7 +2,7 @@ Export a Next.js app. The exported application is located at dist/$outputPath/exported. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-next/executors/server.md b/docs/angular/api-next/executors/server.md index 0a14d9dadb..ac14b7e0e2 100644 --- a/docs/angular/api-next/executors/server.md +++ b/docs/angular/api-next/executors/server.md @@ -2,7 +2,7 @@ Serve a Next.js app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-node/executors/build.md b/docs/angular/api-node/executors/build.md index 1c06ee1be8..09a7430d3a 100644 --- a/docs/angular/api-node/executors/build.md +++ b/docs/angular/api-node/executors/build.md @@ -2,7 +2,7 @@ Build a Node application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-node/executors/execute.md b/docs/angular/api-node/executors/execute.md index 3228ebaca4..16bfdfa997 100644 --- a/docs/angular/api-node/executors/execute.md +++ b/docs/angular/api-node/executors/execute.md @@ -2,7 +2,7 @@ Execute a Node application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-node/executors/package.md b/docs/angular/api-node/executors/package.md index ee1f88c4d1..d848282aab 100644 --- a/docs/angular/api-node/executors/package.md +++ b/docs/angular/api-node/executors/package.md @@ -2,7 +2,7 @@ Package a Node library -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-nx-plugin/executors/e2e.md b/docs/angular/api-nx-plugin/executors/e2e.md index 95bc12e93c..a90b50efd4 100644 --- a/docs/angular/api-nx-plugin/executors/e2e.md +++ b/docs/angular/api-nx-plugin/executors/e2e.md @@ -2,7 +2,7 @@ Creates and runs the e2e tests for an Nx Plugin. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-react-native/executors/build-android.md b/docs/angular/api-react-native/executors/build-android.md index a01624528f..3ce7bd4148 100644 --- a/docs/angular/api-react-native/executors/build-android.md +++ b/docs/angular/api-react-native/executors/build-android.md @@ -2,7 +2,7 @@ Release Build for Android. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-react-native/executors/bundle.md b/docs/angular/api-react-native/executors/bundle.md index 41c62f7ea6..d846de693c 100644 --- a/docs/angular/api-react-native/executors/bundle.md +++ b/docs/angular/api-react-native/executors/bundle.md @@ -2,7 +2,7 @@ Builds the JS bundle. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-react-native/executors/ensure-symlink.md b/docs/angular/api-react-native/executors/ensure-symlink.md index a4cf66f158..1a8e0e9b3d 100644 --- a/docs/angular/api-react-native/executors/ensure-symlink.md +++ b/docs/angular/api-react-native/executors/ensure-symlink.md @@ -2,4 +2,4 @@ Ensure workspace node_modules is symlink under app's node_modules folder. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. diff --git a/docs/angular/api-react-native/executors/run-android.md b/docs/angular/api-react-native/executors/run-android.md index d6fd62b953..27d72041fb 100644 --- a/docs/angular/api-react-native/executors/run-android.md +++ b/docs/angular/api-react-native/executors/run-android.md @@ -2,7 +2,7 @@ Runs Android application. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-react-native/executors/run-ios.md b/docs/angular/api-react-native/executors/run-ios.md index 4d6a9381bc..9a0055937f 100644 --- a/docs/angular/api-react-native/executors/run-ios.md +++ b/docs/angular/api-react-native/executors/run-ios.md @@ -2,7 +2,7 @@ Runs iOS application. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-react-native/executors/start.md b/docs/angular/api-react-native/executors/start.md index bd550d0972..7afca65aae 100644 --- a/docs/angular/api-react-native/executors/start.md +++ b/docs/angular/api-react-native/executors/start.md @@ -2,7 +2,7 @@ Starts the dev server for JS bundle. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-react-native/executors/sync-deps.md b/docs/angular/api-react-native/executors/sync-deps.md index 8ac77c9a37..abbe5a31fe 100644 --- a/docs/angular/api-react-native/executors/sync-deps.md +++ b/docs/angular/api-react-native/executors/sync-deps.md @@ -2,7 +2,7 @@ Syncs dependencies to package.json (required for autolinking). -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-storybook/executors/build.md b/docs/angular/api-storybook/executors/build.md index a3c61b1bea..7ecbe80cef 100644 --- a/docs/angular/api-storybook/executors/build.md +++ b/docs/angular/api-storybook/executors/build.md @@ -2,7 +2,7 @@ Build Storybook -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-storybook/executors/storybook.md b/docs/angular/api-storybook/executors/storybook.md index 3f66e8753d..eecae02f85 100644 --- a/docs/angular/api-storybook/executors/storybook.md +++ b/docs/angular/api-storybook/executors/storybook.md @@ -2,7 +2,7 @@ Serve Storybook -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-web/executors/build.md b/docs/angular/api-web/executors/build.md index 14cd77216d..bc4f6ba4af 100644 --- a/docs/angular/api-web/executors/build.md +++ b/docs/angular/api-web/executors/build.md @@ -2,7 +2,7 @@ Build a application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-web/executors/dev-server.md b/docs/angular/api-web/executors/dev-server.md index 187c499b93..dd89d0c1ed 100644 --- a/docs/angular/api-web/executors/dev-server.md +++ b/docs/angular/api-web/executors/dev-server.md @@ -2,7 +2,7 @@ Serve a web application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-web/executors/file-server.md b/docs/angular/api-web/executors/file-server.md index 9d1601b331..8661efc385 100644 --- a/docs/angular/api-web/executors/file-server.md +++ b/docs/angular/api-web/executors/file-server.md @@ -2,7 +2,7 @@ Serve a web application from a folder -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-web/executors/package.md b/docs/angular/api-web/executors/package.md index c275ab8fb5..1c052e3249 100644 --- a/docs/angular/api-web/executors/package.md +++ b/docs/angular/api-web/executors/package.md @@ -2,7 +2,7 @@ Package a library -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/api-workspace/executors/run-commands.md b/docs/angular/api-workspace/executors/run-commands.md index ab4891c677..97ef4b9de8 100644 --- a/docs/angular/api-workspace/executors/run-commands.md +++ b/docs/angular/api-workspace/executors/run-commands.md @@ -2,7 +2,7 @@ Run any custom commands with Nx -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Examples @@ -11,10 +11,10 @@ Options can be configured in `angular.json` when defining the executor, or when ```json //... "frontend": { - "architect": { + "targets": { //... "ls-project-root": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "ls apps/frontend/src" } @@ -39,7 +39,7 @@ You can run them sequentially by setting `parallel: false`: ```json "create-script": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "mkdir -p scripts", @@ -78,7 +78,7 @@ nx run frontend:webpack --args="--config=example.config.js" ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "webpack" } @@ -92,7 +92,7 @@ that sets the `forwardAllArgs` option to `false` as shown below: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ { @@ -110,7 +110,7 @@ Normally, `run-commands` considers the commands done when all of them have finis ```json "finish-when-ready": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "sleep 5 && echo 'FINISHED'", @@ -141,10 +141,10 @@ nx affected --target=generate-docs ```json //... "frontend": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/frontend/tsconfig.app.json" } @@ -152,10 +152,10 @@ nx affected --target=generate-docs } }, "api": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/api/tsconfig.app.json" } diff --git a/docs/angular/api-workspace/executors/run-script.md b/docs/angular/api-workspace/executors/run-script.md index bee42f75e8..733534a323 100644 --- a/docs/angular/api-workspace/executors/run-script.md +++ b/docs/angular/api-workspace/executors/run-script.md @@ -2,7 +2,50 @@ Run an npm script using Nx -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. + +## Examples + +`workspace.json`: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "build-my-project" + } + } + } +} +``` + +```bash +nx run frontend:build +``` + +The `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory. + +#### Caching Artifacts + +By default, Nx is going to cache `dist/packages/frontend`, `packages/frontend/dist`, `packages/frontend/build`, `packages/frontend/public`. If your npm script writes files to other places, you can override the list of cached outputs as follows: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "outputs": ["packages/frontend/dist", "packaged/frontend/docs"], + "options": { + "script": "build-my-project" + } + } + } +} +``` ## Options @@ -10,4 +53,4 @@ Options can be configured in `angular.json` when defining the executor, or when Type: `string` -Script to run in child process +An npm script name in the package.json file of the project (e.g., build) diff --git a/docs/angular/api-workspace/executors/tsc.md b/docs/angular/api-workspace/executors/tsc.md index 40a9e92b47..42034d661d 100644 --- a/docs/angular/api-workspace/executors/tsc.md +++ b/docs/angular/api-workspace/executors/tsc.md @@ -2,7 +2,7 @@ Build a project using TypeScript. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/angular/cli/print-affected.md b/docs/angular/cli/print-affected.md index b5a49329ea..170b607d5a 100644 --- a/docs/angular/cli/print-affected.md +++ b/docs/angular/cli/print-affected.md @@ -1,6 +1,6 @@ # print-affected -Graph execution plan +Prints information about the projects and targets affected by changes ## Usage @@ -86,6 +86,8 @@ This is the name of the tasks runner configured in nx.json ### select +Select the subset of the returned json document (e.g., --selected=projects) + ### skip-nx-cache Default: `false` diff --git a/docs/node/api-angular/executors/delegate-build.md b/docs/node/api-angular/executors/delegate-build.md index 44744eb7a1..b1ac83b9c0 100644 --- a/docs/node/api-angular/executors/delegate-build.md +++ b/docs/node/api-angular/executors/delegate-build.md @@ -2,8 +2,7 @@ Delegates the build to a different target while supporting incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-angular/executors/ng-packagr-lite.md b/docs/node/api-angular/executors/ng-packagr-lite.md index 480bf7c767..5600146283 100644 --- a/docs/node/api-angular/executors/ng-packagr-lite.md +++ b/docs/node/api-angular/executors/ng-packagr-lite.md @@ -2,8 +2,7 @@ Builds a library with support for incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-angular/executors/package.md b/docs/node/api-angular/executors/package.md index 7fb3cd1ec0..f1f814f0b2 100644 --- a/docs/node/api-angular/executors/package.md +++ b/docs/node/api-angular/executors/package.md @@ -2,8 +2,7 @@ Builds and packages an Angular library to be distributed as an NPM package. It supports incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-angular/executors/webpack-browser.md b/docs/node/api-angular/executors/webpack-browser.md index 9d4d182ecb..5b96915b8a 100644 --- a/docs/node/api-angular/executors/webpack-browser.md +++ b/docs/node/api-angular/executors/webpack-browser.md @@ -2,8 +2,7 @@ Builds a browser application with support for incremental builds and custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-angular/executors/webpack-server.md b/docs/node/api-angular/executors/webpack-server.md index b02dbb0f64..4841579caa 100644 --- a/docs/node/api-angular/executors/webpack-server.md +++ b/docs/node/api-angular/executors/webpack-server.md @@ -2,8 +2,7 @@ Serves a browser application with support for a custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-cypress/executors/cypress.md b/docs/node/api-cypress/executors/cypress.md index b78811073f..701466efd9 100644 --- a/docs/node/api-cypress/executors/cypress.md +++ b/docs/node/api-cypress/executors/cypress.md @@ -2,8 +2,7 @@ Run Cypress e2e tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-detox/executors/build.md b/docs/node/api-detox/executors/build.md index 913b5c1f68..f05e86b9a1 100644 --- a/docs/node/api-detox/executors/build.md +++ b/docs/node/api-detox/executors/build.md @@ -2,8 +2,7 @@ Run the command defined in build property of the specified configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-detox/executors/test.md b/docs/node/api-detox/executors/test.md index 8e1e87066e..0924c8c2d0 100644 --- a/docs/node/api-detox/executors/test.md +++ b/docs/node/api-detox/executors/test.md @@ -2,8 +2,7 @@ Initiating your detox test suite. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-gatsby/executors/build.md b/docs/node/api-gatsby/executors/build.md index d3a3a86516..872c7ef2d4 100644 --- a/docs/node/api-gatsby/executors/build.md +++ b/docs/node/api-gatsby/executors/build.md @@ -2,8 +2,7 @@ Build a Gatsby app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-gatsby/executors/server.md b/docs/node/api-gatsby/executors/server.md index 4598c39dd4..5dedfcd708 100644 --- a/docs/node/api-gatsby/executors/server.md +++ b/docs/node/api-gatsby/executors/server.md @@ -2,8 +2,7 @@ Starts server for app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-jest/executors/jest.md b/docs/node/api-jest/executors/jest.md index cd09f30abd..6347a70cf7 100644 --- a/docs/node/api-jest/executors/jest.md +++ b/docs/node/api-jest/executors/jest.md @@ -2,8 +2,7 @@ Run Jest unit tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-linter/executors/eslint.md b/docs/node/api-linter/executors/eslint.md index 89776bd0c7..e74720bec1 100644 --- a/docs/node/api-linter/executors/eslint.md +++ b/docs/node/api-linter/executors/eslint.md @@ -2,8 +2,7 @@ Run ESLint on a project -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-linter/executors/lint.md b/docs/node/api-linter/executors/lint.md index 3b9fabbdab..1cb04d736c 100644 --- a/docs/node/api-linter/executors/lint.md +++ b/docs/node/api-linter/executors/lint.md @@ -2,8 +2,7 @@ **[DEPRECATED]**: Please use the eslint builder instead, an automated migration was provided in v10.3.0 -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-next/executors/build.md b/docs/node/api-next/executors/build.md index 703a587a22..34aea92cc0 100644 --- a/docs/node/api-next/executors/build.md +++ b/docs/node/api-next/executors/build.md @@ -2,8 +2,7 @@ Build a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-next/executors/export.md b/docs/node/api-next/executors/export.md index 4d65e4b480..f9820a7ec0 100644 --- a/docs/node/api-next/executors/export.md +++ b/docs/node/api-next/executors/export.md @@ -2,8 +2,7 @@ Export a Next.js app. The exported application is located at dist/$outputPath/exported. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-next/executors/server.md b/docs/node/api-next/executors/server.md index 4b4d771388..51b5b49898 100644 --- a/docs/node/api-next/executors/server.md +++ b/docs/node/api-next/executors/server.md @@ -2,8 +2,7 @@ Serve a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-node/executors/build.md b/docs/node/api-node/executors/build.md index 690e5fbc4c..48073c1cbb 100644 --- a/docs/node/api-node/executors/build.md +++ b/docs/node/api-node/executors/build.md @@ -2,8 +2,7 @@ Build a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-node/executors/execute.md b/docs/node/api-node/executors/execute.md index 2175ab058e..1f69d40c89 100644 --- a/docs/node/api-node/executors/execute.md +++ b/docs/node/api-node/executors/execute.md @@ -2,8 +2,7 @@ Execute a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-node/executors/package.md b/docs/node/api-node/executors/package.md index 66a7cb2ba9..a1572c479a 100644 --- a/docs/node/api-node/executors/package.md +++ b/docs/node/api-node/executors/package.md @@ -2,8 +2,7 @@ Package a Node library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-nx-plugin/executors/e2e.md b/docs/node/api-nx-plugin/executors/e2e.md index 571631c8a2..3edd161e26 100644 --- a/docs/node/api-nx-plugin/executors/e2e.md +++ b/docs/node/api-nx-plugin/executors/e2e.md @@ -2,8 +2,7 @@ Creates and runs the e2e tests for an Nx Plugin. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-react-native/executors/build-android.md b/docs/node/api-react-native/executors/build-android.md index 270dbe5d42..e482636d70 100644 --- a/docs/node/api-react-native/executors/build-android.md +++ b/docs/node/api-react-native/executors/build-android.md @@ -2,8 +2,7 @@ Release Build for Android. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-react-native/executors/bundle.md b/docs/node/api-react-native/executors/bundle.md index b289379ad6..ddfe2cdfbd 100644 --- a/docs/node/api-react-native/executors/bundle.md +++ b/docs/node/api-react-native/executors/bundle.md @@ -2,8 +2,7 @@ Builds the JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-react-native/executors/ensure-symlink.md b/docs/node/api-react-native/executors/ensure-symlink.md index f05ec6a696..fc674026bd 100644 --- a/docs/node/api-react-native/executors/ensure-symlink.md +++ b/docs/node/api-react-native/executors/ensure-symlink.md @@ -2,5 +2,4 @@ Ensure workspace node_modules is symlink under app's node_modules folder. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. diff --git a/docs/node/api-react-native/executors/run-android.md b/docs/node/api-react-native/executors/run-android.md index edbda005cf..a32af02d3a 100644 --- a/docs/node/api-react-native/executors/run-android.md +++ b/docs/node/api-react-native/executors/run-android.md @@ -2,8 +2,7 @@ Runs Android application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-react-native/executors/run-ios.md b/docs/node/api-react-native/executors/run-ios.md index 620b6cf2e4..4208fe4106 100644 --- a/docs/node/api-react-native/executors/run-ios.md +++ b/docs/node/api-react-native/executors/run-ios.md @@ -2,8 +2,7 @@ Runs iOS application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-react-native/executors/start.md b/docs/node/api-react-native/executors/start.md index a8c4b86452..3e5b8f6348 100644 --- a/docs/node/api-react-native/executors/start.md +++ b/docs/node/api-react-native/executors/start.md @@ -2,8 +2,7 @@ Starts the dev server for JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-react-native/executors/sync-deps.md b/docs/node/api-react-native/executors/sync-deps.md index f569fc5e40..1557bf080f 100644 --- a/docs/node/api-react-native/executors/sync-deps.md +++ b/docs/node/api-react-native/executors/sync-deps.md @@ -2,8 +2,7 @@ Syncs dependencies to package.json (required for autolinking). -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-storybook/executors/build.md b/docs/node/api-storybook/executors/build.md index c4d78c6977..0d8627e565 100644 --- a/docs/node/api-storybook/executors/build.md +++ b/docs/node/api-storybook/executors/build.md @@ -2,8 +2,7 @@ Build Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-storybook/executors/storybook.md b/docs/node/api-storybook/executors/storybook.md index 735bcbe379..8425fecc21 100644 --- a/docs/node/api-storybook/executors/storybook.md +++ b/docs/node/api-storybook/executors/storybook.md @@ -2,8 +2,7 @@ Serve Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-web/executors/build.md b/docs/node/api-web/executors/build.md index 32ce9a60ed..8b4a2fff45 100644 --- a/docs/node/api-web/executors/build.md +++ b/docs/node/api-web/executors/build.md @@ -2,8 +2,7 @@ Build a application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-web/executors/dev-server.md b/docs/node/api-web/executors/dev-server.md index be0acd9920..997768ca88 100644 --- a/docs/node/api-web/executors/dev-server.md +++ b/docs/node/api-web/executors/dev-server.md @@ -2,8 +2,7 @@ Serve a web application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-web/executors/file-server.md b/docs/node/api-web/executors/file-server.md index 7f2b63ed45..35843ad0e4 100644 --- a/docs/node/api-web/executors/file-server.md +++ b/docs/node/api-web/executors/file-server.md @@ -2,8 +2,7 @@ Serve a web application from a folder -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-web/executors/package.md b/docs/node/api-web/executors/package.md index 7e47298246..50d676e6ca 100644 --- a/docs/node/api-web/executors/package.md +++ b/docs/node/api-web/executors/package.md @@ -2,8 +2,7 @@ Package a library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/api-workspace/executors/run-commands.md b/docs/node/api-workspace/executors/run-commands.md index f014ad979e..e17c257f00 100644 --- a/docs/node/api-workspace/executors/run-commands.md +++ b/docs/node/api-workspace/executors/run-commands.md @@ -2,8 +2,7 @@ Run any custom commands with Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Examples @@ -12,10 +11,10 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st ```json //... "frontend": { - "architect": { + "targets": { //... "ls-project-root": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "ls apps/frontend/src" } @@ -40,7 +39,7 @@ You can run them sequentially by setting `parallel: false`: ```json "create-script": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "mkdir -p scripts", @@ -79,7 +78,7 @@ nx run frontend:webpack --args="--config=example.config.js" ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "webpack" } @@ -93,7 +92,7 @@ that sets the `forwardAllArgs` option to `false` as shown below: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ { @@ -111,7 +110,7 @@ Normally, `run-commands` considers the commands done when all of them have finis ```json "finish-when-ready": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "sleep 5 && echo 'FINISHED'", @@ -142,10 +141,10 @@ nx affected --target=generate-docs ```json //... "frontend": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/frontend/tsconfig.app.json" } @@ -153,10 +152,10 @@ nx affected --target=generate-docs } }, "api": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/api/tsconfig.app.json" } diff --git a/docs/node/api-workspace/executors/run-script.md b/docs/node/api-workspace/executors/run-script.md index 8c0f62478b..493949f2ad 100644 --- a/docs/node/api-workspace/executors/run-script.md +++ b/docs/node/api-workspace/executors/run-script.md @@ -2,8 +2,50 @@ Run an npm script using Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. + +## Examples + +`workspace.json`: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "build-my-project" + } + } + } +} +``` + +```bash +nx run frontend:build +``` + +The `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory. + +#### Caching Artifacts + +By default, Nx is going to cache `dist/packages/frontend`, `packages/frontend/dist`, `packages/frontend/build`, `packages/frontend/public`. If your npm script writes files to other places, you can override the list of cached outputs as follows: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "outputs": ["packages/frontend/dist", "packaged/frontend/docs"], + "options": { + "script": "build-my-project" + } + } + } +} +``` ## Options @@ -11,4 +53,4 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st Type: `string` -Script to run in child process +An npm script name in the package.json file of the project (e.g., build) diff --git a/docs/node/api-workspace/executors/tsc.md b/docs/node/api-workspace/executors/tsc.md index 84e59a6be9..04bbbfd7c6 100644 --- a/docs/node/api-workspace/executors/tsc.md +++ b/docs/node/api-workspace/executors/tsc.md @@ -2,8 +2,7 @@ Build a project using TypeScript. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/node/cli/print-affected.md b/docs/node/cli/print-affected.md index b5a49329ea..170b607d5a 100644 --- a/docs/node/cli/print-affected.md +++ b/docs/node/cli/print-affected.md @@ -1,6 +1,6 @@ # print-affected -Graph execution plan +Prints information about the projects and targets affected by changes ## Usage @@ -86,6 +86,8 @@ This is the name of the tasks runner configured in nx.json ### select +Select the subset of the returned json document (e.g., --selected=projects) + ### skip-nx-cache Default: `false` diff --git a/docs/react/api-angular/executors/delegate-build.md b/docs/react/api-angular/executors/delegate-build.md index 44744eb7a1..b1ac83b9c0 100644 --- a/docs/react/api-angular/executors/delegate-build.md +++ b/docs/react/api-angular/executors/delegate-build.md @@ -2,8 +2,7 @@ Delegates the build to a different target while supporting incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-angular/executors/ng-packagr-lite.md b/docs/react/api-angular/executors/ng-packagr-lite.md index 480bf7c767..5600146283 100644 --- a/docs/react/api-angular/executors/ng-packagr-lite.md +++ b/docs/react/api-angular/executors/ng-packagr-lite.md @@ -2,8 +2,7 @@ Builds a library with support for incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-angular/executors/package.md b/docs/react/api-angular/executors/package.md index 7fb3cd1ec0..f1f814f0b2 100644 --- a/docs/react/api-angular/executors/package.md +++ b/docs/react/api-angular/executors/package.md @@ -2,8 +2,7 @@ Builds and packages an Angular library to be distributed as an NPM package. It supports incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-angular/executors/webpack-browser.md b/docs/react/api-angular/executors/webpack-browser.md index 9d4d182ecb..5b96915b8a 100644 --- a/docs/react/api-angular/executors/webpack-browser.md +++ b/docs/react/api-angular/executors/webpack-browser.md @@ -2,8 +2,7 @@ Builds a browser application with support for incremental builds and custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-angular/executors/webpack-server.md b/docs/react/api-angular/executors/webpack-server.md index b02dbb0f64..4841579caa 100644 --- a/docs/react/api-angular/executors/webpack-server.md +++ b/docs/react/api-angular/executors/webpack-server.md @@ -2,8 +2,7 @@ Serves a browser application with support for a custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-cypress/executors/cypress.md b/docs/react/api-cypress/executors/cypress.md index b78811073f..701466efd9 100644 --- a/docs/react/api-cypress/executors/cypress.md +++ b/docs/react/api-cypress/executors/cypress.md @@ -2,8 +2,7 @@ Run Cypress e2e tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-detox/executors/build.md b/docs/react/api-detox/executors/build.md index 913b5c1f68..f05e86b9a1 100644 --- a/docs/react/api-detox/executors/build.md +++ b/docs/react/api-detox/executors/build.md @@ -2,8 +2,7 @@ Run the command defined in build property of the specified configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-detox/executors/test.md b/docs/react/api-detox/executors/test.md index 8e1e87066e..0924c8c2d0 100644 --- a/docs/react/api-detox/executors/test.md +++ b/docs/react/api-detox/executors/test.md @@ -2,8 +2,7 @@ Initiating your detox test suite. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-gatsby/executors/build.md b/docs/react/api-gatsby/executors/build.md index d3a3a86516..872c7ef2d4 100644 --- a/docs/react/api-gatsby/executors/build.md +++ b/docs/react/api-gatsby/executors/build.md @@ -2,8 +2,7 @@ Build a Gatsby app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-gatsby/executors/server.md b/docs/react/api-gatsby/executors/server.md index 4598c39dd4..5dedfcd708 100644 --- a/docs/react/api-gatsby/executors/server.md +++ b/docs/react/api-gatsby/executors/server.md @@ -2,8 +2,7 @@ Starts server for app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-jest/executors/jest.md b/docs/react/api-jest/executors/jest.md index cd09f30abd..6347a70cf7 100644 --- a/docs/react/api-jest/executors/jest.md +++ b/docs/react/api-jest/executors/jest.md @@ -2,8 +2,7 @@ Run Jest unit tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-linter/executors/eslint.md b/docs/react/api-linter/executors/eslint.md index 89776bd0c7..e74720bec1 100644 --- a/docs/react/api-linter/executors/eslint.md +++ b/docs/react/api-linter/executors/eslint.md @@ -2,8 +2,7 @@ Run ESLint on a project -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-linter/executors/lint.md b/docs/react/api-linter/executors/lint.md index 3b9fabbdab..1cb04d736c 100644 --- a/docs/react/api-linter/executors/lint.md +++ b/docs/react/api-linter/executors/lint.md @@ -2,8 +2,7 @@ **[DEPRECATED]**: Please use the eslint builder instead, an automated migration was provided in v10.3.0 -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-next/executors/build.md b/docs/react/api-next/executors/build.md index 703a587a22..34aea92cc0 100644 --- a/docs/react/api-next/executors/build.md +++ b/docs/react/api-next/executors/build.md @@ -2,8 +2,7 @@ Build a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-next/executors/export.md b/docs/react/api-next/executors/export.md index 4d65e4b480..f9820a7ec0 100644 --- a/docs/react/api-next/executors/export.md +++ b/docs/react/api-next/executors/export.md @@ -2,8 +2,7 @@ Export a Next.js app. The exported application is located at dist/$outputPath/exported. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-next/executors/server.md b/docs/react/api-next/executors/server.md index 4b4d771388..51b5b49898 100644 --- a/docs/react/api-next/executors/server.md +++ b/docs/react/api-next/executors/server.md @@ -2,8 +2,7 @@ Serve a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-node/executors/build.md b/docs/react/api-node/executors/build.md index 690e5fbc4c..48073c1cbb 100644 --- a/docs/react/api-node/executors/build.md +++ b/docs/react/api-node/executors/build.md @@ -2,8 +2,7 @@ Build a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-node/executors/execute.md b/docs/react/api-node/executors/execute.md index 2175ab058e..1f69d40c89 100644 --- a/docs/react/api-node/executors/execute.md +++ b/docs/react/api-node/executors/execute.md @@ -2,8 +2,7 @@ Execute a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-node/executors/package.md b/docs/react/api-node/executors/package.md index 66a7cb2ba9..a1572c479a 100644 --- a/docs/react/api-node/executors/package.md +++ b/docs/react/api-node/executors/package.md @@ -2,8 +2,7 @@ Package a Node library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-nx-plugin/executors/e2e.md b/docs/react/api-nx-plugin/executors/e2e.md index 571631c8a2..3edd161e26 100644 --- a/docs/react/api-nx-plugin/executors/e2e.md +++ b/docs/react/api-nx-plugin/executors/e2e.md @@ -2,8 +2,7 @@ Creates and runs the e2e tests for an Nx Plugin. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-react-native/executors/build-android.md b/docs/react/api-react-native/executors/build-android.md index 270dbe5d42..e482636d70 100644 --- a/docs/react/api-react-native/executors/build-android.md +++ b/docs/react/api-react-native/executors/build-android.md @@ -2,8 +2,7 @@ Release Build for Android. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-react-native/executors/bundle.md b/docs/react/api-react-native/executors/bundle.md index b289379ad6..ddfe2cdfbd 100644 --- a/docs/react/api-react-native/executors/bundle.md +++ b/docs/react/api-react-native/executors/bundle.md @@ -2,8 +2,7 @@ Builds the JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-react-native/executors/ensure-symlink.md b/docs/react/api-react-native/executors/ensure-symlink.md index f05ec6a696..fc674026bd 100644 --- a/docs/react/api-react-native/executors/ensure-symlink.md +++ b/docs/react/api-react-native/executors/ensure-symlink.md @@ -2,5 +2,4 @@ Ensure workspace node_modules is symlink under app's node_modules folder. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. diff --git a/docs/react/api-react-native/executors/run-android.md b/docs/react/api-react-native/executors/run-android.md index edbda005cf..a32af02d3a 100644 --- a/docs/react/api-react-native/executors/run-android.md +++ b/docs/react/api-react-native/executors/run-android.md @@ -2,8 +2,7 @@ Runs Android application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-react-native/executors/run-ios.md b/docs/react/api-react-native/executors/run-ios.md index 620b6cf2e4..4208fe4106 100644 --- a/docs/react/api-react-native/executors/run-ios.md +++ b/docs/react/api-react-native/executors/run-ios.md @@ -2,8 +2,7 @@ Runs iOS application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-react-native/executors/start.md b/docs/react/api-react-native/executors/start.md index a8c4b86452..3e5b8f6348 100644 --- a/docs/react/api-react-native/executors/start.md +++ b/docs/react/api-react-native/executors/start.md @@ -2,8 +2,7 @@ Starts the dev server for JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-react-native/executors/sync-deps.md b/docs/react/api-react-native/executors/sync-deps.md index f569fc5e40..1557bf080f 100644 --- a/docs/react/api-react-native/executors/sync-deps.md +++ b/docs/react/api-react-native/executors/sync-deps.md @@ -2,8 +2,7 @@ Syncs dependencies to package.json (required for autolinking). -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-storybook/executors/build.md b/docs/react/api-storybook/executors/build.md index c4d78c6977..0d8627e565 100644 --- a/docs/react/api-storybook/executors/build.md +++ b/docs/react/api-storybook/executors/build.md @@ -2,8 +2,7 @@ Build Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-storybook/executors/storybook.md b/docs/react/api-storybook/executors/storybook.md index 735bcbe379..8425fecc21 100644 --- a/docs/react/api-storybook/executors/storybook.md +++ b/docs/react/api-storybook/executors/storybook.md @@ -2,8 +2,7 @@ Serve Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-web/executors/build.md b/docs/react/api-web/executors/build.md index 32ce9a60ed..8b4a2fff45 100644 --- a/docs/react/api-web/executors/build.md +++ b/docs/react/api-web/executors/build.md @@ -2,8 +2,7 @@ Build a application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-web/executors/dev-server.md b/docs/react/api-web/executors/dev-server.md index be0acd9920..997768ca88 100644 --- a/docs/react/api-web/executors/dev-server.md +++ b/docs/react/api-web/executors/dev-server.md @@ -2,8 +2,7 @@ Serve a web application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-web/executors/file-server.md b/docs/react/api-web/executors/file-server.md index 7f2b63ed45..35843ad0e4 100644 --- a/docs/react/api-web/executors/file-server.md +++ b/docs/react/api-web/executors/file-server.md @@ -2,8 +2,7 @@ Serve a web application from a folder -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-web/executors/package.md b/docs/react/api-web/executors/package.md index 7e47298246..50d676e6ca 100644 --- a/docs/react/api-web/executors/package.md +++ b/docs/react/api-web/executors/package.md @@ -2,8 +2,7 @@ Package a library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/api-workspace/executors/run-commands.md b/docs/react/api-workspace/executors/run-commands.md index f014ad979e..e17c257f00 100644 --- a/docs/react/api-workspace/executors/run-commands.md +++ b/docs/react/api-workspace/executors/run-commands.md @@ -2,8 +2,7 @@ Run any custom commands with Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Examples @@ -12,10 +11,10 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st ```json //... "frontend": { - "architect": { + "targets": { //... "ls-project-root": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "ls apps/frontend/src" } @@ -40,7 +39,7 @@ You can run them sequentially by setting `parallel: false`: ```json "create-script": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "mkdir -p scripts", @@ -79,7 +78,7 @@ nx run frontend:webpack --args="--config=example.config.js" ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "webpack" } @@ -93,7 +92,7 @@ that sets the `forwardAllArgs` option to `false` as shown below: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ { @@ -111,7 +110,7 @@ Normally, `run-commands` considers the commands done when all of them have finis ```json "finish-when-ready": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "sleep 5 && echo 'FINISHED'", @@ -142,10 +141,10 @@ nx affected --target=generate-docs ```json //... "frontend": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/frontend/tsconfig.app.json" } @@ -153,10 +152,10 @@ nx affected --target=generate-docs } }, "api": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/api/tsconfig.app.json" } diff --git a/docs/react/api-workspace/executors/run-script.md b/docs/react/api-workspace/executors/run-script.md index 8c0f62478b..493949f2ad 100644 --- a/docs/react/api-workspace/executors/run-script.md +++ b/docs/react/api-workspace/executors/run-script.md @@ -2,8 +2,50 @@ Run an npm script using Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. + +## Examples + +`workspace.json`: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "build-my-project" + } + } + } +} +``` + +```bash +nx run frontend:build +``` + +The `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory. + +#### Caching Artifacts + +By default, Nx is going to cache `dist/packages/frontend`, `packages/frontend/dist`, `packages/frontend/build`, `packages/frontend/public`. If your npm script writes files to other places, you can override the list of cached outputs as follows: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "outputs": ["packages/frontend/dist", "packaged/frontend/docs"], + "options": { + "script": "build-my-project" + } + } + } +} +``` ## Options @@ -11,4 +53,4 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st Type: `string` -Script to run in child process +An npm script name in the package.json file of the project (e.g., build) diff --git a/docs/react/api-workspace/executors/tsc.md b/docs/react/api-workspace/executors/tsc.md index 84e59a6be9..04bbbfd7c6 100644 --- a/docs/react/api-workspace/executors/tsc.md +++ b/docs/react/api-workspace/executors/tsc.md @@ -2,8 +2,7 @@ Build a project using TypeScript. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/docs/react/cli/print-affected.md b/docs/react/cli/print-affected.md index b5a49329ea..170b607d5a 100644 --- a/docs/react/cli/print-affected.md +++ b/docs/react/cli/print-affected.md @@ -1,6 +1,6 @@ # print-affected -Graph execution plan +Prints information about the projects and targets affected by changes ## Usage @@ -86,6 +86,8 @@ This is the name of the tasks runner configured in nx.json ### select +Select the subset of the returned json document (e.g., --selected=projects) + ### skip-nx-cache Default: `false` diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/delegate-build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/delegate-build.md index 1642b70568..66947c2478 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/delegate-build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/delegate-build.md @@ -2,7 +2,7 @@ Delegates the build to a different target while supporting incremental builds. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/ng-packagr-lite.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/ng-packagr-lite.md index 01d10d290f..46b4741641 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/ng-packagr-lite.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/ng-packagr-lite.md @@ -2,7 +2,7 @@ Builds a library with support for incremental builds. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/package.md index ca8d66a3dd..05d8c7ba7e 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/package.md @@ -2,7 +2,7 @@ Builds and packages an Angular library to be distributed as an NPM package. It supports incremental builds. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-browser.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-browser.md index 29e97194a5..b241b7b904 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-browser.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-browser.md @@ -2,7 +2,7 @@ Builds a browser application with support for incremental builds and custom webpack configuration. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-server.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-server.md index 2b678c2417..e6a8c5fd60 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-angular/executors/webpack-server.md @@ -2,7 +2,7 @@ Serves a browser application with support for a custom webpack configuration. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-cypress/executors/cypress.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-cypress/executors/cypress.md index 29c76e090d..7726d7ecaa 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-cypress/executors/cypress.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-cypress/executors/cypress.md @@ -2,7 +2,7 @@ Run Cypress e2e tests -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/build.md index bfe22ee60d..d954617e2b 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/build.md @@ -2,7 +2,7 @@ Run the command defined in build property of the specified configuration. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/test.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/test.md index ab6f91b347..fb0ec873e0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/test.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-detox/executors/test.md @@ -2,7 +2,7 @@ Initiating your detox test suite. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/build.md index 00ad8c92ea..25aeb34240 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/build.md @@ -2,7 +2,7 @@ Build a Gatsby app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/server.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/server.md index 651a9ccc39..260374939f 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/server.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-gatsby/executors/server.md @@ -2,7 +2,7 @@ Starts server for app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-jest/executors/jest.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-jest/executors/jest.md index da8e8ebb4f..a2c7bf6f74 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-jest/executors/jest.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-jest/executors/jest.md @@ -2,7 +2,7 @@ Run Jest unit tests -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/eslint.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/eslint.md index 755a08a958..f6d6d70772 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/eslint.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/eslint.md @@ -2,7 +2,7 @@ Run ESLint on a project -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/lint.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/lint.md index bfef4bfdd5..ffba028b48 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/lint.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-linter/executors/lint.md @@ -2,7 +2,7 @@ **[DEPRECATED]**: Please use the eslint builder instead, an automated migration was provided in v10.3.0 -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/build.md index d6f48dc563..6b51b0455a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/build.md @@ -2,7 +2,7 @@ Build a Next.js app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/export.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/export.md index f7e0dfdf69..792450716a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/export.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/export.md @@ -2,7 +2,7 @@ Export a Next.js app. The exported application is located at dist/$outputPath/exported. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/server.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/server.md index 0a14d9dadb..ac14b7e0e2 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/server.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-next/executors/server.md @@ -2,7 +2,7 @@ Serve a Next.js app -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/build.md index 1c06ee1be8..09a7430d3a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/build.md @@ -2,7 +2,7 @@ Build a Node application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/execute.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/execute.md index 3228ebaca4..16bfdfa997 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/execute.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/execute.md @@ -2,7 +2,7 @@ Execute a Node application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/package.md index ee1f88c4d1..d848282aab 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-node/executors/package.md @@ -2,7 +2,7 @@ Package a Node library -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-plugin/executors/e2e.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-plugin/executors/e2e.md index 95bc12e93c..a90b50efd4 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-plugin/executors/e2e.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-plugin/executors/e2e.md @@ -2,7 +2,7 @@ Creates and runs the e2e tests for an Nx Plugin. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/build-android.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/build-android.md index a01624528f..3ce7bd4148 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/build-android.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/build-android.md @@ -2,7 +2,7 @@ Release Build for Android. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/bundle.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/bundle.md index 41c62f7ea6..d846de693c 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/bundle.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/bundle.md @@ -2,7 +2,7 @@ Builds the JS bundle. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/ensure-symlink.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/ensure-symlink.md index a4cf66f158..1a8e0e9b3d 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/ensure-symlink.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/ensure-symlink.md @@ -2,4 +2,4 @@ Ensure workspace node_modules is symlink under app's node_modules folder. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-android.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-android.md index d6fd62b953..27d72041fb 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-android.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-android.md @@ -2,7 +2,7 @@ Runs Android application. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-ios.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-ios.md index 4d6a9381bc..9a0055937f 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-ios.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/run-ios.md @@ -2,7 +2,7 @@ Runs iOS application. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/start.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/start.md index bd550d0972..7afca65aae 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/start.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/start.md @@ -2,7 +2,7 @@ Starts the dev server for JS bundle. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/sync-deps.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/sync-deps.md index 8ac77c9a37..abbe5a31fe 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/sync-deps.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-react-native/executors/sync-deps.md @@ -2,7 +2,7 @@ Syncs dependencies to package.json (required for autolinking). -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/build.md index a3c61b1bea..7ecbe80cef 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/build.md @@ -2,7 +2,7 @@ Build Storybook -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/storybook.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/storybook.md index 3f66e8753d..eecae02f85 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/storybook.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-storybook/executors/storybook.md @@ -2,7 +2,7 @@ Serve Storybook -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md index 14cd77216d..bc4f6ba4af 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md @@ -2,7 +2,7 @@ Build a application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/dev-server.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/dev-server.md index 187c499b93..dd89d0c1ed 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/dev-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/dev-server.md @@ -2,7 +2,7 @@ Serve a web application -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/file-server.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/file-server.md index 9d1601b331..8661efc385 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/file-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/file-server.md @@ -2,7 +2,7 @@ Serve a web application from a folder -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/package.md index c275ab8fb5..1c052e3249 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/package.md @@ -2,7 +2,7 @@ Package a library -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-commands.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-commands.md index ab4891c677..97ef4b9de8 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-commands.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-commands.md @@ -2,7 +2,7 @@ Run any custom commands with Nx -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Examples @@ -11,10 +11,10 @@ Options can be configured in `angular.json` when defining the executor, or when ```json //... "frontend": { - "architect": { + "targets": { //... "ls-project-root": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "ls apps/frontend/src" } @@ -39,7 +39,7 @@ You can run them sequentially by setting `parallel: false`: ```json "create-script": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "mkdir -p scripts", @@ -78,7 +78,7 @@ nx run frontend:webpack --args="--config=example.config.js" ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "webpack" } @@ -92,7 +92,7 @@ that sets the `forwardAllArgs` option to `false` as shown below: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ { @@ -110,7 +110,7 @@ Normally, `run-commands` considers the commands done when all of them have finis ```json "finish-when-ready": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "sleep 5 && echo 'FINISHED'", @@ -141,10 +141,10 @@ nx affected --target=generate-docs ```json //... "frontend": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/frontend/tsconfig.app.json" } @@ -152,10 +152,10 @@ nx affected --target=generate-docs } }, "api": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/api/tsconfig.app.json" } diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-script.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-script.md index bee42f75e8..3bbaa8e687 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-script.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/run-script.md @@ -2,7 +2,52 @@ Run an npm script using Nx -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. + +## Examples + +`workspace.json`: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "build-my-project" + } + } + } +} +``` + +```bash +nx run frontend:build +``` + +The `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory. + +#### Caching Artifacts + +By default, Nx is going to cache `dist/packages/frontend`, `packages/frontend/dist`, `packages/frontend/build`, `packages/frontend/public`. If your npm script writes files to other places, you can override the list of cached outputs as follows: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "outputs": ["packages/frontend/dist", "packaged/frontend/docs"], + "options": { + "script": "build-my-project" + } + } + } +} +``` + +Test2 ## Options @@ -10,4 +55,4 @@ Options can be configured in `angular.json` when defining the executor, or when Type: `string` -Script to run in child process +An npm script name in the package.json file of the project (e.g., build) diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/tsc.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/tsc.md index 40a9e92b47..42034d661d 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/tsc.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-workspace/executors/tsc.md @@ -2,7 +2,7 @@ Build a project using TypeScript. -Options can be configured in `angular.json` when defining the executor, or when invoking it. +Options can be configured in `angular.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/delegate-build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/delegate-build.md index 44744eb7a1..b1ac83b9c0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/delegate-build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/delegate-build.md @@ -2,8 +2,7 @@ Delegates the build to a different target while supporting incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/ng-packagr-lite.md b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/ng-packagr-lite.md index 480bf7c767..5600146283 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/ng-packagr-lite.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/ng-packagr-lite.md @@ -2,8 +2,7 @@ Builds a library with support for incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/package.md index 7fb3cd1ec0..f1f814f0b2 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/package.md @@ -2,8 +2,7 @@ Builds and packages an Angular library to be distributed as an NPM package. It supports incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-browser.md b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-browser.md index 9d4d182ecb..5b96915b8a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-browser.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-browser.md @@ -2,8 +2,7 @@ Builds a browser application with support for incremental builds and custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-server.md b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-server.md index b02dbb0f64..4841579caa 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-angular/executors/webpack-server.md @@ -2,8 +2,7 @@ Serves a browser application with support for a custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-cypress/executors/cypress.md b/nx-dev/nx-dev/public/documentation/latest/node/api-cypress/executors/cypress.md index b78811073f..701466efd9 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-cypress/executors/cypress.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-cypress/executors/cypress.md @@ -2,8 +2,7 @@ Run Cypress e2e tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/build.md index 913b5c1f68..f05e86b9a1 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/build.md @@ -2,8 +2,7 @@ Run the command defined in build property of the specified configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/test.md b/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/test.md index 8e1e87066e..0924c8c2d0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/test.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-detox/executors/test.md @@ -2,8 +2,7 @@ Initiating your detox test suite. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/build.md index d3a3a86516..872c7ef2d4 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/build.md @@ -2,8 +2,7 @@ Build a Gatsby app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/server.md b/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/server.md index 4598c39dd4..5dedfcd708 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/server.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-gatsby/executors/server.md @@ -2,8 +2,7 @@ Starts server for app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-jest/executors/jest.md b/nx-dev/nx-dev/public/documentation/latest/node/api-jest/executors/jest.md index cd09f30abd..6347a70cf7 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-jest/executors/jest.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-jest/executors/jest.md @@ -2,8 +2,7 @@ Run Jest unit tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/eslint.md b/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/eslint.md index 89776bd0c7..e74720bec1 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/eslint.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/eslint.md @@ -2,8 +2,7 @@ Run ESLint on a project -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/lint.md b/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/lint.md index 3b9fabbdab..1cb04d736c 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/lint.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-linter/executors/lint.md @@ -2,8 +2,7 @@ **[DEPRECATED]**: Please use the eslint builder instead, an automated migration was provided in v10.3.0 -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/build.md index 703a587a22..34aea92cc0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/build.md @@ -2,8 +2,7 @@ Build a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/export.md b/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/export.md index 4d65e4b480..f9820a7ec0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/export.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/export.md @@ -2,8 +2,7 @@ Export a Next.js app. The exported application is located at dist/$outputPath/exported. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/server.md b/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/server.md index 4b4d771388..51b5b49898 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/server.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-next/executors/server.md @@ -2,8 +2,7 @@ Serve a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/build.md index 690e5fbc4c..48073c1cbb 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/build.md @@ -2,8 +2,7 @@ Build a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/execute.md b/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/execute.md index 2175ab058e..1f69d40c89 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/execute.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/execute.md @@ -2,8 +2,7 @@ Execute a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/package.md index 66a7cb2ba9..a1572c479a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-node/executors/package.md @@ -2,8 +2,7 @@ Package a Node library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-nx-plugin/executors/e2e.md b/nx-dev/nx-dev/public/documentation/latest/node/api-nx-plugin/executors/e2e.md index 571631c8a2..3edd161e26 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-nx-plugin/executors/e2e.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-nx-plugin/executors/e2e.md @@ -2,8 +2,7 @@ Creates and runs the e2e tests for an Nx Plugin. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/build-android.md b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/build-android.md index 270dbe5d42..e482636d70 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/build-android.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/build-android.md @@ -2,8 +2,7 @@ Release Build for Android. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/bundle.md b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/bundle.md index b289379ad6..ddfe2cdfbd 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/bundle.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/bundle.md @@ -2,8 +2,7 @@ Builds the JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/ensure-symlink.md b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/ensure-symlink.md index f05ec6a696..fc674026bd 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/ensure-symlink.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/ensure-symlink.md @@ -2,5 +2,4 @@ Ensure workspace node_modules is symlink under app's node_modules folder. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-android.md b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-android.md index edbda005cf..a32af02d3a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-android.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-android.md @@ -2,8 +2,7 @@ Runs Android application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-ios.md b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-ios.md index 620b6cf2e4..4208fe4106 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-ios.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/run-ios.md @@ -2,8 +2,7 @@ Runs iOS application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/start.md b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/start.md index a8c4b86452..3e5b8f6348 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/start.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/start.md @@ -2,8 +2,7 @@ Starts the dev server for JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/sync-deps.md b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/sync-deps.md index f569fc5e40..1557bf080f 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/sync-deps.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-react-native/executors/sync-deps.md @@ -2,8 +2,7 @@ Syncs dependencies to package.json (required for autolinking). -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/build.md index c4d78c6977..0d8627e565 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/build.md @@ -2,8 +2,7 @@ Build Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/storybook.md b/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/storybook.md index 735bcbe379..8425fecc21 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/storybook.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-storybook/executors/storybook.md @@ -2,8 +2,7 @@ Serve Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md index 32ce9a60ed..8b4a2fff45 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md @@ -2,8 +2,7 @@ Build a application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/dev-server.md b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/dev-server.md index be0acd9920..997768ca88 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/dev-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/dev-server.md @@ -2,8 +2,7 @@ Serve a web application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/file-server.md b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/file-server.md index 7f2b63ed45..35843ad0e4 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/file-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/file-server.md @@ -2,8 +2,7 @@ Serve a web application from a folder -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/package.md index 7e47298246..50d676e6ca 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/package.md @@ -2,8 +2,7 @@ Package a library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-commands.md b/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-commands.md index f014ad979e..e17c257f00 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-commands.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-commands.md @@ -2,8 +2,7 @@ Run any custom commands with Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Examples @@ -12,10 +11,10 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st ```json //... "frontend": { - "architect": { + "targets": { //... "ls-project-root": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "ls apps/frontend/src" } @@ -40,7 +39,7 @@ You can run them sequentially by setting `parallel: false`: ```json "create-script": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "mkdir -p scripts", @@ -79,7 +78,7 @@ nx run frontend:webpack --args="--config=example.config.js" ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "webpack" } @@ -93,7 +92,7 @@ that sets the `forwardAllArgs` option to `false` as shown below: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ { @@ -111,7 +110,7 @@ Normally, `run-commands` considers the commands done when all of them have finis ```json "finish-when-ready": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "sleep 5 && echo 'FINISHED'", @@ -142,10 +141,10 @@ nx affected --target=generate-docs ```json //... "frontend": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/frontend/tsconfig.app.json" } @@ -153,10 +152,10 @@ nx affected --target=generate-docs } }, "api": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/api/tsconfig.app.json" } diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-script.md b/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-script.md index 8c0f62478b..5d3edd9564 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-script.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/run-script.md @@ -2,8 +2,52 @@ Run an npm script using Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. + +## Examples + +`workspace.json`: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "build-my-project" + } + } + } +} +``` + +```bash +nx run frontend:build +``` + +The `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory. + +#### Caching Artifacts + +By default, Nx is going to cache `dist/packages/frontend`, `packages/frontend/dist`, `packages/frontend/build`, `packages/frontend/public`. If your npm script writes files to other places, you can override the list of cached outputs as follows: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "outputs": ["packages/frontend/dist", "packaged/frontend/docs"], + "options": { + "script": "build-my-project" + } + } + } +} +``` + +Test2 ## Options @@ -11,4 +55,4 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st Type: `string` -Script to run in child process +An npm script name in the package.json file of the project (e.g., build) diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/tsc.md b/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/tsc.md index 84e59a6be9..04bbbfd7c6 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/tsc.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-workspace/executors/tsc.md @@ -2,8 +2,7 @@ Build a project using TypeScript. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/delegate-build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/delegate-build.md index 44744eb7a1..b1ac83b9c0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/delegate-build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/delegate-build.md @@ -2,8 +2,7 @@ Delegates the build to a different target while supporting incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/ng-packagr-lite.md b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/ng-packagr-lite.md index 480bf7c767..5600146283 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/ng-packagr-lite.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/ng-packagr-lite.md @@ -2,8 +2,7 @@ Builds a library with support for incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/package.md index 7fb3cd1ec0..f1f814f0b2 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/package.md @@ -2,8 +2,7 @@ Builds and packages an Angular library to be distributed as an NPM package. It supports incremental builds. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-browser.md b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-browser.md index 9d4d182ecb..5b96915b8a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-browser.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-browser.md @@ -2,8 +2,7 @@ Builds a browser application with support for incremental builds and custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-server.md b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-server.md index b02dbb0f64..4841579caa 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-angular/executors/webpack-server.md @@ -2,8 +2,7 @@ Serves a browser application with support for a custom webpack configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-cypress/executors/cypress.md b/nx-dev/nx-dev/public/documentation/latest/react/api-cypress/executors/cypress.md index b78811073f..701466efd9 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-cypress/executors/cypress.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-cypress/executors/cypress.md @@ -2,8 +2,7 @@ Run Cypress e2e tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/build.md index 913b5c1f68..f05e86b9a1 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/build.md @@ -2,8 +2,7 @@ Run the command defined in build property of the specified configuration. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/test.md b/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/test.md index 8e1e87066e..0924c8c2d0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/test.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-detox/executors/test.md @@ -2,8 +2,7 @@ Initiating your detox test suite. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/build.md index d3a3a86516..872c7ef2d4 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/build.md @@ -2,8 +2,7 @@ Build a Gatsby app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/server.md b/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/server.md index 4598c39dd4..5dedfcd708 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/server.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-gatsby/executors/server.md @@ -2,8 +2,7 @@ Starts server for app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-jest/executors/jest.md b/nx-dev/nx-dev/public/documentation/latest/react/api-jest/executors/jest.md index cd09f30abd..6347a70cf7 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-jest/executors/jest.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-jest/executors/jest.md @@ -2,8 +2,7 @@ Run Jest unit tests -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/eslint.md b/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/eslint.md index 89776bd0c7..e74720bec1 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/eslint.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/eslint.md @@ -2,8 +2,7 @@ Run ESLint on a project -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/lint.md b/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/lint.md index 3b9fabbdab..1cb04d736c 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/lint.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-linter/executors/lint.md @@ -2,8 +2,7 @@ **[DEPRECATED]**: Please use the eslint builder instead, an automated migration was provided in v10.3.0 -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/build.md index 703a587a22..34aea92cc0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/build.md @@ -2,8 +2,7 @@ Build a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/export.md b/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/export.md index 4d65e4b480..f9820a7ec0 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/export.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/export.md @@ -2,8 +2,7 @@ Export a Next.js app. The exported application is located at dist/$outputPath/exported. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/server.md b/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/server.md index 4b4d771388..51b5b49898 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/server.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-next/executors/server.md @@ -2,8 +2,7 @@ Serve a Next.js app -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/build.md index 690e5fbc4c..48073c1cbb 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/build.md @@ -2,8 +2,7 @@ Build a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/execute.md b/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/execute.md index 2175ab058e..1f69d40c89 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/execute.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/execute.md @@ -2,8 +2,7 @@ Execute a Node application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/package.md index 66a7cb2ba9..a1572c479a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-node/executors/package.md @@ -2,8 +2,7 @@ Package a Node library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-nx-plugin/executors/e2e.md b/nx-dev/nx-dev/public/documentation/latest/react/api-nx-plugin/executors/e2e.md index 571631c8a2..3edd161e26 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-nx-plugin/executors/e2e.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-nx-plugin/executors/e2e.md @@ -2,8 +2,7 @@ Creates and runs the e2e tests for an Nx Plugin. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/build-android.md b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/build-android.md index 270dbe5d42..e482636d70 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/build-android.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/build-android.md @@ -2,8 +2,7 @@ Release Build for Android. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/bundle.md b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/bundle.md index b289379ad6..ddfe2cdfbd 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/bundle.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/bundle.md @@ -2,8 +2,7 @@ Builds the JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/ensure-symlink.md b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/ensure-symlink.md index f05ec6a696..fc674026bd 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/ensure-symlink.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/ensure-symlink.md @@ -2,5 +2,4 @@ Ensure workspace node_modules is symlink under app's node_modules folder. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-android.md b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-android.md index edbda005cf..a32af02d3a 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-android.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-android.md @@ -2,8 +2,7 @@ Runs Android application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-ios.md b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-ios.md index 620b6cf2e4..4208fe4106 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-ios.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/run-ios.md @@ -2,8 +2,7 @@ Runs iOS application. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/start.md b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/start.md index a8c4b86452..3e5b8f6348 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/start.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/start.md @@ -2,8 +2,7 @@ Starts the dev server for JS bundle. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/sync-deps.md b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/sync-deps.md index f569fc5e40..1557bf080f 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/sync-deps.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-react-native/executors/sync-deps.md @@ -2,8 +2,7 @@ Syncs dependencies to package.json (required for autolinking). -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/build.md index c4d78c6977..0d8627e565 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/build.md @@ -2,8 +2,7 @@ Build Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/storybook.md b/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/storybook.md index 735bcbe379..8425fecc21 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/storybook.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-storybook/executors/storybook.md @@ -2,8 +2,7 @@ Serve Storybook -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md index 32ce9a60ed..8b4a2fff45 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md @@ -2,8 +2,7 @@ Build a application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/dev-server.md b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/dev-server.md index be0acd9920..997768ca88 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/dev-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/dev-server.md @@ -2,8 +2,7 @@ Serve a web application -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/file-server.md b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/file-server.md index 7f2b63ed45..35843ad0e4 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/file-server.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/file-server.md @@ -2,8 +2,7 @@ Serve a web application from a folder -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/package.md b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/package.md index 7e47298246..50d676e6ca 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/package.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/package.md @@ -2,8 +2,7 @@ Package a library -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-commands.md b/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-commands.md index f014ad979e..e17c257f00 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-commands.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-commands.md @@ -2,8 +2,7 @@ Run any custom commands with Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Examples @@ -12,10 +11,10 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st ```json //... "frontend": { - "architect": { + "targets": { //... "ls-project-root": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "ls apps/frontend/src" } @@ -40,7 +39,7 @@ You can run them sequentially by setting `parallel: false`: ```json "create-script": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "mkdir -p scripts", @@ -79,7 +78,7 @@ nx run frontend:webpack --args="--config=example.config.js" ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "webpack" } @@ -93,7 +92,7 @@ that sets the `forwardAllArgs` option to `false` as shown below: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ { @@ -111,7 +110,7 @@ Normally, `run-commands` considers the commands done when all of them have finis ```json "finish-when-ready": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "sleep 5 && echo 'FINISHED'", @@ -142,10 +141,10 @@ nx affected --target=generate-docs ```json //... "frontend": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/frontend/tsconfig.app.json" } @@ -153,10 +152,10 @@ nx affected --target=generate-docs } }, "api": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/api/tsconfig.app.json" } diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-script.md b/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-script.md index 8c0f62478b..5d3edd9564 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-script.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/run-script.md @@ -2,8 +2,52 @@ Run an npm script using Nx -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. + +## Examples + +`workspace.json`: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "build-my-project" + } + } + } +} +``` + +```bash +nx run frontend:build +``` + +The `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory. + +#### Caching Artifacts + +By default, Nx is going to cache `dist/packages/frontend`, `packages/frontend/dist`, `packages/frontend/build`, `packages/frontend/public`. If your npm script writes files to other places, you can override the list of cached outputs as follows: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "outputs": ["packages/frontend/dist", "packaged/frontend/docs"], + "options": { + "script": "build-my-project" + } + } + } +} +``` + +Test2 ## Options @@ -11,4 +55,4 @@ Read more about how to use executors and the CLI here: https://nx.dev/getting-st Type: `string` -Script to run in child process +An npm script name in the package.json file of the project (e.g., build) diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/tsc.md b/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/tsc.md index 84e59a6be9..04bbbfd7c6 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/tsc.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-workspace/executors/tsc.md @@ -2,8 +2,7 @@ Build a project using TypeScript. -Options can be configured in `workspace.json` when defining the executor, or when invoking it. -Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands. +Options can be configured in `workspace.json` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. ## Options diff --git a/packages/workspace/docs/run-commands-examples.md b/packages/workspace/docs/run-commands-examples.md index b3d600ef3f..be94e0208c 100644 --- a/packages/workspace/docs/run-commands-examples.md +++ b/packages/workspace/docs/run-commands-examples.md @@ -3,10 +3,10 @@ ```json //... "frontend": { - "architect": { + "targets": { //... "ls-project-root": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "ls apps/frontend/src" } @@ -31,7 +31,7 @@ You can run them sequentially by setting `parallel: false`: ```json "create-script": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "mkdir -p scripts", @@ -70,7 +70,7 @@ For example, when you run: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "webpack" } @@ -84,7 +84,7 @@ that sets the `forwardAllArgs` option to `false` as shown below: ```json "webpack": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ { @@ -102,7 +102,7 @@ Normally, `run-commands` considers the commands done when all of them have finis ```json "finish-when-ready": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "commands": [ "sleep 5 && echo 'FINISHED'", @@ -133,10 +133,10 @@ nx affected --target=generate-docs ```json //... "frontend": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/frontend/tsconfig.app.json" } @@ -144,10 +144,10 @@ nx affected --target=generate-docs } }, "api": { - "architect": { + "targets": { //... "generate-docs": { - "builder": "@nrwl/workspace:run-commands", + "executor": "@nrwl/workspace:run-commands", "options": { "command": "npx compodoc -p apps/api/tsconfig.app.json" } diff --git a/packages/workspace/docs/run-script-examples.md b/packages/workspace/docs/run-script-examples.md new file mode 100644 index 0000000000..cc57f2a486 --- /dev/null +++ b/packages/workspace/docs/run-script-examples.md @@ -0,0 +1,40 @@ +`workspace.json`: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "options": { + "script": "build-my-project" + } + } + } +} +``` + +```bash +<%= cli %> run frontend:build +``` + +The `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory. + +#### Caching Artifacts + +By default, Nx is going to cache `dist/packages/frontend`, `packages/frontend/dist`, `packages/frontend/build`, `packages/frontend/public`. If your npm script writes files to other places, you can override the list of cached outputs as follows: + +```json +"frontend": { + "root": "packages/frontend", + "targets": { + "build": { + "executor": "@nrwl/workspace:run-script", + "outputs": ["packages/frontend/dist", "packaged/frontend/docs"], + "options": { + "script": "build-my-project" + } + } + } +} +``` diff --git a/packages/workspace/src/command-line/nx-commands.ts b/packages/workspace/src/command-line/nx-commands.ts index 2abebf7499..309436eb99 100644 --- a/packages/workspace/src/command-line/nx-commands.ts +++ b/packages/workspace/src/command-line/nx-commands.ts @@ -112,7 +112,7 @@ export const commandsObject = yargs ) .command( 'print-affected', - 'Graph execution plan', + 'Prints information about the projects and targets affected by changes', (yargs) => withAffectedOptions(withPrintAffectedOptions(yargs)), async (args) => (await import('./affected')).affected('print-affected', { @@ -255,7 +255,7 @@ function withDaemonStartOptions(yargs: yargs.Argv): yargs.Argv { } function withPrintAffectedOptions(yargs: yargs.Argv): yargs.Argv { - return yargs.option('select', { type: 'string' }); + return yargs.option('select', { type: 'string', describe: 'Select the subset of the returned json document (e.g., --selected=projects)' }); } function withPlainOption(yargs: yargs.Argv): yargs.Argv { diff --git a/packages/workspace/src/executors/run-script/schema.json b/packages/workspace/src/executors/run-script/schema.json index d584c1eb64..9c41d33db4 100644 --- a/packages/workspace/src/executors/run-script/schema.json +++ b/packages/workspace/src/executors/run-script/schema.json @@ -1,15 +1,16 @@ { "title": "Run Script", - "description": "Run any script with Nx", + "description": "Run any NPM script of a project in the project's root directory.", "type": "object", "cli": "nx", "outputCapture": "pipe", "properties": { "script": { "type": "string", - "description": "Script to run in child process" + "description": "An npm script name in the package.json file of the project (e.g., build)" } }, "additionalProperties": true, - "required": ["script"] + "required": ["script"], + "examplesFile": "../../../docs/run-script-examples.md" } diff --git a/scripts/documentation/generate-executors-data.ts b/scripts/documentation/generate-executors-data.ts index 3d8b481467..18f1adf937 100644 --- a/scripts/documentation/generate-executors-data.ts +++ b/scripts/documentation/generate-executors-data.ts @@ -84,12 +84,7 @@ function generateTemplate( # ${builder.collectionName}:${builder.name} ${builder.description} - Options can be configured in \`${filename}\` when defining the executor, or when invoking it. - ${ - framework != 'angular' - ? `Read more about how to use executors and the CLI here: https://nx.dev/getting-started/nx-cli#common-commands.` - : `` - } + Options can be configured in \`${filename}\` when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/core-concepts/configuration#targets. \n`; if (builder.examplesFileFullPath) { @@ -97,7 +92,7 @@ function generateTemplate( let examples = readFileSync(builder.examplesFileFullPath) .toString() .replace(/<%= cli %>/gm, cliCommand); - template += dedent`${examples}`; + template += dedent`${examples}\n`; } if (Array.isArray(builder.options) && !!builder.options.length) {