From 19fd40ddc72fb51b7685e4274848b8444fb50af0 Mon Sep 17 00:00:00 2001 From: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:59:50 -0500 Subject: [PATCH] docs(nxdev): refactor docs sources generation and app consumption (#13834) --- docs/generated/manifests/cloud.json | 517 ++ docs/generated/manifests/menus.json | 6306 +++++++++++++++++ docs/generated/manifests/nx.json | 2056 ++++++ docs/generated/manifests/packages.json | 2951 ++++++++ docs/generated/manifests/recipes.json | 1583 +++++ docs/generated/manifests/tags.json | 805 +++ .../packages/add-nx-to-monorepo.json | 11 - docs/generated/packages/angular.json | 4041 ----------- .../documents/angular-nx-version-matrix.md | 20 + .../packages/angular/documents/overview.md | 88 + .../angular/executors/delegate-build.json | 44 + .../angular/executors/file-server.json | 80 + .../module-federation-dev-server.json | 121 + .../executors/module-federation-dev-ssr.json | 90 + .../angular/executors/ng-packagr-lite.json | 66 + .../packages/angular/executors/package.json | 76 + .../angular/executors/webpack-browser.json | 691 ++ .../angular/executors/webpack-dev-server.json | 115 + .../angular/executors/webpack-server.json | 301 + .../angular/generators/add-linting.json | 57 + .../angular/generators/application.json | 171 + .../generators/change-storybook-targets.json | 29 + .../generators/component-cypress-spec.json | 67 + .../angular/generators/component-story.json | 52 + .../angular/generators/component-test.json | 57 + .../angular/generators/component.json | 123 + .../generators/convert-to-with-mf.json | 34 + .../generators/convert-tslint-to-eslint.json | 60 + .../cypress-component-configuration.json | 45 + .../angular/generators/downgrade-module.json | 47 + .../packages/angular/generators/host.json | 172 + .../packages/angular/generators/init.json | 86 + .../angular/generators/karma-project.json | 39 + .../packages/angular/generators/karma.json | 34 + .../library-secondary-entry-point.json | 43 + .../packages/angular/generators/library.json | 208 + .../packages/angular/generators/move.json | 54 + .../packages/angular/generators/ng-add.json | 80 + .../packages/angular/generators/ngrx.json | 86 + .../packages/angular/generators/remote.json | 167 + .../angular/generators/scam-directive.json | 80 + .../angular/generators/scam-pipe.json | 66 + .../generators/scam-to-standalone.json | 37 + .../packages/angular/generators/scam.json | 127 + .../packages/angular/generators/setup-mf.json | 86 + .../angular/generators/setup-ssr.json | 67 + .../angular/generators/setup-tailwind.json | 48 + .../packages/angular/generators/stories.json | 58 + .../generators/storybook-configuration.json | 86 + .../angular/generators/upgrade-module.json | 56 + .../angular/generators/web-worker.json | 50 + docs/generated/packages/cra-to-nx.json | 11 - docs/generated/packages/create-nx-plugin.json | 11 - .../packages/create-nx-workspace.json | 11 - docs/generated/packages/cypress.json | 353 - .../documents}/cypress-component-testing.md | 2 +- .../packages/cypress/documents/overview.md | 109 + .../cypress/documents/v10-migration-guide.md | 29 + .../cypress/documents/v11-migration-guide.md | 29 + .../packages/cypress/executors/cypress.json | 141 + .../generators/cypress-component-project.json | 42 + .../cypress/generators/cypress-project.json | 85 + .../packages/cypress/generators/init.json | 26 + .../generators/migrate-to-cypress-10.json | 26 + .../generators/migrate-to-cypress-11.json | 26 + docs/generated/packages/detox.json | 304 - .../packages/detox/documents/overview.md | 107 + .../packages/detox/executors/build.json | 33 + .../packages/detox/executors/test.json | 157 + .../detox/generators/application.json | 72 + .../packages/detox/generators/init.json | 25 + docs/generated/packages/devkit.json | 24 - .../packages/devkit/documents/index.md | 2409 +++++++ .../devkit/documents/ngcli_adapter.md | 118 + docs/generated/packages/esbuild.json | 312 - .../packages/esbuild/documents/overview.md | 136 + .../packages/esbuild/executors/esbuild.json | 197 + .../esbuild/generators/esbuild-project.json | 64 + .../packages/esbuild/generators/init.json | 33 + docs/generated/packages/eslint-plugin-nx.json | 19 - .../eslint-plugin-nx/documents/overview.md | 90 + docs/generated/packages/expo.json | 1324 ---- .../expo/executors/build-android.json | 63 + .../packages/expo/executors/build-ios.json | 100 + .../packages/expo/executors/build-list.json | 84 + .../packages/expo/executors/build-status.json | 27 + .../packages/expo/executors/build-web.json | 36 + .../packages/expo/executors/build.json | 68 + .../packages/expo/executors/download.json | 65 + .../expo/executors/ensure-symlink.json | 21 + .../packages/expo/executors/export.json | 57 + .../packages/expo/executors/install.json | 39 + .../packages/expo/executors/prebuild.json | 37 + .../packages/expo/executors/publish-set.json | 31 + .../packages/expo/executors/publish.json | 54 + .../packages/expo/executors/rollback.json | 35 + .../packages/expo/executors/run.json | 71 + .../packages/expo/executors/start.json | 107 + .../packages/expo/executors/sync-deps.json | 34 + .../packages/expo/executors/update.json | 68 + .../packages/expo/generators/application.json | 88 + .../packages/expo/generators/component.json | 87 + .../packages/expo/generators/init.json | 38 + .../packages/expo/generators/library.json | 105 + docs/generated/packages/express.json | 140 - .../packages/express/documents/overview.md | 93 + .../express/generators/application.json | 89 + .../packages/express/generators/init.json | 33 + docs/generated/packages/jest.json | 354 - .../packages/jest/documents/overview.md | 147 + .../packages/jest/executors/jest.json | 200 + .../packages/jest/generators/init.json | 44 + .../jest/generators/jest-project.json | 89 + docs/generated/packages/js.json | 617 -- .../packages/js/documents/overview.md | 109 + .../generated/packages/js/executors/node.json | 73 + docs/generated/packages/js/executors/swc.json | 161 + docs/generated/packages/js/executors/tsc.json | 175 + .../js/generators/convert-to-swc.json | 42 + .../packages/js/generators/init.json | 19 + .../packages/js/generators/library.json | 129 + docs/generated/packages/linter.json | 224 - .../linter/documents/eslint-plugin-nx.md | 90 + .../packages/linter/documents/overview.md | 31 + .../packages/linter/executors/eslint.json | 139 + .../linter/generators/workspace-rule.json | 34 + .../generators/workspace-rules-project.json | 27 + .../packages/make-angular-cli-faster.json | 11 - docs/generated/packages/nest.json | 1261 ---- .../packages/nest/documents/overview.md | 148 + .../packages/nest/generators/application.json | 73 + .../packages/nest/generators/class.json | 62 + .../packages/nest/generators/controller.json | 71 + .../generators/convert-tslint-to-eslint.json | 51 + .../packages/nest/generators/decorator.json | 56 + .../packages/nest/generators/filter.json | 62 + .../packages/nest/generators/gateway.json | 62 + .../packages/nest/generators/guard.json | 62 + .../packages/nest/generators/init.json | 34 + .../packages/nest/generators/interceptor.json | 62 + .../packages/nest/generators/interface.json | 51 + .../packages/nest/generators/library.json | 133 + .../packages/nest/generators/middleware.json | 62 + .../packages/nest/generators/module.json | 66 + .../packages/nest/generators/pipe.json | 62 + .../packages/nest/generators/provider.json | 62 + .../packages/nest/generators/resolver.json | 62 + .../packages/nest/generators/resource.json | 102 + .../packages/nest/generators/service.json | 62 + docs/generated/packages/next.json | 769 -- .../packages/next/documents/overview.md | 171 + .../packages/next/executors/build.json | 66 + .../packages/next/executors/export.json | 39 + .../packages/next/executors/server.json | 68 + .../packages/next/generators/application.json | 134 + .../packages/next/generators/component.json | 111 + .../next/generators/custom-server.json | 37 + .../packages/next/generators/init.json | 44 + .../packages/next/generators/library.json | 158 + .../packages/next/generators/page.json | 100 + docs/generated/packages/node.json | 636 -- .../packages/node/documents/overview.md | 86 + .../packages/node/executors/node.json | 73 + .../packages/node/executors/webpack.json | 287 + .../packages/node/generators/application.json | 88 + .../packages/node/generators/init.json | 38 + .../packages/node/generators/library.json | 131 + docs/generated/packages/nx-plugin.json | 570 -- .../packages/nx-plugin/documents/overview.md | 272 + .../packages/nx-plugin/executors/e2e.json | 204 + .../nx-plugin/generators/e2e-project.json | 54 + .../nx-plugin/generators/executor.json | 57 + .../nx-plugin/generators/generator.json | 53 + .../nx-plugin/generators/migration.json | 57 + .../generators/plugin-lint-checks.json | 27 + .../packages/nx-plugin/generators/plugin.json | 101 + docs/generated/packages/nx.json | 352 - .../packages/nx/documents/affected-apps.md | 100 + .../nx/documents/affected-dep-graph.md | 158 + .../packages/nx/documents/affected-libs.md | 100 + .../packages/nx/documents/affected.md | 182 + .../nx/documents/connect-to-nx-cloud.md | 30 + .../nx/documents/create-nx-workspace.md | 136 + .../generated/packages/nx/documents/daemon.md | 42 + .../packages/nx/documents/dep-graph.md | 132 + docs/generated/packages/nx/documents/exec.md | 102 + .../packages/nx/documents/format-check.md | 86 + .../packages/nx/documents/format-write.md | 86 + .../packages/nx/documents/generate.md | 98 + docs/generated/packages/nx/documents/init.md | 16 + docs/generated/packages/nx/documents/list.md | 50 + .../packages/nx/documents/migrate.md | 120 + .../packages/nx/documents/print-affected.md | 132 + .../generated/packages/nx/documents/repair.md | 36 + .../generated/packages/nx/documents/report.md | 16 + docs/generated/packages/nx/documents/reset.md | 16 + .../packages/nx/documents/run-many.md | 142 + docs/generated/packages/nx/documents/run.md | 44 + docs/generated/packages/nx/documents/watch.md | 74 + .../nx/documents/workspace-generator.md | 42 + .../packages/nx/documents/workspace-lint.md | 16 + .../generated/packages/nx/executors/noop.json | 20 + .../packages/nx/executors/run-commands.json | 130 + .../packages/nx/executors/run-script.json | 33 + docs/generated/packages/react-native.json | 969 --- .../react-native/documents/overview.md | 79 + .../react-native/executors/build-android.json | 36 + .../react-native/executors/bundle.json | 84 + .../executors/ensure-symlink.json | 21 + .../react-native/executors/run-android.json | 89 + .../react-native/executors/run-ios.json | 89 + .../react-native/executors/start.json | 38 + .../react-native/executors/storybook.json | 42 + .../react-native/executors/sync-deps.json | 34 + .../react-native/generators/application.json | 95 + .../generators/component-story.json | 36 + .../react-native/generators/component.json | 83 + .../react-native/generators/init.json | 49 + .../react-native/generators/library.json | 111 + .../react-native/generators/stories.json | 41 + .../generators/storybook-configuration.json | 68 + .../generators/upgrade-native.json | 48 + docs/generated/packages/react.json | 1645 ----- .../packages/react/documents/overview.md | 124 + .../module-federation-dev-server.json | 97 + .../module-federation-ssr-dev-server.json | 49 + .../react/generators/application.json | 202 + .../generators/component-cypress-spec.json | 44 + .../react/generators/component-story.json | 36 + .../react/generators/component-test.json | 40 + .../packages/react/generators/component.json | 146 + .../cypress-component-configuration.json | 61 + .../packages/react/generators/hook.json | 79 + .../packages/react/generators/host.json | 164 + .../packages/react/generators/init.json | 60 + .../packages/react/generators/library.json | 195 + .../packages/react/generators/redux.json | 50 + .../packages/react/generators/remote.json | 168 + .../packages/react/generators/setup-ssr.json | 51 + .../react/generators/setup-tailwind.json | 51 + .../packages/react/generators/stories.json | 56 + .../generators/storybook-configuration.json | 93 + docs/generated/packages/rollup.json | 293 - .../packages/rollup/executors/rollup.json | 178 + .../packages/rollup/generators/init.json | 33 + .../rollup/generators/rollup-project.json | 72 + docs/generated/packages/storybook.json | 547 -- .../documents/angular-browser-target.md | 72 + .../documents/angular-configuring-styles.md | 63 + .../documents/angular-storybook-compodoc.md | 166 + .../documents/angular-storybook-targets.md | 15 + .../storybook/documents/best-practices.md | 148 + .../migrate-webpack-final-angular.md | 142 + .../documents/migrate-webpack-final-react.md | 207 + .../storybook/documents/overview-angular.md | 155 + .../storybook/documents/overview-react.md | 159 + .../packages/storybook/documents/overview.md | 174 + .../documents/storybook-composition-setup.md | 202 + .../documents/upgrade-storybook-v6-angular.md | 199 + .../documents/upgrade-storybook-v6-react.md | 196 + .../packages/storybook/executors/build.json | 146 + .../storybook/executors/storybook.json | 109 + .../generators/change-storybook-targets.json | 22 + .../storybook/generators/configuration.json | 86 + .../storybook/generators/cypress-project.json | 49 + .../packages/storybook/generators/init.json | 42 + docs/generated/packages/tao.json | 11 - docs/generated/packages/vite.json | 393 - .../packages/vite/documents/overview.md | 353 + .../packages/vite/executors/build.json | 91 + .../packages/vite/executors/dev-server.json | 67 + .../packages/vite/executors/test.json | 68 + .../vite/generators/configuration.json | 59 + .../packages/vite/generators/init.json | 33 + .../packages/vite/generators/vitest.json | 54 + docs/generated/packages/web.json | 1035 --- .../packages/web/documents/overview.md | 99 + .../packages/web/executors/dev-server.json | 87 + .../packages/web/executors/file-server.json | 83 + .../packages/web/executors/rollup.json | 174 + .../packages/web/executors/webpack.json | 508 ++ .../packages/web/generators/application.json | 113 + .../packages/web/generators/init.json | 55 + docs/generated/packages/webpack.json | 839 --- .../webpack/executors/dev-server.json | 87 + .../webpack/executors/ssr-dev-server.json | 44 + .../packages/webpack/executors/webpack.json | 585 ++ .../packages/webpack/generators/init.json | 39 + .../webpack/generators/webpack-project.json | 73 + docs/generated/packages/workspace.json | 786 -- .../nx-nodejs-typescript-version-matrix.md | 14 + .../packages/workspace/documents/overview.md | 48 + .../packages/workspace/executors/counter.json | 25 + .../workspace/executors/run-commands.json | 130 + .../workspace/executors/run-script.json | 33 + .../workspace/generators/ci-workflow.json | 46 + .../generators/convert-to-nx-project.json | 41 + .../workspace/generators/library.json | 116 + .../packages/workspace/generators/move.json | 54 + .../packages/workspace/generators/new.json | 73 + .../workspace/generators/npm-package.json | 30 + .../packages/workspace/generators/preset.json | 70 + .../packages/workspace/generators/remove.json | 54 + .../workspace/generators/run-commands.json | 56 + .../generators/workspace-generator.json | 32 + docs/map.json | 2 +- docs/packages-metadata.json | 2921 ++++++++ docs/shared/ci-overview.md | 2 +- .../core-features/cache-task-results.md | 2 +- docs/shared/cypress-plugin.md | 2 +- .../cypress/cypress-component-testing.md | 52 + .../shared/guides/nx-devkit-angular-devkit.md | 4 +- .../storybook/angular-browser-target.md | 2 +- .../storybook/angular-configuring-styles.md | 2 +- .../storybook/angular-storybook-compodoc.md | 12 +- .../storybook/angular-storybook-targets.md | 4 +- .../shared/guides/storybook/best-practices.md | 10 +- .../shared/guides/storybook/plugin-angular.md | 12 +- .../guides/storybook/plugin-overview.md | 8 +- docs/shared/guides/storybook/plugin-react.md | 4 +- .../storybook/storybook-composition-setup.md | 6 +- docs/shared/guides/why-monorepos.md | 2 +- docs/shared/migration/manual.md | 2 +- docs/shared/migration/migration-angular.md | 4 +- docs/shared/monorepo-nx-enterprise.md | 2 +- docs/shared/nx-plugin.md | 2 +- .../plugin-features/use-code-generators.md | 2 +- .../plugin-features/use-task-executors.md | 2 +- docs/shared/react-plugin.md | 2 +- docs/shared/recipes/compose-executors.md | 2 +- docs/shared/recipes/local-generators.md | 2 +- docs/shared/recipes/one-storybook-for-all.md | 2 +- .../shared/recipes/one-storybook-per-scope.md | 2 +- .../recipes/one-storybook-with-composition.md | 4 +- docs/shared/recipes/root-level-scripts.md | 2 +- docs/shared/recipes/set-up-a-new-workspace.md | 2 +- docs/shared/reference/commands.md | 44 +- nx-dev/data-access-documents/src/index.ts | 2 - .../src/lib/documents.api.ts | 429 +- .../src/lib/documents.utils.spec.ts | 27 - .../src/lib/documents.utils.ts | 5 - .../data-access-documents/src/lib/tags.api.ts | 32 + .../data-access-documents/src/node.index.ts | 1 + nx-dev/data-access-menu/src/index.ts | 1 + nx-dev/data-access-menu/src/lib/menu.api.ts | 76 +- nx-dev/data-access-menu/src/lib/menu.utils.ts | 122 +- .../src/lib/packages.api.ts | 236 +- .../src/lib/sort-packages.ts | 40 +- nx-dev/feature-doc-viewer/src/lib/content.tsx | 29 - .../feature-doc-viewer/src/lib/doc-viewer.tsx | 57 +- .../src/index.ts | 1 + .../src/lib/content.tsx | 12 +- .../src/lib/get-schema-view-model.ts | 36 +- .../src/lib/package-schema-list.tsx | 74 +- .../src/lib/package-schema-viewer.tsx | 22 +- .../src/lib/parameter-view.tsx | 18 +- .../src/lib/schema-request.models.ts | 7 - .../src/lib/ui/package-reference.tsx | 80 +- nx-dev/models-document/src/index.ts | 1 + .../src/lib/documents.models.ts | 22 +- .../src/lib/documents.transformers.ts | 9 +- .../src/lib/related-documents.utils.ts | 63 + nx-dev/models-menu/src/lib/menu.models.ts | 9 +- .../models-package/src/lib/package.models.ts | 68 +- nx-dev/nx-dev-e2e/cypress.config.ts | 2 +- nx-dev/nx-dev/lib/api.ts | 72 - nx-dev/nx-dev/lib/cloud.api.ts | 17 + nx-dev/nx-dev/lib/menus.api.ts | 4 + nx-dev/nx-dev/lib/nx.api.ts | 11 + nx-dev/nx-dev/lib/packages.api.ts | 12 + nx-dev/nx-dev/lib/recipes.api.ts | 11 + nx-dev/nx-dev/lib/tags.api.ts | 4 + nx-dev/nx-dev/next.config.js | 8 + nx-dev/nx-dev/pages/[...segments].tsx | 242 +- nx-dev/nx-dev/pages/community.tsx | 20 +- .../nx-dev/pages/nx-cloud/[...segments].tsx | 116 + nx-dev/nx-dev/pages/nx-cloud/index.tsx | 102 + .../[name]/documents/[...segments].tsx | 142 + .../[name]/executors/[...segments].tsx | 128 + .../[name]/generators/[...segments].tsx | 130 + nx-dev/nx-dev/pages/packages/[name]/index.tsx | 134 + .../{packages.tsx => packages/index.tsx} | 88 +- nx-dev/nx-dev/pages/recipes/[...segments].tsx | 113 + nx-dev/nx-dev/pages/recipes/index.tsx | 99 + nx-dev/nx-dev/redirect-rules.config.js | 61 + nx-dev/ui-common/src/lib/sidebar.tsx | 7 +- nx-dev/ui-markdoc/src/index.ts | 22 +- .../lib/nodes/helpers/transform-image-path.ts | 1 - .../ui-markdoc/src/lib/nodes/image.schema.ts | 1 - nx-dev/ui-references/src/index.ts | 1 + package.json | 2 +- .../docs/change-storybook-targets-examples.md | 2 +- packages/angular/docs/stories-examples.md | 2 +- .../docs/storybook-configuration-examples.md | 4 +- packages/react-native/README.md | 2 +- packages/react/docs/stories-examples.md | 2 +- .../docs/storybook-configuration-examples.md | 4 +- .../docs/build-storybook-executor-examples.md | 4 +- .../docs/change-storybook-targets-example.md | 2 +- .../docs/storybook-executor-examples.md | 4 +- .../{ => generators}/generate-cli-data.ts | 16 +- .../generate-cnw-documentation.ts | 4 +- .../generate-devkit-documentation.ts | 1 + .../generators/generate-manifests.ts | 459 ++ .../{documentation.ts => generators/main.ts} | 15 +- .../utils-generator/convert-to-dictionary.ts | 22 + .../get-package-configurations.ts | 56 - scripts/documentation/map-link-checker.ts | 2 +- .../package-schemas/generatePackageSchemas.ts | 124 +- .../package-schemas/package-metadata.ts | 28 +- scripts/documentation/utils.ts | 16 +- 411 files changed, 45917 insertions(+), 19192 deletions(-) create mode 100644 docs/generated/manifests/cloud.json create mode 100644 docs/generated/manifests/menus.json create mode 100644 docs/generated/manifests/nx.json create mode 100644 docs/generated/manifests/packages.json create mode 100644 docs/generated/manifests/recipes.json create mode 100644 docs/generated/manifests/tags.json delete mode 100644 docs/generated/packages/add-nx-to-monorepo.json delete mode 100644 docs/generated/packages/angular.json create mode 100644 docs/generated/packages/angular/documents/angular-nx-version-matrix.md create mode 100644 docs/generated/packages/angular/documents/overview.md create mode 100644 docs/generated/packages/angular/executors/delegate-build.json create mode 100644 docs/generated/packages/angular/executors/file-server.json create mode 100644 docs/generated/packages/angular/executors/module-federation-dev-server.json create mode 100644 docs/generated/packages/angular/executors/module-federation-dev-ssr.json create mode 100644 docs/generated/packages/angular/executors/ng-packagr-lite.json create mode 100644 docs/generated/packages/angular/executors/package.json create mode 100644 docs/generated/packages/angular/executors/webpack-browser.json create mode 100644 docs/generated/packages/angular/executors/webpack-dev-server.json create mode 100644 docs/generated/packages/angular/executors/webpack-server.json create mode 100644 docs/generated/packages/angular/generators/add-linting.json create mode 100644 docs/generated/packages/angular/generators/application.json create mode 100644 docs/generated/packages/angular/generators/change-storybook-targets.json create mode 100644 docs/generated/packages/angular/generators/component-cypress-spec.json create mode 100644 docs/generated/packages/angular/generators/component-story.json create mode 100644 docs/generated/packages/angular/generators/component-test.json create mode 100644 docs/generated/packages/angular/generators/component.json create mode 100644 docs/generated/packages/angular/generators/convert-to-with-mf.json create mode 100644 docs/generated/packages/angular/generators/convert-tslint-to-eslint.json create mode 100644 docs/generated/packages/angular/generators/cypress-component-configuration.json create mode 100644 docs/generated/packages/angular/generators/downgrade-module.json create mode 100644 docs/generated/packages/angular/generators/host.json create mode 100644 docs/generated/packages/angular/generators/init.json create mode 100644 docs/generated/packages/angular/generators/karma-project.json create mode 100644 docs/generated/packages/angular/generators/karma.json create mode 100644 docs/generated/packages/angular/generators/library-secondary-entry-point.json create mode 100644 docs/generated/packages/angular/generators/library.json create mode 100644 docs/generated/packages/angular/generators/move.json create mode 100644 docs/generated/packages/angular/generators/ng-add.json create mode 100644 docs/generated/packages/angular/generators/ngrx.json create mode 100644 docs/generated/packages/angular/generators/remote.json create mode 100644 docs/generated/packages/angular/generators/scam-directive.json create mode 100644 docs/generated/packages/angular/generators/scam-pipe.json create mode 100644 docs/generated/packages/angular/generators/scam-to-standalone.json create mode 100644 docs/generated/packages/angular/generators/scam.json create mode 100644 docs/generated/packages/angular/generators/setup-mf.json create mode 100644 docs/generated/packages/angular/generators/setup-ssr.json create mode 100644 docs/generated/packages/angular/generators/setup-tailwind.json create mode 100644 docs/generated/packages/angular/generators/stories.json create mode 100644 docs/generated/packages/angular/generators/storybook-configuration.json create mode 100644 docs/generated/packages/angular/generators/upgrade-module.json create mode 100644 docs/generated/packages/angular/generators/web-worker.json delete mode 100644 docs/generated/packages/cra-to-nx.json delete mode 100644 docs/generated/packages/create-nx-plugin.json delete mode 100644 docs/generated/packages/create-nx-workspace.json delete mode 100644 docs/generated/packages/cypress.json rename docs/{shared => generated/packages/cypress/documents}/cypress-component-testing.md (96%) create mode 100644 docs/generated/packages/cypress/documents/overview.md create mode 100644 docs/generated/packages/cypress/documents/v10-migration-guide.md create mode 100644 docs/generated/packages/cypress/documents/v11-migration-guide.md create mode 100644 docs/generated/packages/cypress/executors/cypress.json create mode 100644 docs/generated/packages/cypress/generators/cypress-component-project.json create mode 100644 docs/generated/packages/cypress/generators/cypress-project.json create mode 100644 docs/generated/packages/cypress/generators/init.json create mode 100644 docs/generated/packages/cypress/generators/migrate-to-cypress-10.json create mode 100644 docs/generated/packages/cypress/generators/migrate-to-cypress-11.json delete mode 100644 docs/generated/packages/detox.json create mode 100644 docs/generated/packages/detox/documents/overview.md create mode 100644 docs/generated/packages/detox/executors/build.json create mode 100644 docs/generated/packages/detox/executors/test.json create mode 100644 docs/generated/packages/detox/generators/application.json create mode 100644 docs/generated/packages/detox/generators/init.json delete mode 100644 docs/generated/packages/devkit.json create mode 100644 docs/generated/packages/devkit/documents/index.md create mode 100644 docs/generated/packages/devkit/documents/ngcli_adapter.md delete mode 100644 docs/generated/packages/esbuild.json create mode 100644 docs/generated/packages/esbuild/documents/overview.md create mode 100644 docs/generated/packages/esbuild/executors/esbuild.json create mode 100644 docs/generated/packages/esbuild/generators/esbuild-project.json create mode 100644 docs/generated/packages/esbuild/generators/init.json delete mode 100644 docs/generated/packages/eslint-plugin-nx.json create mode 100644 docs/generated/packages/eslint-plugin-nx/documents/overview.md delete mode 100644 docs/generated/packages/expo.json create mode 100644 docs/generated/packages/expo/executors/build-android.json create mode 100644 docs/generated/packages/expo/executors/build-ios.json create mode 100644 docs/generated/packages/expo/executors/build-list.json create mode 100644 docs/generated/packages/expo/executors/build-status.json create mode 100644 docs/generated/packages/expo/executors/build-web.json create mode 100644 docs/generated/packages/expo/executors/build.json create mode 100644 docs/generated/packages/expo/executors/download.json create mode 100644 docs/generated/packages/expo/executors/ensure-symlink.json create mode 100644 docs/generated/packages/expo/executors/export.json create mode 100644 docs/generated/packages/expo/executors/install.json create mode 100644 docs/generated/packages/expo/executors/prebuild.json create mode 100644 docs/generated/packages/expo/executors/publish-set.json create mode 100644 docs/generated/packages/expo/executors/publish.json create mode 100644 docs/generated/packages/expo/executors/rollback.json create mode 100644 docs/generated/packages/expo/executors/run.json create mode 100644 docs/generated/packages/expo/executors/start.json create mode 100644 docs/generated/packages/expo/executors/sync-deps.json create mode 100644 docs/generated/packages/expo/executors/update.json create mode 100644 docs/generated/packages/expo/generators/application.json create mode 100644 docs/generated/packages/expo/generators/component.json create mode 100644 docs/generated/packages/expo/generators/init.json create mode 100644 docs/generated/packages/expo/generators/library.json delete mode 100644 docs/generated/packages/express.json create mode 100644 docs/generated/packages/express/documents/overview.md create mode 100644 docs/generated/packages/express/generators/application.json create mode 100644 docs/generated/packages/express/generators/init.json delete mode 100644 docs/generated/packages/jest.json create mode 100644 docs/generated/packages/jest/documents/overview.md create mode 100644 docs/generated/packages/jest/executors/jest.json create mode 100644 docs/generated/packages/jest/generators/init.json create mode 100644 docs/generated/packages/jest/generators/jest-project.json delete mode 100644 docs/generated/packages/js.json create mode 100644 docs/generated/packages/js/documents/overview.md create mode 100644 docs/generated/packages/js/executors/node.json create mode 100644 docs/generated/packages/js/executors/swc.json create mode 100644 docs/generated/packages/js/executors/tsc.json create mode 100644 docs/generated/packages/js/generators/convert-to-swc.json create mode 100644 docs/generated/packages/js/generators/init.json create mode 100644 docs/generated/packages/js/generators/library.json delete mode 100644 docs/generated/packages/linter.json create mode 100644 docs/generated/packages/linter/documents/eslint-plugin-nx.md create mode 100644 docs/generated/packages/linter/documents/overview.md create mode 100644 docs/generated/packages/linter/executors/eslint.json create mode 100644 docs/generated/packages/linter/generators/workspace-rule.json create mode 100644 docs/generated/packages/linter/generators/workspace-rules-project.json delete mode 100644 docs/generated/packages/make-angular-cli-faster.json delete mode 100644 docs/generated/packages/nest.json create mode 100644 docs/generated/packages/nest/documents/overview.md create mode 100644 docs/generated/packages/nest/generators/application.json create mode 100644 docs/generated/packages/nest/generators/class.json create mode 100644 docs/generated/packages/nest/generators/controller.json create mode 100644 docs/generated/packages/nest/generators/convert-tslint-to-eslint.json create mode 100644 docs/generated/packages/nest/generators/decorator.json create mode 100644 docs/generated/packages/nest/generators/filter.json create mode 100644 docs/generated/packages/nest/generators/gateway.json create mode 100644 docs/generated/packages/nest/generators/guard.json create mode 100644 docs/generated/packages/nest/generators/init.json create mode 100644 docs/generated/packages/nest/generators/interceptor.json create mode 100644 docs/generated/packages/nest/generators/interface.json create mode 100644 docs/generated/packages/nest/generators/library.json create mode 100644 docs/generated/packages/nest/generators/middleware.json create mode 100644 docs/generated/packages/nest/generators/module.json create mode 100644 docs/generated/packages/nest/generators/pipe.json create mode 100644 docs/generated/packages/nest/generators/provider.json create mode 100644 docs/generated/packages/nest/generators/resolver.json create mode 100644 docs/generated/packages/nest/generators/resource.json create mode 100644 docs/generated/packages/nest/generators/service.json delete mode 100644 docs/generated/packages/next.json create mode 100644 docs/generated/packages/next/documents/overview.md create mode 100644 docs/generated/packages/next/executors/build.json create mode 100644 docs/generated/packages/next/executors/export.json create mode 100644 docs/generated/packages/next/executors/server.json create mode 100644 docs/generated/packages/next/generators/application.json create mode 100644 docs/generated/packages/next/generators/component.json create mode 100644 docs/generated/packages/next/generators/custom-server.json create mode 100644 docs/generated/packages/next/generators/init.json create mode 100644 docs/generated/packages/next/generators/library.json create mode 100644 docs/generated/packages/next/generators/page.json delete mode 100644 docs/generated/packages/node.json create mode 100644 docs/generated/packages/node/documents/overview.md create mode 100644 docs/generated/packages/node/executors/node.json create mode 100644 docs/generated/packages/node/executors/webpack.json create mode 100644 docs/generated/packages/node/generators/application.json create mode 100644 docs/generated/packages/node/generators/init.json create mode 100644 docs/generated/packages/node/generators/library.json delete mode 100644 docs/generated/packages/nx-plugin.json create mode 100644 docs/generated/packages/nx-plugin/documents/overview.md create mode 100644 docs/generated/packages/nx-plugin/executors/e2e.json create mode 100644 docs/generated/packages/nx-plugin/generators/e2e-project.json create mode 100644 docs/generated/packages/nx-plugin/generators/executor.json create mode 100644 docs/generated/packages/nx-plugin/generators/generator.json create mode 100644 docs/generated/packages/nx-plugin/generators/migration.json create mode 100644 docs/generated/packages/nx-plugin/generators/plugin-lint-checks.json create mode 100644 docs/generated/packages/nx-plugin/generators/plugin.json delete mode 100644 docs/generated/packages/nx.json create mode 100644 docs/generated/packages/nx/documents/affected-apps.md create mode 100644 docs/generated/packages/nx/documents/affected-dep-graph.md create mode 100644 docs/generated/packages/nx/documents/affected-libs.md create mode 100644 docs/generated/packages/nx/documents/affected.md create mode 100644 docs/generated/packages/nx/documents/connect-to-nx-cloud.md create mode 100644 docs/generated/packages/nx/documents/create-nx-workspace.md create mode 100644 docs/generated/packages/nx/documents/daemon.md create mode 100644 docs/generated/packages/nx/documents/dep-graph.md create mode 100644 docs/generated/packages/nx/documents/exec.md create mode 100644 docs/generated/packages/nx/documents/format-check.md create mode 100644 docs/generated/packages/nx/documents/format-write.md create mode 100644 docs/generated/packages/nx/documents/generate.md create mode 100644 docs/generated/packages/nx/documents/init.md create mode 100644 docs/generated/packages/nx/documents/list.md create mode 100644 docs/generated/packages/nx/documents/migrate.md create mode 100644 docs/generated/packages/nx/documents/print-affected.md create mode 100644 docs/generated/packages/nx/documents/repair.md create mode 100644 docs/generated/packages/nx/documents/report.md create mode 100644 docs/generated/packages/nx/documents/reset.md create mode 100644 docs/generated/packages/nx/documents/run-many.md create mode 100644 docs/generated/packages/nx/documents/run.md create mode 100644 docs/generated/packages/nx/documents/watch.md create mode 100644 docs/generated/packages/nx/documents/workspace-generator.md create mode 100644 docs/generated/packages/nx/documents/workspace-lint.md create mode 100644 docs/generated/packages/nx/executors/noop.json create mode 100644 docs/generated/packages/nx/executors/run-commands.json create mode 100644 docs/generated/packages/nx/executors/run-script.json delete mode 100644 docs/generated/packages/react-native.json create mode 100644 docs/generated/packages/react-native/documents/overview.md create mode 100644 docs/generated/packages/react-native/executors/build-android.json create mode 100644 docs/generated/packages/react-native/executors/bundle.json create mode 100644 docs/generated/packages/react-native/executors/ensure-symlink.json create mode 100644 docs/generated/packages/react-native/executors/run-android.json create mode 100644 docs/generated/packages/react-native/executors/run-ios.json create mode 100644 docs/generated/packages/react-native/executors/start.json create mode 100644 docs/generated/packages/react-native/executors/storybook.json create mode 100644 docs/generated/packages/react-native/executors/sync-deps.json create mode 100644 docs/generated/packages/react-native/generators/application.json create mode 100644 docs/generated/packages/react-native/generators/component-story.json create mode 100644 docs/generated/packages/react-native/generators/component.json create mode 100644 docs/generated/packages/react-native/generators/init.json create mode 100644 docs/generated/packages/react-native/generators/library.json create mode 100644 docs/generated/packages/react-native/generators/stories.json create mode 100644 docs/generated/packages/react-native/generators/storybook-configuration.json create mode 100644 docs/generated/packages/react-native/generators/upgrade-native.json delete mode 100644 docs/generated/packages/react.json create mode 100644 docs/generated/packages/react/documents/overview.md create mode 100644 docs/generated/packages/react/executors/module-federation-dev-server.json create mode 100644 docs/generated/packages/react/executors/module-federation-ssr-dev-server.json create mode 100644 docs/generated/packages/react/generators/application.json create mode 100644 docs/generated/packages/react/generators/component-cypress-spec.json create mode 100644 docs/generated/packages/react/generators/component-story.json create mode 100644 docs/generated/packages/react/generators/component-test.json create mode 100644 docs/generated/packages/react/generators/component.json create mode 100644 docs/generated/packages/react/generators/cypress-component-configuration.json create mode 100644 docs/generated/packages/react/generators/hook.json create mode 100644 docs/generated/packages/react/generators/host.json create mode 100644 docs/generated/packages/react/generators/init.json create mode 100644 docs/generated/packages/react/generators/library.json create mode 100644 docs/generated/packages/react/generators/redux.json create mode 100644 docs/generated/packages/react/generators/remote.json create mode 100644 docs/generated/packages/react/generators/setup-ssr.json create mode 100644 docs/generated/packages/react/generators/setup-tailwind.json create mode 100644 docs/generated/packages/react/generators/stories.json create mode 100644 docs/generated/packages/react/generators/storybook-configuration.json delete mode 100644 docs/generated/packages/rollup.json create mode 100644 docs/generated/packages/rollup/executors/rollup.json create mode 100644 docs/generated/packages/rollup/generators/init.json create mode 100644 docs/generated/packages/rollup/generators/rollup-project.json delete mode 100644 docs/generated/packages/storybook.json create mode 100644 docs/generated/packages/storybook/documents/angular-browser-target.md create mode 100644 docs/generated/packages/storybook/documents/angular-configuring-styles.md create mode 100644 docs/generated/packages/storybook/documents/angular-storybook-compodoc.md create mode 100644 docs/generated/packages/storybook/documents/angular-storybook-targets.md create mode 100644 docs/generated/packages/storybook/documents/best-practices.md create mode 100644 docs/generated/packages/storybook/documents/migrate-webpack-final-angular.md create mode 100644 docs/generated/packages/storybook/documents/migrate-webpack-final-react.md create mode 100644 docs/generated/packages/storybook/documents/overview-angular.md create mode 100644 docs/generated/packages/storybook/documents/overview-react.md create mode 100644 docs/generated/packages/storybook/documents/overview.md create mode 100644 docs/generated/packages/storybook/documents/storybook-composition-setup.md create mode 100644 docs/generated/packages/storybook/documents/upgrade-storybook-v6-angular.md create mode 100644 docs/generated/packages/storybook/documents/upgrade-storybook-v6-react.md create mode 100644 docs/generated/packages/storybook/executors/build.json create mode 100644 docs/generated/packages/storybook/executors/storybook.json create mode 100644 docs/generated/packages/storybook/generators/change-storybook-targets.json create mode 100644 docs/generated/packages/storybook/generators/configuration.json create mode 100644 docs/generated/packages/storybook/generators/cypress-project.json create mode 100644 docs/generated/packages/storybook/generators/init.json delete mode 100644 docs/generated/packages/tao.json delete mode 100644 docs/generated/packages/vite.json create mode 100644 docs/generated/packages/vite/documents/overview.md create mode 100644 docs/generated/packages/vite/executors/build.json create mode 100644 docs/generated/packages/vite/executors/dev-server.json create mode 100644 docs/generated/packages/vite/executors/test.json create mode 100644 docs/generated/packages/vite/generators/configuration.json create mode 100644 docs/generated/packages/vite/generators/init.json create mode 100644 docs/generated/packages/vite/generators/vitest.json delete mode 100644 docs/generated/packages/web.json create mode 100644 docs/generated/packages/web/documents/overview.md create mode 100644 docs/generated/packages/web/executors/dev-server.json create mode 100644 docs/generated/packages/web/executors/file-server.json create mode 100644 docs/generated/packages/web/executors/rollup.json create mode 100644 docs/generated/packages/web/executors/webpack.json create mode 100644 docs/generated/packages/web/generators/application.json create mode 100644 docs/generated/packages/web/generators/init.json delete mode 100644 docs/generated/packages/webpack.json create mode 100644 docs/generated/packages/webpack/executors/dev-server.json create mode 100644 docs/generated/packages/webpack/executors/ssr-dev-server.json create mode 100644 docs/generated/packages/webpack/executors/webpack.json create mode 100644 docs/generated/packages/webpack/generators/init.json create mode 100644 docs/generated/packages/webpack/generators/webpack-project.json delete mode 100644 docs/generated/packages/workspace.json create mode 100644 docs/generated/packages/workspace/documents/nx-nodejs-typescript-version-matrix.md create mode 100644 docs/generated/packages/workspace/documents/overview.md create mode 100644 docs/generated/packages/workspace/executors/counter.json create mode 100644 docs/generated/packages/workspace/executors/run-commands.json create mode 100644 docs/generated/packages/workspace/executors/run-script.json create mode 100644 docs/generated/packages/workspace/generators/ci-workflow.json create mode 100644 docs/generated/packages/workspace/generators/convert-to-nx-project.json create mode 100644 docs/generated/packages/workspace/generators/library.json create mode 100644 docs/generated/packages/workspace/generators/move.json create mode 100644 docs/generated/packages/workspace/generators/new.json create mode 100644 docs/generated/packages/workspace/generators/npm-package.json create mode 100644 docs/generated/packages/workspace/generators/preset.json create mode 100644 docs/generated/packages/workspace/generators/remove.json create mode 100644 docs/generated/packages/workspace/generators/run-commands.json create mode 100644 docs/generated/packages/workspace/generators/workspace-generator.json create mode 100644 docs/packages-metadata.json create mode 100644 docs/shared/guides/cypress/cypress-component-testing.md delete mode 100644 nx-dev/data-access-documents/src/lib/documents.utils.spec.ts delete mode 100644 nx-dev/data-access-documents/src/lib/documents.utils.ts create mode 100644 nx-dev/data-access-documents/src/lib/tags.api.ts delete mode 100644 nx-dev/feature-doc-viewer/src/lib/content.tsx delete mode 100644 nx-dev/feature-package-schema-viewer/src/lib/schema-request.models.ts create mode 100644 nx-dev/models-document/src/lib/related-documents.utils.ts delete mode 100644 nx-dev/nx-dev/lib/api.ts create mode 100644 nx-dev/nx-dev/lib/cloud.api.ts create mode 100644 nx-dev/nx-dev/lib/menus.api.ts create mode 100644 nx-dev/nx-dev/lib/nx.api.ts create mode 100644 nx-dev/nx-dev/lib/packages.api.ts create mode 100644 nx-dev/nx-dev/lib/recipes.api.ts create mode 100644 nx-dev/nx-dev/lib/tags.api.ts create mode 100644 nx-dev/nx-dev/pages/nx-cloud/[...segments].tsx create mode 100644 nx-dev/nx-dev/pages/nx-cloud/index.tsx create mode 100644 nx-dev/nx-dev/pages/packages/[name]/documents/[...segments].tsx create mode 100644 nx-dev/nx-dev/pages/packages/[name]/executors/[...segments].tsx create mode 100644 nx-dev/nx-dev/pages/packages/[name]/generators/[...segments].tsx create mode 100644 nx-dev/nx-dev/pages/packages/[name]/index.tsx rename nx-dev/nx-dev/pages/{packages.tsx => packages/index.tsx} (63%) create mode 100644 nx-dev/nx-dev/pages/recipes/[...segments].tsx create mode 100644 nx-dev/nx-dev/pages/recipes/index.tsx rename scripts/documentation/{ => generators}/generate-cli-data.ts (90%) rename scripts/documentation/{ => generators}/generate-cnw-documentation.ts (94%) rename scripts/documentation/{ => generators}/generate-devkit-documentation.ts (98%) create mode 100644 scripts/documentation/generators/generate-manifests.ts rename scripts/documentation/{documentation.ts => generators/main.ts} (79%) create mode 100644 scripts/documentation/generators/utils-generator/convert-to-dictionary.ts delete mode 100644 scripts/documentation/get-package-configurations.ts diff --git a/docs/generated/manifests/cloud.json b/docs/generated/manifests/cloud.json new file mode 100644 index 0000000000000..7a18a6f48def7 --- /dev/null +++ b/docs/generated/manifests/cloud.json @@ -0,0 +1,517 @@ +{ + "/nx-cloud/intro": { + "id": "intro", + "name": "Intro", + "description": "Learn about basic Nx Cloud knowledge.", + "file": "", + "itemList": [ + { + "id": "what-is-nx-cloud", + "name": "What is Nx Cloud?", + "description": "", + "file": "nx-cloud/intro/nx-cloud", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/intro/what-is-nx-cloud", + "tags": [] + } + ], + "isExternal": false, + "path": "/nx-cloud/intro", + "tags": [] + }, + "/nx-cloud/intro/what-is-nx-cloud": { + "id": "what-is-nx-cloud", + "name": "What is Nx Cloud?", + "description": "", + "file": "nx-cloud/intro/nx-cloud", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/intro/what-is-nx-cloud", + "tags": [] + }, + "/nx-cloud/set-up": { + "id": "set-up", + "name": "Set Up", + "description": "Learn how to set up Nx Cloud for your workspace.", + "file": "", + "itemList": [ + { + "id": "record-commands", + "name": "Record Non-Nx Commands", + "description": "", + "file": "nx-cloud/set-up/record-commands", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/set-up/record-commands", + "tags": [] + }, + { + "id": "github", + "name": "Enable GitHub PR Integration", + "description": "", + "file": "nx-cloud/set-up/github", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/set-up/github", + "tags": [] + } + ], + "isExternal": false, + "path": "/nx-cloud/set-up", + "tags": [] + }, + "/nx-cloud/set-up/record-commands": { + "id": "record-commands", + "name": "Record Non-Nx Commands", + "description": "", + "file": "nx-cloud/set-up/record-commands", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/set-up/record-commands", + "tags": [] + }, + "/nx-cloud/set-up/github": { + "id": "github", + "name": "Enable GitHub PR Integration", + "description": "", + "file": "nx-cloud/set-up/github", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/set-up/github", + "tags": [] + }, + "/nx-cloud/account": { + "id": "account", + "name": "Account Management", + "description": "Learn how to manage Nx Cloud subscriptions and other options.", + "file": "", + "itemList": [ + { + "id": "billing", + "name": "Billing and Utilization", + "description": "", + "file": "nx-cloud/account/billing", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/billing", + "tags": [] + }, + { + "id": "users", + "name": "Users", + "description": "", + "file": "nx-cloud/account/users", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/users", + "tags": [] + }, + { + "id": "google-auth", + "name": "Authenticate with Google Identity", + "description": "", + "file": "nx-cloud/account/google-auth", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/google-auth", + "tags": [] + }, + { + "id": "access-tokens", + "name": "Access Tokens", + "description": "", + "file": "nx-cloud/account/access-tokens", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/access-tokens", + "tags": [] + }, + { + "id": "scenarios", + "name": "Security Scenarios", + "description": "", + "file": "nx-cloud/account/scenarios", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/scenarios", + "tags": [] + }, + { + "id": "encryption", + "name": "End to End Encryption", + "description": "", + "file": "nx-cloud/account/encryption", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/encryption", + "tags": [] + } + ], + "isExternal": false, + "path": "/nx-cloud/account", + "tags": [] + }, + "/nx-cloud/account/billing": { + "id": "billing", + "name": "Billing and Utilization", + "description": "", + "file": "nx-cloud/account/billing", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/billing", + "tags": [] + }, + "/nx-cloud/account/users": { + "id": "users", + "name": "Users", + "description": "", + "file": "nx-cloud/account/users", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/users", + "tags": [] + }, + "/nx-cloud/account/google-auth": { + "id": "google-auth", + "name": "Authenticate with Google Identity", + "description": "", + "file": "nx-cloud/account/google-auth", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/google-auth", + "tags": [] + }, + "/nx-cloud/account/access-tokens": { + "id": "access-tokens", + "name": "Access Tokens", + "description": "", + "file": "nx-cloud/account/access-tokens", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/access-tokens", + "tags": [] + }, + "/nx-cloud/account/scenarios": { + "id": "scenarios", + "name": "Security Scenarios", + "description": "", + "file": "nx-cloud/account/scenarios", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/scenarios", + "tags": [] + }, + "/nx-cloud/account/encryption": { + "id": "encryption", + "name": "End to End Encryption", + "description": "", + "file": "nx-cloud/account/encryption", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/account/encryption", + "tags": [] + }, + "/nx-cloud/private-cloud": { + "id": "private-cloud", + "name": "On Prem", + "description": "Learn about Nx Cloud On Premise, dedicated Nx Cloud application hosted on your server, in your network with total private access.", + "file": "", + "itemList": [ + { + "id": "get-started", + "name": "Get Started", + "description": "", + "file": "nx-cloud/private/get-started", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/get-started", + "tags": [] + }, + { + "id": "github", + "name": "Enable Github PR Integration", + "description": "", + "file": "nx-cloud/private/github", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/github", + "tags": [] + }, + { + "id": "auth-single-admin", + "name": "Authenticate with a Single Admin", + "description": "", + "file": "nx-cloud/private/auth-single-admin", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-single-admin", + "tags": [] + }, + { + "id": "auth-github", + "name": "Authenticate with GitHub", + "description": "", + "file": "nx-cloud/private/auth-github", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-github", + "tags": [] + }, + { + "id": "auth-gitlab", + "name": "Authenticate with GitLab", + "description": "", + "file": "nx-cloud/private/auth-gitlab", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-gitlab", + "tags": [] + }, + { + "id": "auth-bitbucket", + "name": "Authenticate with BitBucket", + "description": "", + "file": "nx-cloud/private/auth-bitbucket", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-bitbucket", + "tags": [] + }, + { + "id": "auth-saml", + "name": "Authenticate via SAML", + "description": "", + "file": "nx-cloud/private/auth-saml", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-saml", + "tags": [] + }, + { + "id": "advanced-config", + "name": "Advanced Configuration", + "description": "", + "file": "nx-cloud/private/advanced-config", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/advanced-config", + "tags": [] + }, + { + "id": "standalone", + "name": "Standalone", + "description": "", + "file": "nx-cloud/private/standalone", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/standalone", + "tags": [] + } + ], + "isExternal": false, + "path": "/nx-cloud/private-cloud", + "tags": [] + }, + "/nx-cloud/private-cloud/get-started": { + "id": "get-started", + "name": "Get Started", + "description": "", + "file": "nx-cloud/private/get-started", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/get-started", + "tags": [] + }, + "/nx-cloud/private-cloud/github": { + "id": "github", + "name": "Enable Github PR Integration", + "description": "", + "file": "nx-cloud/private/github", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/github", + "tags": [] + }, + "/nx-cloud/private-cloud/auth-single-admin": { + "id": "auth-single-admin", + "name": "Authenticate with a Single Admin", + "description": "", + "file": "nx-cloud/private/auth-single-admin", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-single-admin", + "tags": [] + }, + "/nx-cloud/private-cloud/auth-github": { + "id": "auth-github", + "name": "Authenticate with GitHub", + "description": "", + "file": "nx-cloud/private/auth-github", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-github", + "tags": [] + }, + "/nx-cloud/private-cloud/auth-gitlab": { + "id": "auth-gitlab", + "name": "Authenticate with GitLab", + "description": "", + "file": "nx-cloud/private/auth-gitlab", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-gitlab", + "tags": [] + }, + "/nx-cloud/private-cloud/auth-bitbucket": { + "id": "auth-bitbucket", + "name": "Authenticate with BitBucket", + "description": "", + "file": "nx-cloud/private/auth-bitbucket", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-bitbucket", + "tags": [] + }, + "/nx-cloud/private-cloud/auth-saml": { + "id": "auth-saml", + "name": "Authenticate via SAML", + "description": "", + "file": "nx-cloud/private/auth-saml", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/auth-saml", + "tags": [] + }, + "/nx-cloud/private-cloud/advanced-config": { + "id": "advanced-config", + "name": "Advanced Configuration", + "description": "", + "file": "nx-cloud/private/advanced-config", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/advanced-config", + "tags": [] + }, + "/nx-cloud/private-cloud/standalone": { + "id": "standalone", + "name": "Standalone", + "description": "", + "file": "nx-cloud/private/standalone", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/private-cloud/standalone", + "tags": [] + }, + "/nx-cloud/reference": { + "id": "reference", + "name": "Reference", + "description": "Understand how to use Nx Cloud, what arguments and options are available for each component.", + "file": "", + "itemList": [ + { + "id": "config", + "name": "Configuration Options", + "description": "", + "file": "nx-cloud/reference/config", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/config", + "tags": [] + }, + { + "id": "nx-cloud-cli", + "name": "nx-cloud CLI", + "description": "", + "file": "nx-cloud/reference/nx-cloud-cli", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/nx-cloud-cli", + "tags": [] + }, + { + "id": "env-vars", + "name": "Environment Variables", + "description": "", + "file": "nx-cloud/reference/env-vars", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/env-vars", + "tags": [] + }, + { + "id": "server-api", + "name": "Server API Reference", + "description": "", + "file": "nx-cloud/reference/server-api", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/server-api", + "tags": [] + }, + { + "id": "release-notes", + "name": "Release Notes", + "description": "", + "file": "nx-cloud/reference/release-notes", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/release-notes", + "tags": [] + } + ], + "isExternal": false, + "path": "/nx-cloud/reference", + "tags": [] + }, + "/nx-cloud/reference/config": { + "id": "config", + "name": "Configuration Options", + "description": "", + "file": "nx-cloud/reference/config", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/config", + "tags": [] + }, + "/nx-cloud/reference/nx-cloud-cli": { + "id": "nx-cloud-cli", + "name": "nx-cloud CLI", + "description": "", + "file": "nx-cloud/reference/nx-cloud-cli", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/nx-cloud-cli", + "tags": [] + }, + "/nx-cloud/reference/env-vars": { + "id": "env-vars", + "name": "Environment Variables", + "description": "", + "file": "nx-cloud/reference/env-vars", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/env-vars", + "tags": [] + }, + "/nx-cloud/reference/server-api": { + "id": "server-api", + "name": "Server API Reference", + "description": "", + "file": "nx-cloud/reference/server-api", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/server-api", + "tags": [] + }, + "/nx-cloud/reference/release-notes": { + "id": "release-notes", + "name": "Release Notes", + "description": "", + "file": "nx-cloud/reference/release-notes", + "itemList": [], + "isExternal": false, + "path": "/nx-cloud/reference/release-notes", + "tags": [] + } +} diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json new file mode 100644 index 0000000000000..22096d42597b4 --- /dev/null +++ b/docs/generated/manifests/menus.json @@ -0,0 +1,6306 @@ +[ + { + "id": "nx", + "menu": [ + { + "name": "Getting Started", + "path": "/getting-started", + "id": "getting-started", + "isExternal": false, + "children": [ + { + "name": "Intro to Nx", + "path": "/getting-started/intro", + "id": "intro", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Package-Based Repo Tutorial", + "path": "/getting-started/package-based-repo-tutorial", + "id": "package-based-repo-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Integrated Repo Tutorial", + "path": "/getting-started/integrated-repo-tutorial", + "id": "integrated-repo-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React Standalone Tutorial", + "path": "/getting-started/react-standalone-tutorial", + "id": "react-standalone-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular Standalone Tutorial", + "path": "/getting-started/angular-standalone-tutorial", + "id": "angular-standalone-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Node Tutorial", + "path": "/getting-started/node-tutorial", + "id": "node-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Intro to Nx", + "path": "/getting-started/intro", + "id": "intro", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Package-Based Repo Tutorial", + "path": "/getting-started/package-based-repo-tutorial", + "id": "package-based-repo-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Integrated Repo Tutorial", + "path": "/getting-started/integrated-repo-tutorial", + "id": "integrated-repo-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React Standalone Tutorial", + "path": "/getting-started/react-standalone-tutorial", + "id": "react-standalone-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular Standalone Tutorial", + "path": "/getting-started/angular-standalone-tutorial", + "id": "angular-standalone-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Node Tutorial", + "path": "/getting-started/node-tutorial", + "id": "node-tutorial", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Core Tutorial", + "path": "/core-tutorial", + "id": "core-tutorial", + "isExternal": false, + "children": [ + { + "name": "1 - Create Blog", + "path": "/core-tutorial/01-create-blog", + "id": "01-create-blog", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Create CLI", + "path": "/core-tutorial/02-create-cli", + "id": "02-create-cli", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Share Assets", + "path": "/core-tutorial/03-share-assets", + "id": "03-share-assets", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Build Affected Projects", + "path": "/core-tutorial/04-build-affected-projects", + "id": "04-build-affected-projects", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Automatically Detect Dependencies", + "path": "/core-tutorial/05-auto-detect-dependencies", + "id": "05-auto-detect-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "6 - Summary", + "path": "/core-tutorial/06-summary", + "id": "06-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "1 - Create Blog", + "path": "/core-tutorial/01-create-blog", + "id": "01-create-blog", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Create CLI", + "path": "/core-tutorial/02-create-cli", + "id": "02-create-cli", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Share Assets", + "path": "/core-tutorial/03-share-assets", + "id": "03-share-assets", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Build Affected Projects", + "path": "/core-tutorial/04-build-affected-projects", + "id": "04-build-affected-projects", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Automatically Detect Dependencies", + "path": "/core-tutorial/05-auto-detect-dependencies", + "id": "05-auto-detect-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "6 - Summary", + "path": "/core-tutorial/06-summary", + "id": "06-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React Monorepo Tutorial", + "path": "/react-tutorial", + "id": "react-tutorial", + "isExternal": false, + "children": [ + { + "name": "1 - Code Generation", + "path": "/react-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/react-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/react-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Workspace Optimization", + "path": "/react-tutorial/4-workspace-optimization", + "id": "4-workspace-optimization", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/react-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "1 - Code Generation", + "path": "/react-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/react-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/react-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Workspace Optimization", + "path": "/react-tutorial/4-workspace-optimization", + "id": "4-workspace-optimization", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/react-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React Standalone Tutorial", + "path": "/react-standalone-tutorial", + "id": "react-standalone-tutorial", + "isExternal": false, + "children": [ + { + "name": "1 - Code Generation", + "path": "/react-standalone-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/react-standalone-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/react-standalone-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Task Pipelines", + "path": "/react-standalone-tutorial/4-task-pipelines", + "id": "4-task-pipelines", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/react-standalone-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "1 - Code Generation", + "path": "/react-standalone-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/react-standalone-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/react-standalone-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Task Pipelines", + "path": "/react-standalone-tutorial/4-task-pipelines", + "id": "4-task-pipelines", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/react-standalone-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular Monorepo Tutorial", + "path": "/angular-tutorial", + "id": "angular-tutorial", + "isExternal": false, + "children": [ + { + "name": "1 - Code Generation", + "path": "/angular-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/angular-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/angular-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Workspace Optimization", + "path": "/angular-tutorial/4-workspace-optimization", + "id": "4-workspace-optimization", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/angular-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "1 - Code Generation", + "path": "/angular-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/angular-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/angular-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Workspace Optimization", + "path": "/angular-tutorial/4-workspace-optimization", + "id": "4-workspace-optimization", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/angular-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular Standalone Tutorial", + "path": "/angular-standalone-tutorial", + "id": "angular-standalone-tutorial", + "isExternal": false, + "children": [ + { + "name": "1 - Code Generation", + "path": "/angular-standalone-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/angular-standalone-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/angular-standalone-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Task Pipelines", + "path": "/angular-standalone-tutorial/4-task-pipelines", + "id": "4-task-pipelines", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/angular-standalone-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "1 - Code Generation", + "path": "/angular-standalone-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/angular-standalone-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/angular-standalone-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Task Pipelines", + "path": "/angular-standalone-tutorial/4-task-pipelines", + "id": "4-task-pipelines", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/angular-standalone-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Node Tutorial", + "path": "/node-tutorial", + "id": "node-tutorial", + "isExternal": false, + "children": [ + { + "name": "1 - Code Generation", + "path": "/node-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/node-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/node-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Workspace Optimization", + "path": "/node-tutorial/4-workspace-optimization", + "id": "4-workspace-optimization", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/node-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "1 - Code Generation", + "path": "/node-tutorial/1-code-generation", + "id": "1-code-generation", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "2 - Project Graph", + "path": "/node-tutorial/2-project-graph", + "id": "2-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "3 - Task Running", + "path": "/node-tutorial/3-task-running", + "id": "3-task-running", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "4 - Workspace Optimization", + "path": "/node-tutorial/4-workspace-optimization", + "id": "4-workspace-optimization", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "5 - Summary", + "path": "/node-tutorial/5-summary", + "id": "5-summary", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Core Features", + "path": "/core-features", + "id": "core-features", + "isExternal": false, + "children": [ + { + "name": "Run Tasks", + "path": "/core-features/run-tasks", + "id": "run-tasks", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Cache Task Results", + "path": "/core-features/cache-task-results", + "id": "cache-task-results", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Share Your Cache", + "path": "/core-features/share-your-cache", + "id": "share-your-cache", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Explore the Graph", + "path": "/core-features/explore-graph", + "id": "explore-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Distribute Task Execution", + "path": "/core-features/distribute-task-execution", + "id": "distribute-task-execution", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Integrate with Editors", + "path": "/core-features/integrate-with-editors", + "id": "integrate-with-editors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Automate Updating Dependencies", + "path": "/core-features/automate-updating-dependencies", + "id": "automate-updating-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Enforce Project Boundaries", + "path": "/core-features/enforce-project-boundaries", + "id": "enforce-project-boundaries", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Run Tasks", + "path": "/core-features/run-tasks", + "id": "run-tasks", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Cache Task Results", + "path": "/core-features/cache-task-results", + "id": "cache-task-results", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Share Your Cache", + "path": "/core-features/share-your-cache", + "id": "share-your-cache", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Explore the Graph", + "path": "/core-features/explore-graph", + "id": "explore-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Distribute Task Execution", + "path": "/core-features/distribute-task-execution", + "id": "distribute-task-execution", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Integrate with Editors", + "path": "/core-features/integrate-with-editors", + "id": "integrate-with-editors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Automate Updating Dependencies", + "path": "/core-features/automate-updating-dependencies", + "id": "automate-updating-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Enforce Project Boundaries", + "path": "/core-features/enforce-project-boundaries", + "id": "enforce-project-boundaries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Plugin Features", + "path": "/plugin-features", + "id": "plugin-features", + "isExternal": false, + "children": [ + { + "name": "Use Task Executors", + "path": "/plugin-features/use-task-executors", + "id": "use-task-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Use Code Generators", + "path": "/plugin-features/use-code-generators", + "id": "use-code-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Create Your Own Plugin", + "path": "/plugin-features/create-your-own-plugin", + "id": "create-your-own-plugin", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Use Task Executors", + "path": "/plugin-features/use-task-executors", + "id": "use-task-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Use Code Generators", + "path": "/plugin-features/use-code-generators", + "id": "use-code-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Create Your Own Plugin", + "path": "/plugin-features/create-your-own-plugin", + "id": "create-your-own-plugin", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Concepts", + "path": "/concepts", + "id": "concepts", + "isExternal": false, + "children": [ + { + "name": "Integrated Repos vs. Package-Based Repos", + "path": "/concepts/integrated-vs-package-based", + "id": "integrated-vs-package-based", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Mental Model", + "path": "/concepts/mental-model", + "id": "mental-model", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "How Caching Works", + "path": "/concepts/how-caching-works", + "id": "how-caching-works", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Improve Worst Case CI Times", + "path": "/concepts/dte", + "id": "dte", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Task Pipeline Configuration", + "path": "/concepts/task-pipeline-configuration", + "id": "task-pipeline-configuration", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Affected", + "path": "/concepts/affected", + "id": "affected", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "More Concept Guides »", + "path": "/concepts/more-concept-guides", + "id": "more-concept-guides", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Integrated Repos vs. Package-Based Repos", + "path": "/concepts/integrated-vs-package-based", + "id": "integrated-vs-package-based", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Mental Model", + "path": "/concepts/mental-model", + "id": "mental-model", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "How Caching Works", + "path": "/concepts/how-caching-works", + "id": "how-caching-works", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Improve Worst Case CI Times", + "path": "/concepts/dte", + "id": "dte", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Task Pipeline Configuration", + "path": "/concepts/task-pipeline-configuration", + "id": "task-pipeline-configuration", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Affected", + "path": "/concepts/affected", + "id": "affected", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "More Concept Guides »", + "path": "/concepts/more-concept-guides", + "id": "more-concept-guides", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "More Concepts", + "path": "/more-concepts", + "id": "more-concepts", + "isExternal": false, + "children": [ + { + "name": "Customizing Inputs", + "path": "/more-concepts/customizing-inputs", + "id": "customizing-inputs", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Incremental Builds", + "path": "/more-concepts/incremental-builds", + "id": "incremental-builds", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Illustrated Distributed Task Execution", + "path": "/more-concepts/illustrated-dte", + "id": "illustrated-dte", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx and Turborepo", + "path": "/more-concepts/turbo-and-nx", + "id": "turbo-and-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Monorepos", + "path": "/more-concepts/why-monorepos", + "id": "why-monorepos", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Nx at Enterprises", + "path": "/more-concepts/monorepo-nx-enterprise", + "id": "monorepo-nx-enterprise", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Daemon", + "path": "/more-concepts/nx-daemon", + "id": "nx-daemon", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx and the Angular CLI", + "path": "/more-concepts/nx-and-angular", + "id": "nx-and-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Folder Structure", + "path": "/more-concepts/folder-structure", + "id": "folder-structure", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Devkit and Angular Devkit", + "path": "/more-concepts/nx-devkit-angular-devkit", + "id": "nx-devkit-angular-devkit", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Micro Frontend Architecture", + "path": "/more-concepts/micro-frontend-architecture", + "id": "micro-frontend-architecture", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Applications and Libraries", + "path": "/more-concepts/applications-and-libraries", + "id": "applications-and-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Creating Libraries", + "path": "/more-concepts/creating-libraries", + "id": "creating-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Library Types", + "path": "/more-concepts/library-types", + "id": "library-types", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Grouping Libraries", + "path": "/more-concepts/grouping-libraries", + "id": "grouping-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Buildable and Publishable Libraries", + "path": "/more-concepts/buildable-and-publishable-libraries", + "id": "buildable-and-publishable-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "How the Project Graph is Built", + "path": "/more-concepts/how-project-graph-is-built", + "id": "how-project-graph-is-built", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Customizing Inputs", + "path": "/more-concepts/customizing-inputs", + "id": "customizing-inputs", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Incremental Builds", + "path": "/more-concepts/incremental-builds", + "id": "incremental-builds", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Illustrated Distributed Task Execution", + "path": "/more-concepts/illustrated-dte", + "id": "illustrated-dte", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx and Turborepo", + "path": "/more-concepts/turbo-and-nx", + "id": "turbo-and-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Monorepos", + "path": "/more-concepts/why-monorepos", + "id": "why-monorepos", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Nx at Enterprises", + "path": "/more-concepts/monorepo-nx-enterprise", + "id": "monorepo-nx-enterprise", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Daemon", + "path": "/more-concepts/nx-daemon", + "id": "nx-daemon", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx and the Angular CLI", + "path": "/more-concepts/nx-and-angular", + "id": "nx-and-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Folder Structure", + "path": "/more-concepts/folder-structure", + "id": "folder-structure", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Devkit and Angular Devkit", + "path": "/more-concepts/nx-devkit-angular-devkit", + "id": "nx-devkit-angular-devkit", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Micro Frontend Architecture", + "path": "/more-concepts/micro-frontend-architecture", + "id": "micro-frontend-architecture", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Applications and Libraries", + "path": "/more-concepts/applications-and-libraries", + "id": "applications-and-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Creating Libraries", + "path": "/more-concepts/creating-libraries", + "id": "creating-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Library Types", + "path": "/more-concepts/library-types", + "id": "library-types", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Grouping Libraries", + "path": "/more-concepts/grouping-libraries", + "id": "grouping-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Buildable and Publishable Libraries", + "path": "/more-concepts/buildable-and-publishable-libraries", + "id": "buildable-and-publishable-libraries", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "How the Project Graph is Built", + "path": "/more-concepts/how-project-graph-is-built", + "id": "how-project-graph-is-built", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "All Recipes »", + "path": "/recipes", + "id": "all", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "CI Setup", + "path": "/recipes/ci/ci-setup", + "id": "ci-setup", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Adopting Nx", + "path": "/recipes/adopting-nx", + "id": "adopting-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Reference", + "path": "/reference", + "id": "reference", + "isExternal": false, + "children": [ + { + "name": "Commands", + "path": "/reference/commands", + "id": "commands", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json", + "path": "/reference/nx-json", + "id": "nx-json", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Project Configuration", + "path": "/reference/project-configuration", + "id": "project-configuration", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": ".nxignore", + "path": "/reference/nxignore", + "id": "nxignore", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Environment Variables", + "path": "/reference/environment-variables", + "id": "environment-variables", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Packages", + "path": "/packages", + "id": "packages", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Devkit", + "path": "/packages#devkit", + "id": "packages-devkit", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "Glossary", + "path": "/reference/glossary", + "id": "glossary", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Commands", + "path": "/reference/commands", + "id": "commands", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json", + "path": "/reference/nx-json", + "id": "nx-json", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Project Configuration", + "path": "/reference/project-configuration", + "id": "project-configuration", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": ".nxignore", + "path": "/reference/nxignore", + "id": "nxignore", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Environment Variables", + "path": "/reference/environment-variables", + "id": "environment-variables", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Packages", + "path": "/packages", + "id": "packages", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Devkit", + "path": "/packages#devkit", + "id": "packages-devkit", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "Glossary", + "path": "/reference/glossary", + "id": "glossary", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Deprecated", + "path": "/deprecated", + "id": "deprecated", + "isExternal": false, + "children": [ + { + "name": "workspace.json", + "path": "/deprecated/workspace-json", + "id": "workspace-json", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Workspace Generators", + "path": "/deprecated/workspace-generators", + "id": "workspace-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Workspace Executors", + "path": "/deprecated/workspace-executors", + "id": "workspace-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "defaultCollection", + "path": "/deprecated/default-collection", + "id": "default-collection", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "runtimeCacheInputs", + "path": "/deprecated/runtime-cache-inputs", + "id": "runtime-cache-inputs", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "globalImplicitDependencies", + "path": "/deprecated/global-implicit-dependencies", + "id": "global-implicit-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "workspace.json", + "path": "/deprecated/workspace-json", + "id": "workspace-json", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Workspace Generators", + "path": "/deprecated/workspace-generators", + "id": "workspace-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Workspace Executors", + "path": "/deprecated/workspace-executors", + "id": "workspace-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "defaultCollection", + "path": "/deprecated/default-collection", + "id": "default-collection", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "runtimeCacheInputs", + "path": "/deprecated/runtime-cache-inputs", + "id": "runtime-cache-inputs", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "globalImplicitDependencies", + "path": "/deprecated/global-implicit-dependencies", + "id": "global-implicit-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "See Also", + "path": "/see-also", + "id": "see-also", + "isExternal": false, + "children": [ + { + "name": "Nx Cloud Documentation", + "path": "/nx-cloud/intro/what-is-nx-cloud", + "id": "nx-cloud-documentation", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Cloud Main Site", + "path": "https://nx.app", + "id": "nx-cloud-main-site", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "--skip-nx-cache flag", + "path": "/nx/affected#skip-nx-cache", + "id": "skip-nx-cache-flag", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "tasks-runner-options property", + "path": "/reference/nx-json#tasks-runner-options", + "id": "tasks-runner-options-property", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json reference: inputs and namedInputs", + "path": "/reference/nx-json#inputs-&-namedinputs", + "id": "nxjson-inputs", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "Project Configuration reference: inputs and namedInputs", + "path": "/reference/project-configuration#inputs-&-namedinputs", + "id": "project-config-inputs", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json workspaceLayout property", + "path": "/reference/nx-json#workspace-layout", + "id": "nxjson-workspaceLayout", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json generator defaults", + "path": "/reference/nx-json#generators", + "id": "nxjson-generator-defaults", + "isExternal": true, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Nx Cloud Documentation", + "path": "/nx-cloud/intro/what-is-nx-cloud", + "id": "nx-cloud-documentation", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "--skip-nx-cache flag", + "path": "/nx/affected#skip-nx-cache", + "id": "skip-nx-cache-flag", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "tasks-runner-options property", + "path": "/reference/nx-json#tasks-runner-options", + "id": "tasks-runner-options-property", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json reference: inputs and namedInputs", + "path": "/reference/nx-json#inputs-&-namedinputs", + "id": "nxjson-inputs", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "Project Configuration reference: inputs and namedInputs", + "path": "/reference/project-configuration#inputs-&-namedinputs", + "id": "project-config-inputs", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json workspaceLayout property", + "path": "/reference/nx-json#workspace-layout", + "id": "nxjson-workspaceLayout", + "isExternal": true, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx.json generator defaults", + "path": "/reference/nx-json#generators", + "id": "nxjson-generator-defaults", + "isExternal": true, + "children": [], + "disableCollapsible": false + } + ] + }, + { + "id": "recipes", + "menu": [ + { + "name": "Getting Started", + "path": "/recipes/getting-started", + "id": "getting-started", + "isExternal": false, + "children": [ + { + "name": "Set up a new workspace", + "path": "/recipes/getting-started/set-up-a-new-workspace", + "id": "set-up-a-new-workspace", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Set up a new workspace", + "path": "/recipes/getting-started/set-up-a-new-workspace", + "id": "set-up-a-new-workspace", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console", + "path": "/recipes/nx-console", + "id": "nx-console", + "isExternal": false, + "children": [ + { + "name": "Nx Console Generate Command", + "path": "/recipes/nx-console/console-generate-command", + "id": "console-generate-command", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Run Command", + "path": "/recipes/nx-console/console-run-command", + "id": "console-run-command", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Add Dependency Command", + "path": "/recipes/nx-console/console-add-dependency-command", + "id": "console-add-dependency-command", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Project Pane", + "path": "/recipes/nx-console/console-project-pane", + "id": "console-project-pane", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Keyboard Shortcuts", + "path": "/recipes/nx-console/console-shortcuts", + "id": "console-shortcuts", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Nx Console Generate Command", + "path": "/recipes/nx-console/console-generate-command", + "id": "console-generate-command", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Run Command", + "path": "/recipes/nx-console/console-run-command", + "id": "console-run-command", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Add Dependency Command", + "path": "/recipes/nx-console/console-add-dependency-command", + "id": "console-add-dependency-command", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Project Pane", + "path": "/recipes/nx-console/console-project-pane", + "id": "console-project-pane", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Console Keyboard Shortcuts", + "path": "/recipes/nx-console/console-shortcuts", + "id": "console-shortcuts", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "CI", + "path": "/recipes/ci", + "id": "ci", + "isExternal": false, + "children": [ + { + "name": "CI Setup", + "path": "/recipes/ci/ci-setup", + "id": "ci-setup", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Prepare applications for deployment via CI", + "path": "/recipes/ci/ci-deployment", + "id": "ci-deployment", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up Azure Pipelines", + "path": "/recipes/ci/monorepo-ci-azure", + "id": "monorepo-ci-azure", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up CircleCI", + "path": "/recipes/ci/monorepo-ci-circle-ci", + "id": "monorepo-ci-circle-ci", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up GitHub Actions", + "path": "/recipes/ci/monorepo-ci-github-actions", + "id": "monorepo-ci-github-actions", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up Jenkins", + "path": "/recipes/ci/monorepo-ci-jenkins", + "id": "monorepo-ci-jenkins", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up GitLab", + "path": "/recipes/ci/monorepo-ci-gitlab", + "id": "monorepo-ci-gitlab", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up Bitbucket", + "path": "/recipes/ci/monorepo-ci-bitbucket-pipelines", + "id": "monorepo-ci-bitbucket-pipelines", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "CI Setup", + "path": "/recipes/ci/ci-setup", + "id": "ci-setup", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Prepare applications for deployment via CI", + "path": "/recipes/ci/ci-deployment", + "id": "ci-deployment", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up Azure Pipelines", + "path": "/recipes/ci/monorepo-ci-azure", + "id": "monorepo-ci-azure", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up CircleCI", + "path": "/recipes/ci/monorepo-ci-circle-ci", + "id": "monorepo-ci-circle-ci", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up GitHub Actions", + "path": "/recipes/ci/monorepo-ci-github-actions", + "id": "monorepo-ci-github-actions", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up Jenkins", + "path": "/recipes/ci/monorepo-ci-jenkins", + "id": "monorepo-ci-jenkins", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up GitLab", + "path": "/recipes/ci/monorepo-ci-gitlab", + "id": "monorepo-ci-gitlab", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up Bitbucket", + "path": "/recipes/ci/monorepo-ci-bitbucket-pipelines", + "id": "monorepo-ci-bitbucket-pipelines", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Adopting Nx", + "path": "/recipes/adopting-nx", + "id": "adopting-nx", + "isExternal": false, + "children": [ + { + "name": "NPM/Yarn/PNPM workspaces", + "path": "/recipes/adopting-nx/adding-to-monorepo", + "id": "adding-to-monorepo", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Add to any Project", + "path": "/recipes/adopting-nx/adding-to-existing-project", + "id": "adding-to-existing-project", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "From CRA", + "path": "/recipes/adopting-nx/migration-cra", + "id": "migration-cra", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "From Angular CLI", + "path": "/recipes/adopting-nx/migration-angular", + "id": "migration-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx and Lerna", + "path": "/recipes/adopting-nx/lerna-and-nx", + "id": "lerna-and-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "From AngularJS", + "path": "/recipes/adopting-nx/migration-angularjs", + "id": "migration-angularjs", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Preserving Git Histories", + "path": "/recipes/adopting-nx/preserving-git-histories", + "id": "preserving-git-histories", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Manual migration", + "path": "/recipes/adopting-nx/manual", + "id": "manual", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "NPM/Yarn/PNPM workspaces", + "path": "/recipes/adopting-nx/adding-to-monorepo", + "id": "adding-to-monorepo", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Add to any Project", + "path": "/recipes/adopting-nx/adding-to-existing-project", + "id": "adding-to-existing-project", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "From CRA", + "path": "/recipes/adopting-nx/migration-cra", + "id": "migration-cra", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "From Angular CLI", + "path": "/recipes/adopting-nx/migration-angular", + "id": "migration-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx and Lerna", + "path": "/recipes/adopting-nx/lerna-and-nx", + "id": "lerna-and-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "From AngularJS", + "path": "/recipes/adopting-nx/migration-angularjs", + "id": "migration-angularjs", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Preserving Git Histories", + "path": "/recipes/adopting-nx/preserving-git-histories", + "id": "preserving-git-histories", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Manual migration", + "path": "/recipes/adopting-nx/manual", + "id": "manual", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Executors", + "path": "/recipes/executors", + "id": "executors", + "isExternal": false, + "children": [ + { + "name": "Use Executor Configurations", + "path": "/recipes/executors/use-executor-configurations", + "id": "use-executor-configurations", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Running Custom Commands", + "path": "/recipes/executors/run-commands-executor", + "id": "run-commands-executor", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Local Executors", + "path": "/recipes/executors/creating-custom-executors", + "id": "creating-custom-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Compose Executors", + "path": "/recipes/executors/compose-executors", + "id": "compose-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Use Executor Configurations", + "path": "/recipes/executors/use-executor-configurations", + "id": "use-executor-configurations", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Running Custom Commands", + "path": "/recipes/executors/run-commands-executor", + "id": "run-commands-executor", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Local Executors", + "path": "/recipes/executors/creating-custom-executors", + "id": "creating-custom-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Compose Executors", + "path": "/recipes/executors/compose-executors", + "id": "compose-executors", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Generators", + "path": "/recipes/generators", + "id": "generators", + "isExternal": false, + "children": [ + { + "name": "Local Generators", + "path": "/recipes/generators/local-generators", + "id": "local-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Composing Generators", + "path": "/recipes/generators/composing-generators", + "id": "composing-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Generator Options", + "path": "/recipes/generators/generator-options", + "id": "generator-options", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Creating Files", + "path": "/recipes/generators/creating-files", + "id": "creating-files", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Modifying Files", + "path": "/recipes/generators/modifying-files", + "id": "modifying-files", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Local Generators", + "path": "/recipes/generators/local-generators", + "id": "local-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Composing Generators", + "path": "/recipes/generators/composing-generators", + "id": "composing-generators", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Generator Options", + "path": "/recipes/generators/generator-options", + "id": "generator-options", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Creating Files", + "path": "/recipes/generators/creating-files", + "id": "creating-files", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Modifying Files", + "path": "/recipes/generators/modifying-files", + "id": "modifying-files", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Advanced Plugins", + "path": "/recipes/advanced-plugins", + "id": "advanced-plugins", + "isExternal": false, + "children": [ + { + "name": "Project Inference Plugins", + "path": "/recipes/advanced-plugins/project-inference-plugins", + "id": "project-inference-plugins", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Project Graph Plugins", + "path": "/recipes/advanced-plugins/project-graph-plugins", + "id": "project-graph-plugins", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Project Inference Plugins", + "path": "/recipes/advanced-plugins/project-inference-plugins", + "id": "project-inference-plugins", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Project Graph Plugins", + "path": "/recipes/advanced-plugins/project-graph-plugins", + "id": "project-graph-plugins", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Environment Variables", + "path": "/recipes/environment-variables", + "id": "environment-variables", + "isExternal": false, + "children": [ + { + "name": "Define Environment Variables", + "path": "/recipes/environment-variables/define-environment-variables", + "id": "define-environment-variables", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Use Environment Variables in React", + "path": "/recipes/environment-variables/use-environment-variables-in-react", + "id": "use-environment-variables-in-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Use Environment Variables in Angular", + "path": "/recipes/environment-variables/use-environment-variables-in-angular", + "id": "use-environment-variables-in-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Define Environment Variables", + "path": "/recipes/environment-variables/define-environment-variables", + "id": "define-environment-variables", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Use Environment Variables in React", + "path": "/recipes/environment-variables/use-environment-variables-in-react", + "id": "use-environment-variables-in-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Use Environment Variables in Angular", + "path": "/recipes/environment-variables/use-environment-variables-in-angular", + "id": "use-environment-variables-in-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Module Federation and Micro Frontends", + "path": "/recipes/module-federation", + "id": "module-federation", + "isExternal": false, + "children": [ + { + "name": "Faster Builds with Module Federation", + "path": "/recipes/module-federation/faster-builds", + "id": "faster-builds", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setup Module Federation with SSR for Angular and React", + "path": "/recipes/module-federation/module-federation-with-ssr", + "id": "module-federation-with-ssr", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Advanced Micro Frontends with Angular using Dynamic Federation", + "path": "/recipes/module-federation/dynamic-module-federation-with-angular", + "id": "dynamic-module-federation-with-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Micro-Frontend Example", + "path": "/recipes/module-federation/nx-examples", + "id": "nx-examples", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Faster Builds with Module Federation", + "path": "/recipes/module-federation/faster-builds", + "id": "faster-builds", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setup Module Federation with SSR for Angular and React", + "path": "/recipes/module-federation/module-federation-with-ssr", + "id": "module-federation-with-ssr", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Advanced Micro Frontends with Angular using Dynamic Federation", + "path": "/recipes/module-federation/dynamic-module-federation-with-angular", + "id": "dynamic-module-federation-with-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx Micro-Frontend Example", + "path": "/recipes/module-federation/nx-examples", + "id": "nx-examples", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Storybook", + "path": "/recipes/storybook", + "id": "storybook", + "isExternal": false, + "children": [ + { + "name": "Publishing Storybook: One main Storybook instance for all projects", + "path": "/recipes/storybook/one-storybook-for-all", + "id": "one-storybook-for-all", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Publishing Storybook: One Storybook instance per scope", + "path": "/recipes/storybook/one-storybook-per-scope", + "id": "one-storybook-per-scope", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Publishing Storybook: One main Storybook instance using Storybook Composition", + "path": "/recipes/storybook/one-storybook-with-composition", + "id": "one-storybook-with-composition", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Publishing Storybook: One main Storybook instance for all projects", + "path": "/recipes/storybook/one-storybook-for-all", + "id": "one-storybook-for-all", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Publishing Storybook: One Storybook instance per scope", + "path": "/recipes/storybook/one-storybook-per-scope", + "id": "one-storybook-per-scope", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Publishing Storybook: One main Storybook instance using Storybook Composition", + "path": "/recipes/storybook/one-storybook-with-composition", + "id": "one-storybook-with-composition", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Other", + "path": "/recipes/other", + "id": "other", + "isExternal": false, + "children": [ + { + "name": "Run Root-Level NPM Scripts with Nx", + "path": "/recipes/other/root-level-scripts", + "id": "root-level-scripts", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Disable Graph Links Created from Analyzing Source Files", + "path": "/recipes/other/analyze-source-files", + "id": "analyze-source-files", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Advanced Update Nx", + "path": "/recipes/other/advanced-update", + "id": "advanced-update", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "JavaScript and TypeScript", + "path": "/recipes/other/js-and-ts", + "id": "js-and-ts", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React Native with Nx", + "path": "/recipes/other/react-native", + "id": "react-native", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Adding Images, Fonts, and Files", + "path": "/recipes/other/adding-assets-react", + "id": "adding-assets-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setup incremental builds for Angular applications", + "path": "/recipes/other/setup-incremental-builds-angular", + "id": "setup-incremental-builds-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Profiling Build Performance", + "path": "/recipes/other/performance-profiling", + "id": "performance-profiling", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using ESLint in Nx Workspaces", + "path": "/recipes/other/eslint", + "id": "eslint", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Configuring Browser Support", + "path": "/recipes/other/browser-support", + "id": "browser-support", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Deploying Next.js applications to Vercel", + "path": "/recipes/other/deploy-nextjs-to-vercel", + "id": "deploy-nextjs-to-vercel", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Webpack 5 Migration", + "path": "/recipes/other/webpack-5", + "id": "webpack-5", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Tailwind CSS in React", + "path": "/recipes/other/using-tailwind-css-in-react", + "id": "using-tailwind-css-in-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React 18 Migration", + "path": "/recipes/other/react-18", + "id": "react-18", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Tailwind CSS with Angular projects", + "path": "/recipes/other/using-tailwind-css-with-angular-projects", + "id": "using-tailwind-css-with-angular-projects", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using NgRx", + "path": "/recipes/other/misc-ngrx", + "id": "misc-ngrx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Data Persistence operators", + "path": "/recipes/other/misc-data-persistence", + "id": "misc-data-persistence", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Customizing Webpack Config", + "path": "/recipes/other/customize-webpack", + "id": "customize-webpack", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Powering Up React Development With Nx", + "path": "/recipes/other/react-nx", + "id": "react-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Apollo GraphQL", + "path": "/recipes/other/apollo-react", + "id": "apollo-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Large Repo and Caching", + "path": "/recipes/other/caching", + "id": "caching", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Large Repo and DTE", + "path": "/recipes/other/dte", + "id": "dte", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Troubleshoot Cache Misses", + "path": "/recipes/other/troubleshoot-cache-misses", + "id": "troubleshoot-cache-misses", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Ban Dependencies with Certain Tags", + "path": "/recipes/other/ban-dependencies-with-tags", + "id": "ban-dependencies-with-tags", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Tag in Multiple Dimensions", + "path": "/recipes/other/tag-multiple-dimensions", + "id": "tag-multiple-dimensions", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Ban External Imports", + "path": "/recipes/other/ban-external-imports", + "id": "ban-external-imports", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Tags Allow List", + "path": "/recipes/other/tags-allow-list", + "id": "tags-allow-list", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Export Project Graph", + "path": "/recipes/other/export-project-graph", + "id": "export-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Resolve Circular Dependencies", + "path": "/recipes/other/resolve-circular-dependencies", + "id": "resolve-circular-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Include All package.json Files as Projects", + "path": "/recipes/other/include-all-packagejson", + "id": "include-all-packagejson", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Run Root-Level NPM Scripts with Nx", + "path": "/recipes/other/root-level-scripts", + "id": "root-level-scripts", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Disable Graph Links Created from Analyzing Source Files", + "path": "/recipes/other/analyze-source-files", + "id": "analyze-source-files", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Advanced Update Nx", + "path": "/recipes/other/advanced-update", + "id": "advanced-update", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "JavaScript and TypeScript", + "path": "/recipes/other/js-and-ts", + "id": "js-and-ts", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React Native with Nx", + "path": "/recipes/other/react-native", + "id": "react-native", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Adding Images, Fonts, and Files", + "path": "/recipes/other/adding-assets-react", + "id": "adding-assets-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setup incremental builds for Angular applications", + "path": "/recipes/other/setup-incremental-builds-angular", + "id": "setup-incremental-builds-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Profiling Build Performance", + "path": "/recipes/other/performance-profiling", + "id": "performance-profiling", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using ESLint in Nx Workspaces", + "path": "/recipes/other/eslint", + "id": "eslint", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Configuring Browser Support", + "path": "/recipes/other/browser-support", + "id": "browser-support", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Deploying Next.js applications to Vercel", + "path": "/recipes/other/deploy-nextjs-to-vercel", + "id": "deploy-nextjs-to-vercel", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Webpack 5 Migration", + "path": "/recipes/other/webpack-5", + "id": "webpack-5", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Tailwind CSS in React", + "path": "/recipes/other/using-tailwind-css-in-react", + "id": "using-tailwind-css-in-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React 18 Migration", + "path": "/recipes/other/react-18", + "id": "react-18", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Tailwind CSS with Angular projects", + "path": "/recipes/other/using-tailwind-css-with-angular-projects", + "id": "using-tailwind-css-with-angular-projects", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using NgRx", + "path": "/recipes/other/misc-ngrx", + "id": "misc-ngrx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Data Persistence operators", + "path": "/recipes/other/misc-data-persistence", + "id": "misc-data-persistence", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Customizing Webpack Config", + "path": "/recipes/other/customize-webpack", + "id": "customize-webpack", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Powering Up React Development With Nx", + "path": "/recipes/other/react-nx", + "id": "react-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Using Apollo GraphQL", + "path": "/recipes/other/apollo-react", + "id": "apollo-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Large Repo and Caching", + "path": "/recipes/other/caching", + "id": "caching", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Large Repo and DTE", + "path": "/recipes/other/dte", + "id": "dte", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Troubleshoot Cache Misses", + "path": "/recipes/other/troubleshoot-cache-misses", + "id": "troubleshoot-cache-misses", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Ban Dependencies with Certain Tags", + "path": "/recipes/other/ban-dependencies-with-tags", + "id": "ban-dependencies-with-tags", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Tag in Multiple Dimensions", + "path": "/recipes/other/tag-multiple-dimensions", + "id": "tag-multiple-dimensions", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Ban External Imports", + "path": "/recipes/other/ban-external-imports", + "id": "ban-external-imports", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Tags Allow List", + "path": "/recipes/other/tags-allow-list", + "id": "tags-allow-list", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Export Project Graph", + "path": "/recipes/other/export-project-graph", + "id": "export-project-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Resolve Circular Dependencies", + "path": "/recipes/other/resolve-circular-dependencies", + "id": "resolve-circular-dependencies", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Include All package.json Files as Projects", + "path": "/recipes/other/include-all-packagejson", + "id": "include-all-packagejson", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ] + }, + { + "id": "cloud", + "menu": [ + { + "name": "Intro", + "path": "/nx-cloud/intro", + "id": "intro", + "isExternal": false, + "children": [ + { + "name": "What is Nx Cloud?", + "path": "/nx-cloud/intro/what-is-nx-cloud", + "id": "what-is-nx-cloud", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "What is Nx Cloud?", + "path": "/nx-cloud/intro/what-is-nx-cloud", + "id": "what-is-nx-cloud", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Set Up", + "path": "/nx-cloud/set-up", + "id": "set-up", + "isExternal": false, + "children": [ + { + "name": "Record Non-Nx Commands", + "path": "/nx-cloud/set-up/record-commands", + "id": "record-commands", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Enable GitHub PR Integration", + "path": "/nx-cloud/set-up/github", + "id": "github", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Record Non-Nx Commands", + "path": "/nx-cloud/set-up/record-commands", + "id": "record-commands", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Enable GitHub PR Integration", + "path": "/nx-cloud/set-up/github", + "id": "github", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Account Management", + "path": "/nx-cloud/account", + "id": "account", + "isExternal": false, + "children": [ + { + "name": "Billing and Utilization", + "path": "/nx-cloud/account/billing", + "id": "billing", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Users", + "path": "/nx-cloud/account/users", + "id": "users", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with Google Identity", + "path": "/nx-cloud/account/google-auth", + "id": "google-auth", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Access Tokens", + "path": "/nx-cloud/account/access-tokens", + "id": "access-tokens", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Security Scenarios", + "path": "/nx-cloud/account/scenarios", + "id": "scenarios", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "End to End Encryption", + "path": "/nx-cloud/account/encryption", + "id": "encryption", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Billing and Utilization", + "path": "/nx-cloud/account/billing", + "id": "billing", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Users", + "path": "/nx-cloud/account/users", + "id": "users", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with Google Identity", + "path": "/nx-cloud/account/google-auth", + "id": "google-auth", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Access Tokens", + "path": "/nx-cloud/account/access-tokens", + "id": "access-tokens", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Security Scenarios", + "path": "/nx-cloud/account/scenarios", + "id": "scenarios", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "End to End Encryption", + "path": "/nx-cloud/account/encryption", + "id": "encryption", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "On Prem", + "path": "/nx-cloud/private-cloud", + "id": "private-cloud", + "isExternal": false, + "children": [ + { + "name": "Get Started", + "path": "/nx-cloud/private-cloud/get-started", + "id": "get-started", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Enable Github PR Integration", + "path": "/nx-cloud/private-cloud/github", + "id": "github", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with a Single Admin", + "path": "/nx-cloud/private-cloud/auth-single-admin", + "id": "auth-single-admin", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with GitHub", + "path": "/nx-cloud/private-cloud/auth-github", + "id": "auth-github", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with GitLab", + "path": "/nx-cloud/private-cloud/auth-gitlab", + "id": "auth-gitlab", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with BitBucket", + "path": "/nx-cloud/private-cloud/auth-bitbucket", + "id": "auth-bitbucket", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate via SAML", + "path": "/nx-cloud/private-cloud/auth-saml", + "id": "auth-saml", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Advanced Configuration", + "path": "/nx-cloud/private-cloud/advanced-config", + "id": "advanced-config", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Standalone", + "path": "/nx-cloud/private-cloud/standalone", + "id": "standalone", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Get Started", + "path": "/nx-cloud/private-cloud/get-started", + "id": "get-started", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Enable Github PR Integration", + "path": "/nx-cloud/private-cloud/github", + "id": "github", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with a Single Admin", + "path": "/nx-cloud/private-cloud/auth-single-admin", + "id": "auth-single-admin", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with GitHub", + "path": "/nx-cloud/private-cloud/auth-github", + "id": "auth-github", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with GitLab", + "path": "/nx-cloud/private-cloud/auth-gitlab", + "id": "auth-gitlab", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate with BitBucket", + "path": "/nx-cloud/private-cloud/auth-bitbucket", + "id": "auth-bitbucket", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Authenticate via SAML", + "path": "/nx-cloud/private-cloud/auth-saml", + "id": "auth-saml", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Advanced Configuration", + "path": "/nx-cloud/private-cloud/advanced-config", + "id": "advanced-config", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Standalone", + "path": "/nx-cloud/private-cloud/standalone", + "id": "standalone", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Reference", + "path": "/nx-cloud/reference", + "id": "reference", + "isExternal": false, + "children": [ + { + "name": "Configuration Options", + "path": "/nx-cloud/reference/config", + "id": "config", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx-cloud CLI", + "path": "/nx-cloud/reference/nx-cloud-cli", + "id": "nx-cloud-cli", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Environment Variables", + "path": "/nx-cloud/reference/env-vars", + "id": "env-vars", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Server API Reference", + "path": "/nx-cloud/reference/server-api", + "id": "server-api", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Release Notes", + "path": "/nx-cloud/reference/release-notes", + "id": "release-notes", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "disableCollapsible": false + }, + { + "name": "Configuration Options", + "path": "/nx-cloud/reference/config", + "id": "config", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "nx-cloud CLI", + "path": "/nx-cloud/reference/nx-cloud-cli", + "id": "nx-cloud-cli", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Environment Variables", + "path": "/nx-cloud/reference/env-vars", + "id": "env-vars", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Server API Reference", + "path": "/nx-cloud/reference/server-api", + "id": "server-api", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Release Notes", + "path": "/nx-cloud/reference/release-notes", + "id": "release-notes", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ] + }, + { + "id": "packages", + "menu": [ + { + "id": "add-nx-to-monorepo", + "path": "/packages/add-nx-to-monorepo", + "name": "add-nx-to-monorepo", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "angular", + "path": "/packages/angular", + "name": "angular", + "children": [ + { + "id": "documents", + "path": "/packages/angular/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/angular/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular and Nx Version Matrix", + "path": "/packages/angular/documents/angular-nx-version-matrix", + "id": "angular-nx-version-matrix", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/angular/executors", + "name": "executors", + "children": [ + { + "id": "delegate-build", + "path": "/packages/angular/executors/delegate-build", + "name": "delegate-build", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "ng-packagr-lite", + "path": "/packages/angular/executors/ng-packagr-lite", + "name": "ng-packagr-lite", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "package", + "path": "/packages/angular/executors/package", + "name": "package", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "file-server", + "path": "/packages/angular/executors/file-server", + "name": "file-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "webpack-browser", + "path": "/packages/angular/executors/webpack-browser", + "name": "webpack-browser", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "webpack-dev-server", + "path": "/packages/angular/executors/webpack-dev-server", + "name": "webpack-dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "webpack-server", + "path": "/packages/angular/executors/webpack-server", + "name": "webpack-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "module-federation-dev-server", + "path": "/packages/angular/executors/module-federation-dev-server", + "name": "module-federation-dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "module-federation-dev-ssr", + "path": "/packages/angular/executors/module-federation-dev-ssr", + "name": "module-federation-dev-ssr", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/angular/generators", + "name": "generators", + "children": [ + { + "id": "add-linting", + "path": "/packages/angular/generators/add-linting", + "name": "add-linting", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/angular/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component", + "path": "/packages/angular/generators/component", + "name": "component", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component-cypress-spec", + "path": "/packages/angular/generators/component-cypress-spec", + "name": "component-cypress-spec", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component-story", + "path": "/packages/angular/generators/component-story", + "name": "component-story", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component-test", + "path": "/packages/angular/generators/component-test", + "name": "component-test", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "convert-tslint-to-eslint", + "path": "/packages/angular/generators/convert-tslint-to-eslint", + "name": "convert-tslint-to-eslint", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "downgrade-module", + "path": "/packages/angular/generators/downgrade-module", + "name": "downgrade-module", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "init", + "path": "/packages/angular/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "karma", + "path": "/packages/angular/generators/karma", + "name": "karma", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "karma-project", + "path": "/packages/angular/generators/karma-project", + "name": "karma-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/angular/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library-secondary-entry-point", + "path": "/packages/angular/generators/library-secondary-entry-point", + "name": "library-secondary-entry-point", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "remote", + "path": "/packages/angular/generators/remote", + "name": "remote", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "move", + "path": "/packages/angular/generators/move", + "name": "move", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "convert-to-with-mf", + "path": "/packages/angular/generators/convert-to-with-mf", + "name": "convert-to-with-mf", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "host", + "path": "/packages/angular/generators/host", + "name": "host", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "ng-add", + "path": "/packages/angular/generators/ng-add", + "name": "ng-add", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "ngrx", + "path": "/packages/angular/generators/ngrx", + "name": "ngrx", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "scam-to-standalone", + "path": "/packages/angular/generators/scam-to-standalone", + "name": "scam-to-standalone", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "scam", + "path": "/packages/angular/generators/scam", + "name": "scam", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "scam-directive", + "path": "/packages/angular/generators/scam-directive", + "name": "scam-directive", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "scam-pipe", + "path": "/packages/angular/generators/scam-pipe", + "name": "scam-pipe", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "setup-mf", + "path": "/packages/angular/generators/setup-mf", + "name": "setup-mf", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "setup-ssr", + "path": "/packages/angular/generators/setup-ssr", + "name": "setup-ssr", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "setup-tailwind", + "path": "/packages/angular/generators/setup-tailwind", + "name": "setup-tailwind", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "stories", + "path": "/packages/angular/generators/stories", + "name": "stories", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "storybook-configuration", + "path": "/packages/angular/generators/storybook-configuration", + "name": "storybook-configuration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "cypress-component-configuration", + "path": "/packages/angular/generators/cypress-component-configuration", + "name": "cypress-component-configuration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "upgrade-module", + "path": "/packages/angular/generators/upgrade-module", + "name": "upgrade-module", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "web-worker", + "path": "/packages/angular/generators/web-worker", + "name": "web-worker", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "change-storybook-targets", + "path": "/packages/angular/generators/change-storybook-targets", + "name": "change-storybook-targets", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "cra-to-nx", + "path": "/packages/cra-to-nx", + "name": "cra-to-nx", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "create-nx-plugin", + "path": "/packages/create-nx-plugin", + "name": "create-nx-plugin", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "create-nx-workspace", + "path": "/packages/create-nx-workspace", + "name": "create-nx-workspace", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "cypress", + "path": "/packages/cypress", + "name": "cypress", + "children": [ + { + "id": "documents", + "path": "/packages/cypress/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/cypress/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Component Testing", + "path": "/packages/cypress/documents/cypress-component-testing", + "id": "cypress-component-testing", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "v11 Migration Guide", + "path": "/packages/cypress/documents/v11-migration-guide", + "id": "v11-migration-guide", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/cypress/executors", + "name": "executors", + "children": [ + { + "id": "cypress", + "path": "/packages/cypress/executors/cypress", + "name": "cypress", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/cypress/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/cypress/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "cypress-project", + "path": "/packages/cypress/generators/cypress-project", + "name": "cypress-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "cypress-component-project", + "path": "/packages/cypress/generators/cypress-component-project", + "name": "cypress-component-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "migrate-to-cypress-11", + "path": "/packages/cypress/generators/migrate-to-cypress-11", + "name": "migrate-to-cypress-11", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "detox", + "path": "/packages/detox", + "name": "detox", + "children": [ + { + "id": "documents", + "path": "/packages/detox/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/detox/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/detox/executors", + "name": "executors", + "children": [ + { + "id": "build", + "path": "/packages/detox/executors/build", + "name": "build", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "test", + "path": "/packages/detox/executors/test", + "name": "test", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/detox/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/detox/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/detox/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "devkit", + "path": "/packages/devkit", + "name": "devkit", + "children": [ + { + "id": "documents", + "path": "/packages/devkit/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/devkit/documents/index", + "id": "index", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Ng CLI Adapter", + "path": "/packages/devkit/documents/ngcli_adapter", + "id": "ngcli_adapter", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "esbuild", + "path": "/packages/esbuild", + "name": "esbuild", + "children": [ + { + "id": "documents", + "path": "/packages/esbuild/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/esbuild/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/esbuild/executors", + "name": "executors", + "children": [ + { + "id": "esbuild", + "path": "/packages/esbuild/executors/esbuild", + "name": "esbuild", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/esbuild/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/esbuild/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "esbuild-project", + "path": "/packages/esbuild/generators/esbuild-project", + "name": "esbuild-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "eslint-plugin-nx", + "path": "/packages/eslint-plugin-nx", + "name": "eslint-plugin-nx", + "children": [ + { + "id": "documents", + "path": "/packages/eslint-plugin-nx/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/eslint-plugin-nx/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "expo", + "path": "/packages/expo", + "name": "expo", + "children": [ + { + "id": "executors", + "path": "/packages/expo/executors", + "name": "executors", + "children": [ + { + "id": "update", + "path": "/packages/expo/executors/update", + "name": "update", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build", + "path": "/packages/expo/executors/build", + "name": "build", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build-list", + "path": "/packages/expo/executors/build-list", + "name": "build-list", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "download", + "path": "/packages/expo/executors/download", + "name": "download", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build-ios", + "path": "/packages/expo/executors/build-ios", + "name": "build-ios", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build-android", + "path": "/packages/expo/executors/build-android", + "name": "build-android", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build-web", + "path": "/packages/expo/executors/build-web", + "name": "build-web", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build-status", + "path": "/packages/expo/executors/build-status", + "name": "build-status", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "publish", + "path": "/packages/expo/executors/publish", + "name": "publish", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "publish-set", + "path": "/packages/expo/executors/publish-set", + "name": "publish-set", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "rollback", + "path": "/packages/expo/executors/rollback", + "name": "rollback", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "run", + "path": "/packages/expo/executors/run", + "name": "run", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "start", + "path": "/packages/expo/executors/start", + "name": "start", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "sync-deps", + "path": "/packages/expo/executors/sync-deps", + "name": "sync-deps", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "ensure-symlink", + "path": "/packages/expo/executors/ensure-symlink", + "name": "ensure-symlink", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "prebuild", + "path": "/packages/expo/executors/prebuild", + "name": "prebuild", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "install", + "path": "/packages/expo/executors/install", + "name": "install", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "export", + "path": "/packages/expo/executors/export", + "name": "export", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/expo/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/expo/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/expo/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/expo/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component", + "path": "/packages/expo/generators/component", + "name": "component", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "express", + "path": "/packages/express", + "name": "express", + "children": [ + { + "id": "documents", + "path": "/packages/express/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/express/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/express/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/express/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/express/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "jest", + "path": "/packages/jest", + "name": "jest", + "children": [ + { + "id": "documents", + "path": "/packages/jest/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/jest/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/jest/executors", + "name": "executors", + "children": [ + { + "id": "jest", + "path": "/packages/jest/executors/jest", + "name": "jest", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/jest/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/jest/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "jest-project", + "path": "/packages/jest/generators/jest-project", + "name": "jest-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "js", + "path": "/packages/js", + "name": "js", + "children": [ + { + "id": "documents", + "path": "/packages/js/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/js/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/js/executors", + "name": "executors", + "children": [ + { + "id": "tsc", + "path": "/packages/js/executors/tsc", + "name": "tsc", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "swc", + "path": "/packages/js/executors/swc", + "name": "swc", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "node", + "path": "/packages/js/executors/node", + "name": "node", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/js/generators", + "name": "generators", + "children": [ + { + "id": "library", + "path": "/packages/js/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "init", + "path": "/packages/js/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "convert-to-swc", + "path": "/packages/js/generators/convert-to-swc", + "name": "convert-to-swc", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "linter", + "path": "/packages/linter", + "name": "linter", + "children": [ + { + "id": "documents", + "path": "/packages/linter/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/linter/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "eslint-plugin-nx", + "path": "/packages/linter/documents/eslint-plugin-nx", + "id": "eslint-plugin-nx", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/linter/executors", + "name": "executors", + "children": [ + { + "id": "eslint", + "path": "/packages/linter/executors/eslint", + "name": "eslint", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/linter/generators", + "name": "generators", + "children": [ + { + "id": "workspace-rules-project", + "path": "/packages/linter/generators/workspace-rules-project", + "name": "workspace-rules-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "workspace-rule", + "path": "/packages/linter/generators/workspace-rule", + "name": "workspace-rule", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "make-angular-cli-faster", + "path": "/packages/make-angular-cli-faster", + "name": "make-angular-cli-faster", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "nest", + "path": "/packages/nest", + "name": "nest", + "children": [ + { + "id": "documents", + "path": "/packages/nest/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/nest/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/nest/generators", + "name": "generators", + "children": [ + { + "id": "application", + "path": "/packages/nest/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "convert-tslint-to-eslint", + "path": "/packages/nest/generators/convert-tslint-to-eslint", + "name": "convert-tslint-to-eslint", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "init", + "path": "/packages/nest/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/nest/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "class", + "path": "/packages/nest/generators/class", + "name": "class", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "controller", + "path": "/packages/nest/generators/controller", + "name": "controller", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "decorator", + "path": "/packages/nest/generators/decorator", + "name": "decorator", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "filter", + "path": "/packages/nest/generators/filter", + "name": "filter", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "gateway", + "path": "/packages/nest/generators/gateway", + "name": "gateway", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "guard", + "path": "/packages/nest/generators/guard", + "name": "guard", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "interceptor", + "path": "/packages/nest/generators/interceptor", + "name": "interceptor", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "interface", + "path": "/packages/nest/generators/interface", + "name": "interface", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "middleware", + "path": "/packages/nest/generators/middleware", + "name": "middleware", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "module", + "path": "/packages/nest/generators/module", + "name": "module", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "pipe", + "path": "/packages/nest/generators/pipe", + "name": "pipe", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "provider", + "path": "/packages/nest/generators/provider", + "name": "provider", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "resolver", + "path": "/packages/nest/generators/resolver", + "name": "resolver", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "resource", + "path": "/packages/nest/generators/resource", + "name": "resource", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "service", + "path": "/packages/nest/generators/service", + "name": "service", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "next", + "path": "/packages/next", + "name": "next", + "children": [ + { + "id": "documents", + "path": "/packages/next/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/next/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/next/executors", + "name": "executors", + "children": [ + { + "id": "build", + "path": "/packages/next/executors/build", + "name": "build", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "server", + "path": "/packages/next/executors/server", + "name": "server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "export", + "path": "/packages/next/executors/export", + "name": "export", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/next/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/next/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/next/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "page", + "path": "/packages/next/generators/page", + "name": "page", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component", + "path": "/packages/next/generators/component", + "name": "component", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/next/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "custom-server", + "path": "/packages/next/generators/custom-server", + "name": "custom-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "node", + "path": "/packages/node", + "name": "node", + "children": [ + { + "id": "documents", + "path": "/packages/node/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/node/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/node/executors", + "name": "executors", + "children": [ + { + "id": "webpack", + "path": "/packages/node/executors/webpack", + "name": "webpack", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "node", + "path": "/packages/node/executors/node", + "name": "node", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/node/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/node/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/node/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/node/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "nx", + "path": "/packages/nx", + "name": "nx", + "children": [ + { + "id": "documents", + "path": "/packages/nx/documents", + "name": "documents", + "children": [ + { + "name": "create-nx-workspace", + "path": "/packages/nx/documents/create-nx-workspace", + "id": "create-nx-workspace", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "init", + "path": "/packages/nx/documents/init", + "id": "init", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "generate", + "path": "/packages/nx/documents/generate", + "id": "generate", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "run", + "path": "/packages/nx/documents/run", + "id": "run", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "daemon", + "path": "/packages/nx/documents/daemon", + "id": "daemon", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "graph", + "path": "/packages/nx/documents/dep-graph", + "id": "dep-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "run-many", + "path": "/packages/nx/documents/run-many", + "id": "run-many", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "affected", + "path": "/packages/nx/documents/affected", + "id": "affected", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "affected:graph", + "path": "/packages/nx/documents/affected-dep-graph", + "id": "affected-dep-graph", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "affected:apps", + "path": "/packages/nx/documents/affected-apps", + "id": "affected-apps", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "affected:libs", + "path": "/packages/nx/documents/affected-libs", + "id": "affected-libs", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "print-affected", + "path": "/packages/nx/documents/print-affected", + "id": "print-affected", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "format:check", + "path": "/packages/nx/documents/format-check", + "id": "format-check", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "format:write", + "path": "/packages/nx/documents/format-write", + "id": "format-write", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "migrate", + "path": "/packages/nx/documents/migrate", + "id": "migrate", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "report", + "path": "/packages/nx/documents/report", + "id": "report", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "list", + "path": "/packages/nx/documents/list", + "id": "list", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "workspace-lint", + "path": "/packages/nx/documents/workspace-lint", + "id": "workspace-lint", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "workspace-generator", + "path": "/packages/nx/documents/workspace-generator", + "id": "workspace-generator", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "connect-to-nx-cloud", + "path": "/packages/nx/documents/connect-to-nx-cloud", + "id": "connect-to-nx-cloud", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "reset", + "path": "/packages/nx/documents/reset", + "id": "reset", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "repair", + "path": "/packages/nx/documents/repair", + "id": "repair", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "exec", + "path": "/packages/nx/documents/exec", + "id": "exec", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "watch", + "path": "/packages/nx/documents/watch", + "id": "watch", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/nx/executors", + "name": "executors", + "children": [ + { + "id": "noop", + "path": "/packages/nx/executors/noop", + "name": "noop", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "run-commands", + "path": "/packages/nx/executors/run-commands", + "name": "run-commands", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "run-script", + "path": "/packages/nx/executors/run-script", + "name": "run-script", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "nx-plugin", + "path": "/packages/nx-plugin", + "name": "nx-plugin", + "children": [ + { + "id": "documents", + "path": "/packages/nx-plugin/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/nx-plugin/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/nx-plugin/executors", + "name": "executors", + "children": [ + { + "id": "e2e", + "path": "/packages/nx-plugin/executors/e2e", + "name": "e2e", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/nx-plugin/generators", + "name": "generators", + "children": [ + { + "id": "plugin", + "path": "/packages/nx-plugin/generators/plugin", + "name": "plugin", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "e2e-project", + "path": "/packages/nx-plugin/generators/e2e-project", + "name": "e2e-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "migration", + "path": "/packages/nx-plugin/generators/migration", + "name": "migration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generator", + "path": "/packages/nx-plugin/generators/generator", + "name": "generator", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executor", + "path": "/packages/nx-plugin/generators/executor", + "name": "executor", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "plugin-lint-checks", + "path": "/packages/nx-plugin/generators/plugin-lint-checks", + "name": "plugin-lint-checks", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "react", + "path": "/packages/react", + "name": "react", + "children": [ + { + "id": "documents", + "path": "/packages/react/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/react/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/react/executors", + "name": "executors", + "children": [ + { + "id": "module-federation-dev-server", + "path": "/packages/react/executors/module-federation-dev-server", + "name": "module-federation-dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "module-federation-ssr-dev-server", + "path": "/packages/react/executors/module-federation-ssr-dev-server", + "name": "module-federation-ssr-dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/react/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/react/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/react/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/react/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component", + "path": "/packages/react/generators/component", + "name": "component", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "redux", + "path": "/packages/react/generators/redux", + "name": "redux", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "storybook-configuration", + "path": "/packages/react/generators/storybook-configuration", + "name": "storybook-configuration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component-story", + "path": "/packages/react/generators/component-story", + "name": "component-story", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "stories", + "path": "/packages/react/generators/stories", + "name": "stories", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component-cypress-spec", + "path": "/packages/react/generators/component-cypress-spec", + "name": "component-cypress-spec", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "hook", + "path": "/packages/react/generators/hook", + "name": "hook", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "host", + "path": "/packages/react/generators/host", + "name": "host", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "remote", + "path": "/packages/react/generators/remote", + "name": "remote", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "cypress-component-configuration", + "path": "/packages/react/generators/cypress-component-configuration", + "name": "cypress-component-configuration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component-test", + "path": "/packages/react/generators/component-test", + "name": "component-test", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "setup-tailwind", + "path": "/packages/react/generators/setup-tailwind", + "name": "setup-tailwind", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "setup-ssr", + "path": "/packages/react/generators/setup-ssr", + "name": "setup-ssr", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "react-native", + "path": "/packages/react-native", + "name": "react-native", + "children": [ + { + "id": "documents", + "path": "/packages/react-native/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/react-native/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/react-native/executors", + "name": "executors", + "children": [ + { + "id": "run-android", + "path": "/packages/react-native/executors/run-android", + "name": "run-android", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "run-ios", + "path": "/packages/react-native/executors/run-ios", + "name": "run-ios", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "bundle", + "path": "/packages/react-native/executors/bundle", + "name": "bundle", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build-android", + "path": "/packages/react-native/executors/build-android", + "name": "build-android", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "start", + "path": "/packages/react-native/executors/start", + "name": "start", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "sync-deps", + "path": "/packages/react-native/executors/sync-deps", + "name": "sync-deps", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "ensure-symlink", + "path": "/packages/react-native/executors/ensure-symlink", + "name": "ensure-symlink", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "storybook", + "path": "/packages/react-native/executors/storybook", + "name": "storybook", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/react-native/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/react-native/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/react-native/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/react-native/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component", + "path": "/packages/react-native/generators/component", + "name": "component", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "storybook-configuration", + "path": "/packages/react-native/generators/storybook-configuration", + "name": "storybook-configuration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "component-story", + "path": "/packages/react-native/generators/component-story", + "name": "component-story", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "stories", + "path": "/packages/react-native/generators/stories", + "name": "stories", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "upgrade-native", + "path": "/packages/react-native/generators/upgrade-native", + "name": "upgrade-native", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "rollup", + "path": "/packages/rollup", + "name": "rollup", + "children": [ + { + "id": "executors", + "path": "/packages/rollup/executors", + "name": "executors", + "children": [ + { + "id": "rollup", + "path": "/packages/rollup/executors/rollup", + "name": "rollup", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/rollup/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/rollup/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "rollup-project", + "path": "/packages/rollup/generators/rollup-project", + "name": "rollup-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "storybook", + "path": "/packages/storybook", + "name": "storybook", + "children": [ + { + "id": "documents", + "path": "/packages/storybook/documents", + "name": "documents", + "children": [ + { + "name": "Overview Generic", + "path": "/packages/storybook/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Set up Storybook for React Projects", + "path": "/packages/storybook/documents/overview-react", + "id": "overview-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Set up Storybook for Angular Projects", + "path": "/packages/storybook/documents/overview-angular", + "id": "overview-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Storybook best practices for making the most out of Nx", + "path": "/packages/storybook/documents/best-practices", + "id": "best-practices", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Setting up Storybook Composition with Nx", + "path": "/packages/storybook/documents/storybook-composition-setup", + "id": "storybook-composition-setup", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular: Set up Compodoc for Storybook on Nx", + "path": "/packages/storybook/documents/angular-storybook-compodoc", + "id": "angular-storybook-compodoc", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular: Information about the Storybook targets", + "path": "/packages/storybook/documents/angular-storybook-targets", + "id": "angular-storybook-targets", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular: Configuring styles and preprocessor options", + "path": "/packages/storybook/documents/angular-configuring-styles", + "id": "angular-configuring-styles", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular: The browserTarget", + "path": "/packages/storybook/documents/angular-browser-target", + "id": "angular-browser-target", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular: Storybook Webpack Migration", + "path": "/packages/storybook/documents/migrate-webpack-final-angular", + "id": "migrate-webpack-final-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Angular: Upgrading to Storybook 6", + "path": "/packages/storybook/documents/upgrade-storybook-v6-angular", + "id": "upgrade-storybook-v6-angular", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React: Migrate to the Nrwl React Storybook Preset", + "path": "/packages/storybook/documents/migrate-webpack-final-react", + "id": "migrate-webpack-final-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "React: Upgrading to Storybook 6", + "path": "/packages/storybook/documents/upgrade-storybook-v6-react", + "id": "upgrade-storybook-v6-react", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/storybook/executors", + "name": "executors", + "children": [ + { + "id": "storybook", + "path": "/packages/storybook/executors/storybook", + "name": "storybook", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build", + "path": "/packages/storybook/executors/build", + "name": "build", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/storybook/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/storybook/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "configuration", + "path": "/packages/storybook/generators/configuration", + "name": "configuration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "cypress-project", + "path": "/packages/storybook/generators/cypress-project", + "name": "cypress-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "change-storybook-targets", + "path": "/packages/storybook/generators/change-storybook-targets", + "name": "change-storybook-targets", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "tao", + "path": "/packages/tao", + "name": "tao", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "vite", + "path": "/packages/vite", + "name": "vite", + "children": [ + { + "id": "documents", + "path": "/packages/vite/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/vite/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/vite/executors", + "name": "executors", + "children": [ + { + "id": "dev-server", + "path": "/packages/vite/executors/dev-server", + "name": "dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "build", + "path": "/packages/vite/executors/build", + "name": "build", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "test", + "path": "/packages/vite/executors/test", + "name": "test", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/vite/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/vite/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "configuration", + "path": "/packages/vite/generators/configuration", + "name": "configuration", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "vitest", + "path": "/packages/vite/generators/vitest", + "name": "vitest", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "web", + "path": "/packages/web", + "name": "web", + "children": [ + { + "id": "documents", + "path": "/packages/web/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/web/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/web/executors", + "name": "executors", + "children": [ + { + "id": "webpack", + "path": "/packages/web/executors/webpack", + "name": "webpack", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "rollup", + "path": "/packages/web/executors/rollup", + "name": "rollup", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "dev-server", + "path": "/packages/web/executors/dev-server", + "name": "dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "file-server", + "path": "/packages/web/executors/file-server", + "name": "file-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/web/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/web/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "application", + "path": "/packages/web/generators/application", + "name": "application", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "webpack", + "path": "/packages/webpack", + "name": "webpack", + "children": [ + { + "id": "executors", + "path": "/packages/webpack/executors", + "name": "executors", + "children": [ + { + "id": "webpack", + "path": "/packages/webpack/executors/webpack", + "name": "webpack", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "dev-server", + "path": "/packages/webpack/executors/dev-server", + "name": "dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "ssr-dev-server", + "path": "/packages/webpack/executors/ssr-dev-server", + "name": "ssr-dev-server", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/webpack/generators", + "name": "generators", + "children": [ + { + "id": "init", + "path": "/packages/webpack/generators/init", + "name": "init", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "webpack-project", + "path": "/packages/webpack/generators/webpack-project", + "name": "webpack-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "workspace", + "path": "/packages/workspace", + "name": "workspace", + "children": [ + { + "id": "documents", + "path": "/packages/workspace/documents", + "name": "documents", + "children": [ + { + "name": "Overview", + "path": "/packages/workspace/documents/overview", + "id": "overview", + "isExternal": false, + "children": [], + "disableCollapsible": false + }, + { + "name": "Nx, NodeJS and Typescript Versions", + "path": "/packages/workspace/documents/nx-nodejs-typescript-version-matrix", + "id": "nx-nodejs-typescript-version-matrix", + "isExternal": false, + "children": [], + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "executors", + "path": "/packages/workspace/executors", + "name": "executors", + "children": [ + { + "id": "run-commands", + "path": "/packages/workspace/executors/run-commands", + "name": "run-commands", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "counter", + "path": "/packages/workspace/executors/counter", + "name": "counter", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "run-script", + "path": "/packages/workspace/executors/run-script", + "name": "run-script", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "generators", + "path": "/packages/workspace/generators", + "name": "generators", + "children": [ + { + "id": "preset", + "path": "/packages/workspace/generators/preset", + "name": "preset", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "move", + "path": "/packages/workspace/generators/move", + "name": "move", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "remove", + "path": "/packages/workspace/generators/remove", + "name": "remove", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "new", + "path": "/packages/workspace/generators/new", + "name": "new", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "library", + "path": "/packages/workspace/generators/library", + "name": "library", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "workspace-generator", + "path": "/packages/workspace/generators/workspace-generator", + "name": "workspace-generator", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "run-commands", + "path": "/packages/workspace/generators/run-commands", + "name": "run-commands", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "convert-to-nx-project", + "path": "/packages/workspace/generators/convert-to-nx-project", + "name": "convert-to-nx-project", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "npm-package", + "path": "/packages/workspace/generators/npm-package", + "name": "npm-package", + "children": [], + "isExternal": false, + "disableCollapsible": false + }, + { + "id": "ci-workflow", + "path": "/packages/workspace/generators/ci-workflow", + "name": "ci-workflow", + "children": [], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ], + "isExternal": false, + "disableCollapsible": false + } + ] + } +] diff --git a/docs/generated/manifests/nx.json b/docs/generated/manifests/nx.json new file mode 100644 index 0000000000000..23c74f119a754 --- /dev/null +++ b/docs/generated/manifests/nx.json @@ -0,0 +1,2056 @@ +{ + "/getting-started": { + "id": "getting-started", + "name": "Getting Started", + "description": "Get started with basic information, concepts and tutorials.", + "file": "", + "itemList": [ + { + "id": "intro", + "name": "Intro to Nx", + "description": "", + "file": "shared/getting-started/intro", + "itemList": [], + "isExternal": false, + "path": "/getting-started/intro", + "tags": [] + }, + { + "id": "package-based-repo-tutorial", + "name": "Package-Based Repo Tutorial", + "description": "", + "file": "shared/npm-tutorial/package-based", + "itemList": [], + "isExternal": false, + "path": "/getting-started/package-based-repo-tutorial", + "tags": [] + }, + { + "id": "integrated-repo-tutorial", + "name": "Integrated Repo Tutorial", + "description": "", + "file": "shared/npm-tutorial/integrated", + "itemList": [], + "isExternal": false, + "path": "/getting-started/integrated-repo-tutorial", + "tags": [] + }, + { + "id": "react-standalone-tutorial", + "name": "React Standalone Tutorial", + "description": "", + "file": "shared/react-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/getting-started/react-standalone-tutorial", + "tags": [] + }, + { + "id": "angular-standalone-tutorial", + "name": "Angular Standalone Tutorial", + "description": "", + "file": "shared/angular-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/getting-started/angular-standalone-tutorial", + "tags": [] + }, + { + "id": "node-tutorial", + "name": "Node Tutorial", + "description": "", + "file": "shared/node-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/getting-started/node-tutorial", + "tags": [] + } + ], + "isExternal": false, + "path": "/getting-started", + "tags": [] + }, + "/getting-started/intro": { + "id": "intro", + "name": "Intro to Nx", + "description": "", + "file": "shared/getting-started/intro", + "itemList": [], + "isExternal": false, + "path": "/getting-started/intro", + "tags": [] + }, + "/getting-started/package-based-repo-tutorial": { + "id": "package-based-repo-tutorial", + "name": "Package-Based Repo Tutorial", + "description": "", + "file": "shared/npm-tutorial/package-based", + "itemList": [], + "isExternal": false, + "path": "/getting-started/package-based-repo-tutorial", + "tags": [] + }, + "/getting-started/integrated-repo-tutorial": { + "id": "integrated-repo-tutorial", + "name": "Integrated Repo Tutorial", + "description": "", + "file": "shared/npm-tutorial/integrated", + "itemList": [], + "isExternal": false, + "path": "/getting-started/integrated-repo-tutorial", + "tags": [] + }, + "/getting-started/react-standalone-tutorial": { + "id": "react-standalone-tutorial", + "name": "React Standalone Tutorial", + "description": "", + "file": "shared/react-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/getting-started/react-standalone-tutorial", + "tags": [] + }, + "/getting-started/angular-standalone-tutorial": { + "id": "angular-standalone-tutorial", + "name": "Angular Standalone Tutorial", + "description": "", + "file": "shared/angular-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/getting-started/angular-standalone-tutorial", + "tags": [] + }, + "/getting-started/node-tutorial": { + "id": "node-tutorial", + "name": "Node Tutorial", + "description": "", + "file": "shared/node-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/getting-started/node-tutorial", + "tags": [] + }, + "/core-tutorial": { + "id": "core-tutorial", + "name": "Core Tutorial", + "description": "Learn to use Nx with this core tutorial where you will learn about all its main feature with a real project.", + "file": "", + "itemList": [ + { + "id": "01-create-blog", + "name": "1 - Create Blog", + "description": "", + "file": "shared/core-tutorial/01-create-blog", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/01-create-blog", + "tags": [] + }, + { + "id": "02-create-cli", + "name": "2 - Create CLI", + "description": "", + "file": "shared/core-tutorial/02-create-cli", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/02-create-cli", + "tags": [] + }, + { + "id": "03-share-assets", + "name": "3 - Share Assets", + "description": "", + "file": "shared/core-tutorial/03-share-assets", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/03-share-assets", + "tags": [] + }, + { + "id": "04-build-affected-projects", + "name": "4 - Build Affected Projects", + "description": "", + "file": "shared/core-tutorial/04-build-affected-projects", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/04-build-affected-projects", + "tags": [] + }, + { + "id": "05-auto-detect-dependencies", + "name": "5 - Automatically Detect Dependencies", + "description": "", + "file": "shared/core-tutorial/05-auto-detect-dependencies", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/05-auto-detect-dependencies", + "tags": [] + }, + { + "id": "06-summary", + "name": "6 - Summary", + "description": "", + "file": "shared/core-tutorial/06-summary", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/06-summary", + "tags": [] + } + ], + "isExternal": false, + "path": "/core-tutorial", + "tags": [] + }, + "/core-tutorial/01-create-blog": { + "id": "01-create-blog", + "name": "1 - Create Blog", + "description": "", + "file": "shared/core-tutorial/01-create-blog", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/01-create-blog", + "tags": [] + }, + "/core-tutorial/02-create-cli": { + "id": "02-create-cli", + "name": "2 - Create CLI", + "description": "", + "file": "shared/core-tutorial/02-create-cli", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/02-create-cli", + "tags": [] + }, + "/core-tutorial/03-share-assets": { + "id": "03-share-assets", + "name": "3 - Share Assets", + "description": "", + "file": "shared/core-tutorial/03-share-assets", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/03-share-assets", + "tags": [] + }, + "/core-tutorial/04-build-affected-projects": { + "id": "04-build-affected-projects", + "name": "4 - Build Affected Projects", + "description": "", + "file": "shared/core-tutorial/04-build-affected-projects", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/04-build-affected-projects", + "tags": [] + }, + "/core-tutorial/05-auto-detect-dependencies": { + "id": "05-auto-detect-dependencies", + "name": "5 - Automatically Detect Dependencies", + "description": "", + "file": "shared/core-tutorial/05-auto-detect-dependencies", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/05-auto-detect-dependencies", + "tags": [] + }, + "/core-tutorial/06-summary": { + "id": "06-summary", + "name": "6 - Summary", + "description": "", + "file": "shared/core-tutorial/06-summary", + "itemList": [], + "isExternal": false, + "path": "/core-tutorial/06-summary", + "tags": [] + }, + "/react-tutorial": { + "id": "react-tutorial", + "name": "React Monorepo Tutorial", + "description": "In this tutorial you'll create a frontend-focused workspace with Nx.", + "file": "", + "itemList": [ + { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/react-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/1-code-generation", + "tags": [] + }, + { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/react-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/2-project-graph", + "tags": [] + }, + { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/react-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/3-task-running", + "tags": [] + }, + { + "id": "4-workspace-optimization", + "name": "4 - Workspace Optimization", + "description": "", + "file": "shared/react-tutorial/4-workspace-optimization", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/4-workspace-optimization", + "tags": [] + }, + { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/react-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/5-summary", + "tags": [] + } + ], + "isExternal": false, + "path": "/react-tutorial", + "tags": [] + }, + "/react-tutorial/1-code-generation": { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/react-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/1-code-generation", + "tags": [] + }, + "/react-tutorial/2-project-graph": { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/react-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/2-project-graph", + "tags": [] + }, + "/react-tutorial/3-task-running": { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/react-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/3-task-running", + "tags": [] + }, + "/react-tutorial/4-workspace-optimization": { + "id": "4-workspace-optimization", + "name": "4 - Workspace Optimization", + "description": "", + "file": "shared/react-tutorial/4-workspace-optimization", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/4-workspace-optimization", + "tags": [] + }, + "/react-tutorial/5-summary": { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/react-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/react-tutorial/5-summary", + "tags": [] + }, + "/react-standalone-tutorial": { + "id": "react-standalone-tutorial", + "name": "React Standalone Tutorial", + "description": "In this tutorial you'll create a frontend-focused workspace with Nx.", + "file": "", + "itemList": [ + { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/react-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/1-code-generation", + "tags": [] + }, + { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/react-standalone-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/2-project-graph", + "tags": [] + }, + { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/react-standalone-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/3-task-running", + "tags": [] + }, + { + "id": "4-task-pipelines", + "name": "4 - Task Pipelines", + "description": "", + "file": "shared/react-standalone-tutorial/4-task-pipelines", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/4-task-pipelines", + "tags": [] + }, + { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/react-standalone-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/5-summary", + "tags": [] + } + ], + "isExternal": false, + "path": "/react-standalone-tutorial", + "tags": [] + }, + "/react-standalone-tutorial/1-code-generation": { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/react-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/1-code-generation", + "tags": [] + }, + "/react-standalone-tutorial/2-project-graph": { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/react-standalone-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/2-project-graph", + "tags": [] + }, + "/react-standalone-tutorial/3-task-running": { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/react-standalone-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/3-task-running", + "tags": [] + }, + "/react-standalone-tutorial/4-task-pipelines": { + "id": "4-task-pipelines", + "name": "4 - Task Pipelines", + "description": "", + "file": "shared/react-standalone-tutorial/4-task-pipelines", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/4-task-pipelines", + "tags": [] + }, + "/react-standalone-tutorial/5-summary": { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/react-standalone-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/react-standalone-tutorial/5-summary", + "tags": [] + }, + "/angular-tutorial": { + "id": "angular-tutorial", + "name": "Angular Monorepo Tutorial", + "description": "Learn to use Nx with this Angular tutorial where you will learn about all its main feature with a real project.", + "file": "", + "itemList": [ + { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/angular-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/1-code-generation", + "tags": [] + }, + { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/angular-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/2-project-graph", + "tags": [] + }, + { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/angular-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/3-task-running", + "tags": [] + }, + { + "id": "4-workspace-optimization", + "name": "4 - Workspace Optimization", + "description": "", + "file": "shared/angular-tutorial/4-workspace-optimization", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/4-workspace-optimization", + "tags": [] + }, + { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/angular-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/5-summary", + "tags": [] + } + ], + "isExternal": false, + "path": "/angular-tutorial", + "tags": [] + }, + "/angular-tutorial/1-code-generation": { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/angular-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/1-code-generation", + "tags": [] + }, + "/angular-tutorial/2-project-graph": { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/angular-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/2-project-graph", + "tags": [] + }, + "/angular-tutorial/3-task-running": { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/angular-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/3-task-running", + "tags": [] + }, + "/angular-tutorial/4-workspace-optimization": { + "id": "4-workspace-optimization", + "name": "4 - Workspace Optimization", + "description": "", + "file": "shared/angular-tutorial/4-workspace-optimization", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/4-workspace-optimization", + "tags": [] + }, + "/angular-tutorial/5-summary": { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/angular-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/angular-tutorial/5-summary", + "tags": [] + }, + "/angular-standalone-tutorial": { + "id": "angular-standalone-tutorial", + "name": "Angular Standalone Tutorial", + "description": "Learn to use Nx with this Angular tutorial where you will learn about all its main feature with a real project.", + "file": "", + "itemList": [ + { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/angular-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/1-code-generation", + "tags": [] + }, + { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/angular-standalone-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/2-project-graph", + "tags": [] + }, + { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/angular-standalone-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/3-task-running", + "tags": [] + }, + { + "id": "4-task-pipelines", + "name": "4 - Task Pipelines", + "description": "", + "file": "shared/angular-standalone-tutorial/4-task-pipelines", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/4-task-pipelines", + "tags": [] + }, + { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/angular-standalone-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/5-summary", + "tags": [] + } + ], + "isExternal": false, + "path": "/angular-standalone-tutorial", + "tags": [] + }, + "/angular-standalone-tutorial/1-code-generation": { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/angular-standalone-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/1-code-generation", + "tags": [] + }, + "/angular-standalone-tutorial/2-project-graph": { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/angular-standalone-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/2-project-graph", + "tags": [] + }, + "/angular-standalone-tutorial/3-task-running": { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/angular-standalone-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/3-task-running", + "tags": [] + }, + "/angular-standalone-tutorial/4-task-pipelines": { + "id": "4-task-pipelines", + "name": "4 - Task Pipelines", + "description": "", + "file": "shared/angular-standalone-tutorial/4-task-pipelines", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/4-task-pipelines", + "tags": [] + }, + "/angular-standalone-tutorial/5-summary": { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/angular-standalone-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/angular-standalone-tutorial/5-summary", + "tags": [] + }, + "/node-tutorial": { + "id": "node-tutorial", + "name": "Node Tutorial", + "description": "Learn to use Nx with this Node tutorial where you will learn about all its main feature with a real project.", + "file": "", + "itemList": [ + { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/node-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/1-code-generation", + "tags": [] + }, + { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/node-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/2-project-graph", + "tags": [] + }, + { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/node-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/3-task-running", + "tags": [] + }, + { + "id": "4-workspace-optimization", + "name": "4 - Workspace Optimization", + "description": "", + "file": "shared/node-tutorial/4-workspace-optimization", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/4-workspace-optimization", + "tags": [] + }, + { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/node-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/5-summary", + "tags": [] + } + ], + "isExternal": false, + "path": "/node-tutorial", + "tags": [] + }, + "/node-tutorial/1-code-generation": { + "id": "1-code-generation", + "name": "1 - Code Generation", + "description": "", + "file": "shared/node-tutorial/1-code-generation", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/1-code-generation", + "tags": [] + }, + "/node-tutorial/2-project-graph": { + "id": "2-project-graph", + "name": "2 - Project Graph", + "description": "", + "file": "shared/node-tutorial/2-project-graph", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/2-project-graph", + "tags": [] + }, + "/node-tutorial/3-task-running": { + "id": "3-task-running", + "name": "3 - Task Running", + "description": "", + "file": "shared/node-tutorial/3-task-running", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/3-task-running", + "tags": [] + }, + "/node-tutorial/4-workspace-optimization": { + "id": "4-workspace-optimization", + "name": "4 - Workspace Optimization", + "description": "", + "file": "shared/node-tutorial/4-workspace-optimization", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/4-workspace-optimization", + "tags": [] + }, + "/node-tutorial/5-summary": { + "id": "5-summary", + "name": "5 - Summary", + "description": "", + "file": "shared/node-tutorial/5-summary", + "itemList": [], + "isExternal": false, + "path": "/node-tutorial/5-summary", + "tags": [] + }, + "/core-features": { + "id": "core-features", + "name": "Core Features", + "description": "Learn the core features of Nx with in depth guides.", + "file": "", + "itemList": [ + { + "id": "run-tasks", + "name": "Run Tasks", + "description": "", + "file": "shared/core-features/run-tasks", + "itemList": [], + "isExternal": false, + "path": "/core-features/run-tasks", + "tags": ["run-tasks"] + }, + { + "id": "cache-task-results", + "name": "Cache Task Results", + "description": "", + "file": "shared/core-features/cache-task-results", + "itemList": [], + "isExternal": false, + "path": "/core-features/cache-task-results", + "tags": ["cache-task-results"] + }, + { + "id": "share-your-cache", + "name": "Share Your Cache", + "description": "", + "file": "shared/core-features/share-your-cache", + "itemList": [], + "isExternal": false, + "path": "/core-features/share-your-cache", + "tags": ["share-your-cache"] + }, + { + "id": "explore-graph", + "name": "Explore the Graph", + "description": "", + "file": "shared/core-features/explore-graph", + "itemList": [], + "isExternal": false, + "path": "/core-features/explore-graph", + "tags": ["explore-graph"] + }, + { + "id": "distribute-task-execution", + "name": "Distribute Task Execution", + "description": "", + "file": "shared/core-features/distribute-task-execution", + "itemList": [], + "isExternal": false, + "path": "/core-features/distribute-task-execution", + "tags": ["distribute-task-execution"] + }, + { + "id": "integrate-with-editors", + "name": "Integrate with Editors", + "description": "", + "file": "shared/core-features/integrate-with-editors", + "itemList": [], + "isExternal": false, + "path": "/core-features/integrate-with-editors", + "tags": ["integrate-with-editors"] + }, + { + "id": "automate-updating-dependencies", + "name": "Automate Updating Dependencies", + "description": "", + "file": "shared/core-features/automate-updating-dependencies", + "itemList": [], + "isExternal": false, + "path": "/core-features/automate-updating-dependencies", + "tags": ["automate-updating-dependencies"] + }, + { + "id": "enforce-project-boundaries", + "name": "Enforce Project Boundaries", + "description": "", + "file": "shared/core-features/enforce-project-boundaries", + "itemList": [], + "isExternal": false, + "path": "/core-features/enforce-project-boundaries", + "tags": ["enforce-project-boundaries"] + } + ], + "isExternal": false, + "path": "/core-features", + "tags": [] + }, + "/core-features/run-tasks": { + "id": "run-tasks", + "name": "Run Tasks", + "description": "", + "file": "shared/core-features/run-tasks", + "itemList": [], + "isExternal": false, + "path": "/core-features/run-tasks", + "tags": ["run-tasks"] + }, + "/core-features/cache-task-results": { + "id": "cache-task-results", + "name": "Cache Task Results", + "description": "", + "file": "shared/core-features/cache-task-results", + "itemList": [], + "isExternal": false, + "path": "/core-features/cache-task-results", + "tags": ["cache-task-results"] + }, + "/core-features/share-your-cache": { + "id": "share-your-cache", + "name": "Share Your Cache", + "description": "", + "file": "shared/core-features/share-your-cache", + "itemList": [], + "isExternal": false, + "path": "/core-features/share-your-cache", + "tags": ["share-your-cache"] + }, + "/core-features/explore-graph": { + "id": "explore-graph", + "name": "Explore the Graph", + "description": "", + "file": "shared/core-features/explore-graph", + "itemList": [], + "isExternal": false, + "path": "/core-features/explore-graph", + "tags": ["explore-graph"] + }, + "/core-features/distribute-task-execution": { + "id": "distribute-task-execution", + "name": "Distribute Task Execution", + "description": "", + "file": "shared/core-features/distribute-task-execution", + "itemList": [], + "isExternal": false, + "path": "/core-features/distribute-task-execution", + "tags": ["distribute-task-execution"] + }, + "/core-features/integrate-with-editors": { + "id": "integrate-with-editors", + "name": "Integrate with Editors", + "description": "", + "file": "shared/core-features/integrate-with-editors", + "itemList": [], + "isExternal": false, + "path": "/core-features/integrate-with-editors", + "tags": ["integrate-with-editors"] + }, + "/core-features/automate-updating-dependencies": { + "id": "automate-updating-dependencies", + "name": "Automate Updating Dependencies", + "description": "", + "file": "shared/core-features/automate-updating-dependencies", + "itemList": [], + "isExternal": false, + "path": "/core-features/automate-updating-dependencies", + "tags": ["automate-updating-dependencies"] + }, + "/core-features/enforce-project-boundaries": { + "id": "enforce-project-boundaries", + "name": "Enforce Project Boundaries", + "description": "", + "file": "shared/core-features/enforce-project-boundaries", + "itemList": [], + "isExternal": false, + "path": "/core-features/enforce-project-boundaries", + "tags": ["enforce-project-boundaries"] + }, + "/plugin-features": { + "id": "plugin-features", + "name": "Plugin Features", + "description": "Learn what is a plugin, the different type of plugins and how to create one.", + "file": "", + "itemList": [ + { + "id": "use-task-executors", + "name": "Use Task Executors", + "description": "", + "file": "shared/plugin-features/use-task-executors", + "itemList": [], + "isExternal": false, + "path": "/plugin-features/use-task-executors", + "tags": ["use-task-executors"] + }, + { + "id": "use-code-generators", + "name": "Use Code Generators", + "description": "", + "file": "shared/plugin-features/use-code-generators", + "itemList": [], + "isExternal": false, + "path": "/plugin-features/use-code-generators", + "tags": ["use-code-generators"] + }, + { + "id": "create-your-own-plugin", + "name": "Create Your Own Plugin", + "description": "", + "file": "shared/plugin-features/create-your-own-plugin", + "itemList": [], + "isExternal": false, + "path": "/plugin-features/create-your-own-plugin", + "tags": ["create-your-own-plugin"] + } + ], + "isExternal": false, + "path": "/plugin-features", + "tags": [] + }, + "/plugin-features/use-task-executors": { + "id": "use-task-executors", + "name": "Use Task Executors", + "description": "", + "file": "shared/plugin-features/use-task-executors", + "itemList": [], + "isExternal": false, + "path": "/plugin-features/use-task-executors", + "tags": ["use-task-executors"] + }, + "/plugin-features/use-code-generators": { + "id": "use-code-generators", + "name": "Use Code Generators", + "description": "", + "file": "shared/plugin-features/use-code-generators", + "itemList": [], + "isExternal": false, + "path": "/plugin-features/use-code-generators", + "tags": ["use-code-generators"] + }, + "/plugin-features/create-your-own-plugin": { + "id": "create-your-own-plugin", + "name": "Create Your Own Plugin", + "description": "", + "file": "shared/plugin-features/create-your-own-plugin", + "itemList": [], + "isExternal": false, + "path": "/plugin-features/create-your-own-plugin", + "tags": ["create-your-own-plugin"] + }, + "/concepts": { + "id": "concepts", + "name": "Concepts", + "description": "Learn about all the different concepts Nx uses to manage your tasks and enhance your productivity.", + "file": "", + "itemList": [ + { + "id": "integrated-vs-package-based", + "name": "Integrated Repos vs. Package-Based Repos", + "description": "", + "file": "shared/concepts/integrated-vs-package-based", + "itemList": [], + "isExternal": false, + "path": "/concepts/integrated-vs-package-based", + "tags": ["intro"] + }, + { + "id": "mental-model", + "name": "Mental Model", + "description": "", + "file": "shared/mental-model", + "itemList": [], + "isExternal": false, + "path": "/concepts/mental-model", + "tags": ["intro"] + }, + { + "id": "how-caching-works", + "name": "How Caching Works", + "description": "", + "file": "shared/concepts/how-caching-works", + "itemList": [], + "isExternal": false, + "path": "/concepts/how-caching-works", + "tags": ["cache-task-results"] + }, + { + "id": "dte", + "name": "Improve Worst Case CI Times", + "description": "", + "file": "shared/concepts/improve-worst-case-ci-times", + "itemList": [], + "isExternal": false, + "path": "/concepts/dte", + "tags": ["distribute-task-execution"] + }, + { + "id": "task-pipeline-configuration", + "name": "Task Pipeline Configuration", + "description": "", + "file": "shared/concepts/task-pipeline-configuration", + "itemList": [], + "isExternal": false, + "path": "/concepts/task-pipeline-configuration", + "tags": ["run-tasks", "cache-task-results", "use-task-executors"] + }, + { + "id": "affected", + "name": "Affected", + "description": "", + "file": "shared/using-nx/affected", + "itemList": [], + "isExternal": false, + "path": "/concepts/affected", + "tags": ["run-tasks"] + }, + { + "id": "more-concept-guides", + "name": "More Concept Guides »", + "description": "", + "file": "shared/concepts/more-concepts", + "itemList": [], + "isExternal": false, + "path": "/concepts/more-concept-guides", + "tags": [] + } + ], + "isExternal": false, + "path": "/concepts", + "tags": [] + }, + "/concepts/integrated-vs-package-based": { + "id": "integrated-vs-package-based", + "name": "Integrated Repos vs. Package-Based Repos", + "description": "", + "file": "shared/concepts/integrated-vs-package-based", + "itemList": [], + "isExternal": false, + "path": "/concepts/integrated-vs-package-based", + "tags": ["intro"] + }, + "/concepts/mental-model": { + "id": "mental-model", + "name": "Mental Model", + "description": "", + "file": "shared/mental-model", + "itemList": [], + "isExternal": false, + "path": "/concepts/mental-model", + "tags": ["intro"] + }, + "/concepts/how-caching-works": { + "id": "how-caching-works", + "name": "How Caching Works", + "description": "", + "file": "shared/concepts/how-caching-works", + "itemList": [], + "isExternal": false, + "path": "/concepts/how-caching-works", + "tags": ["cache-task-results"] + }, + "/concepts/dte": { + "id": "dte", + "name": "Improve Worst Case CI Times", + "description": "", + "file": "shared/concepts/improve-worst-case-ci-times", + "itemList": [], + "isExternal": false, + "path": "/concepts/dte", + "tags": ["distribute-task-execution"] + }, + "/concepts/task-pipeline-configuration": { + "id": "task-pipeline-configuration", + "name": "Task Pipeline Configuration", + "description": "", + "file": "shared/concepts/task-pipeline-configuration", + "itemList": [], + "isExternal": false, + "path": "/concepts/task-pipeline-configuration", + "tags": ["run-tasks", "cache-task-results", "use-task-executors"] + }, + "/concepts/affected": { + "id": "affected", + "name": "Affected", + "description": "", + "file": "shared/using-nx/affected", + "itemList": [], + "isExternal": false, + "path": "/concepts/affected", + "tags": ["run-tasks"] + }, + "/concepts/more-concept-guides": { + "id": "more-concept-guides", + "name": "More Concept Guides »", + "description": "", + "file": "shared/concepts/more-concepts", + "itemList": [], + "isExternal": false, + "path": "/concepts/more-concept-guides", + "tags": [] + }, + "/more-concepts": { + "id": "more-concepts", + "name": "More Concepts", + "description": "Get deeper into how Nx works and its different aspects.", + "file": "", + "itemList": [ + { + "id": "customizing-inputs", + "name": "Customizing Inputs", + "description": "", + "file": "shared/concepts/customizing-inputs", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/customizing-inputs", + "tags": ["cache-task-results"] + }, + { + "id": "incremental-builds", + "name": "Incremental Builds", + "description": "", + "file": "shared/incremental-builds", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/incremental-builds", + "tags": ["use-task-executors"] + }, + { + "id": "illustrated-dte", + "name": "Illustrated Distributed Task Execution", + "description": "", + "file": "shared/concepts/illustrated-dte-guide", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/illustrated-dte", + "tags": ["distribute-task-execution"] + }, + { + "id": "turbo-and-nx", + "name": "Nx and Turborepo", + "description": "", + "file": "shared/guides/turbo-and-nx", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/turbo-and-nx", + "tags": [] + }, + { + "id": "why-monorepos", + "name": "Monorepos", + "description": "", + "file": "shared/guides/why-monorepos", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/why-monorepos", + "tags": [] + }, + { + "id": "monorepo-nx-enterprise", + "name": "Using Nx at Enterprises", + "description": "", + "file": "shared/monorepo-nx-enterprise", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/monorepo-nx-enterprise", + "tags": ["enforce-project-boundaries", "use-code-generators"] + }, + { + "id": "nx-daemon", + "name": "Nx Daemon", + "description": "", + "file": "shared/daemon", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/nx-daemon", + "tags": [] + }, + { + "id": "nx-and-angular", + "name": "Nx and the Angular CLI", + "description": "", + "file": "shared/guides/nx-and-angular-cli", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/nx-and-angular", + "tags": [] + }, + { + "id": "folder-structure", + "name": "Folder Structure", + "description": "", + "file": "shared/guides/integrated-repo-folder-structure", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/folder-structure", + "tags": [] + }, + { + "id": "nx-devkit-angular-devkit", + "name": "Nx Devkit and Angular Devkit", + "description": "", + "file": "shared/guides/nx-devkit-angular-devkit", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/nx-devkit-angular-devkit", + "tags": ["create-your-own-plugin"] + }, + { + "id": "micro-frontend-architecture", + "name": "Micro Frontend Architecture", + "description": "", + "file": "shared/guides/module-federation/micro-frontend-architecture", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/micro-frontend-architecture", + "tags": [] + }, + { + "id": "applications-and-libraries", + "name": "Applications and Libraries", + "description": "", + "file": "shared/workspace/applications-and-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/applications-and-libraries", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "creating-libraries", + "name": "Creating Libraries", + "description": "", + "file": "shared/workspace/creating-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/creating-libraries", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "library-types", + "name": "Library Types", + "description": "", + "file": "shared/workspace/library-types", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/library-types", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "grouping-libraries", + "name": "Grouping Libraries", + "description": "", + "file": "shared/workspace/grouping-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/grouping-libraries", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "buildable-and-publishable-libraries", + "name": "Buildable and Publishable Libraries", + "description": "", + "file": "shared/workspace/buildable-and-publishable-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/buildable-and-publishable-libraries", + "tags": [] + }, + { + "id": "how-project-graph-is-built", + "name": "How the Project Graph is Built", + "description": "", + "file": "shared/concepts/how-project-graph-is-built", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/how-project-graph-is-built", + "tags": ["explore-graph"] + } + ], + "isExternal": false, + "path": "/more-concepts", + "tags": [] + }, + "/more-concepts/customizing-inputs": { + "id": "customizing-inputs", + "name": "Customizing Inputs", + "description": "", + "file": "shared/concepts/customizing-inputs", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/customizing-inputs", + "tags": ["cache-task-results"] + }, + "/more-concepts/incremental-builds": { + "id": "incremental-builds", + "name": "Incremental Builds", + "description": "", + "file": "shared/incremental-builds", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/incremental-builds", + "tags": ["use-task-executors"] + }, + "/more-concepts/illustrated-dte": { + "id": "illustrated-dte", + "name": "Illustrated Distributed Task Execution", + "description": "", + "file": "shared/concepts/illustrated-dte-guide", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/illustrated-dte", + "tags": ["distribute-task-execution"] + }, + "/more-concepts/turbo-and-nx": { + "id": "turbo-and-nx", + "name": "Nx and Turborepo", + "description": "", + "file": "shared/guides/turbo-and-nx", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/turbo-and-nx", + "tags": [] + }, + "/more-concepts/why-monorepos": { + "id": "why-monorepos", + "name": "Monorepos", + "description": "", + "file": "shared/guides/why-monorepos", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/why-monorepos", + "tags": [] + }, + "/more-concepts/monorepo-nx-enterprise": { + "id": "monorepo-nx-enterprise", + "name": "Using Nx at Enterprises", + "description": "", + "file": "shared/monorepo-nx-enterprise", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/monorepo-nx-enterprise", + "tags": ["enforce-project-boundaries", "use-code-generators"] + }, + "/more-concepts/nx-daemon": { + "id": "nx-daemon", + "name": "Nx Daemon", + "description": "", + "file": "shared/daemon", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/nx-daemon", + "tags": [] + }, + "/more-concepts/nx-and-angular": { + "id": "nx-and-angular", + "name": "Nx and the Angular CLI", + "description": "", + "file": "shared/guides/nx-and-angular-cli", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/nx-and-angular", + "tags": [] + }, + "/more-concepts/folder-structure": { + "id": "folder-structure", + "name": "Folder Structure", + "description": "", + "file": "shared/guides/integrated-repo-folder-structure", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/folder-structure", + "tags": [] + }, + "/more-concepts/nx-devkit-angular-devkit": { + "id": "nx-devkit-angular-devkit", + "name": "Nx Devkit and Angular Devkit", + "description": "", + "file": "shared/guides/nx-devkit-angular-devkit", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/nx-devkit-angular-devkit", + "tags": ["create-your-own-plugin"] + }, + "/more-concepts/micro-frontend-architecture": { + "id": "micro-frontend-architecture", + "name": "Micro Frontend Architecture", + "description": "", + "file": "shared/guides/module-federation/micro-frontend-architecture", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/micro-frontend-architecture", + "tags": [] + }, + "/more-concepts/applications-and-libraries": { + "id": "applications-and-libraries", + "name": "Applications and Libraries", + "description": "", + "file": "shared/workspace/applications-and-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/applications-and-libraries", + "tags": ["enforce-project-boundaries"] + }, + "/more-concepts/creating-libraries": { + "id": "creating-libraries", + "name": "Creating Libraries", + "description": "", + "file": "shared/workspace/creating-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/creating-libraries", + "tags": ["enforce-project-boundaries"] + }, + "/more-concepts/library-types": { + "id": "library-types", + "name": "Library Types", + "description": "", + "file": "shared/workspace/library-types", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/library-types", + "tags": ["enforce-project-boundaries"] + }, + "/more-concepts/grouping-libraries": { + "id": "grouping-libraries", + "name": "Grouping Libraries", + "description": "", + "file": "shared/workspace/grouping-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/grouping-libraries", + "tags": ["enforce-project-boundaries"] + }, + "/more-concepts/buildable-and-publishable-libraries": { + "id": "buildable-and-publishable-libraries", + "name": "Buildable and Publishable Libraries", + "description": "", + "file": "shared/workspace/buildable-and-publishable-libraries", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/buildable-and-publishable-libraries", + "tags": [] + }, + "/more-concepts/how-project-graph-is-built": { + "id": "how-project-graph-is-built", + "name": "How the Project Graph is Built", + "description": "", + "file": "shared/concepts/how-project-graph-is-built", + "itemList": [], + "isExternal": false, + "path": "/more-concepts/how-project-graph-is-built", + "tags": ["explore-graph"] + }, + "/recipes": { + "id": "all", + "name": "All Recipes »", + "description": "", + "file": "", + "itemList": [], + "isExternal": false, + "path": "/recipes", + "tags": [] + }, + "/recipes/ci/ci-setup": { + "id": "ci-setup", + "name": "CI Setup", + "description": "", + "file": "", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/ci-setup", + "tags": [] + }, + "/recipes/adopting-nx": { + "id": "adopting-nx", + "name": "Adopting Nx", + "description": "", + "file": "", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx", + "tags": [] + }, + "/reference": { + "id": "reference", + "name": "Reference", + "description": "Understand how to use Nx functionalities, what arguments and options are available for each component.", + "file": "", + "itemList": [ + { + "id": "commands", + "name": "Commands", + "description": "", + "file": "shared/reference/commands", + "itemList": [], + "isExternal": false, + "path": "/reference/commands", + "tags": [] + }, + { + "id": "nx-json", + "name": "nx.json", + "description": "", + "file": "shared/reference/nx-json", + "itemList": [], + "isExternal": false, + "path": "/reference/nx-json", + "tags": [] + }, + { + "id": "project-configuration", + "name": "Project Configuration", + "description": "", + "file": "shared/reference/project-configuration", + "itemList": [], + "isExternal": false, + "path": "/reference/project-configuration", + "tags": ["use-task-executors"] + }, + { + "id": "nxignore", + "name": ".nxignore", + "description": "", + "file": "shared/reference/nxignore", + "itemList": [], + "isExternal": false, + "path": "/reference/nxignore", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "environment-variables", + "name": "Environment Variables", + "description": "", + "file": "shared/reference/environment-variables", + "itemList": [], + "isExternal": false, + "path": "/reference/environment-variables", + "tags": ["environment-variables"] + }, + { + "id": "packages", + "name": "Packages", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/packages", + "tags": [] + }, + { + "id": "packages-devkit", + "name": "Nx Devkit", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/packages#devkit", + "tags": ["create-your-own-plugin"] + }, + { + "id": "glossary", + "name": "Glossary", + "description": "", + "file": "shared/reference/glossary", + "itemList": [], + "isExternal": false, + "path": "/reference/glossary", + "tags": [] + } + ], + "isExternal": false, + "path": "/reference", + "tags": [] + }, + "/reference/commands": { + "id": "commands", + "name": "Commands", + "description": "", + "file": "shared/reference/commands", + "itemList": [], + "isExternal": false, + "path": "/reference/commands", + "tags": [] + }, + "/reference/nx-json": { + "id": "nx-json", + "name": "nx.json", + "description": "", + "file": "shared/reference/nx-json", + "itemList": [], + "isExternal": false, + "path": "/reference/nx-json", + "tags": [] + }, + "/reference/project-configuration": { + "id": "project-configuration", + "name": "Project Configuration", + "description": "", + "file": "shared/reference/project-configuration", + "itemList": [], + "isExternal": false, + "path": "/reference/project-configuration", + "tags": ["use-task-executors"] + }, + "/reference/nxignore": { + "id": "nxignore", + "name": ".nxignore", + "description": "", + "file": "shared/reference/nxignore", + "itemList": [], + "isExternal": false, + "path": "/reference/nxignore", + "tags": ["enforce-project-boundaries"] + }, + "/reference/environment-variables": { + "id": "environment-variables", + "name": "Environment Variables", + "description": "", + "file": "shared/reference/environment-variables", + "itemList": [], + "isExternal": false, + "path": "/reference/environment-variables", + "tags": ["environment-variables"] + }, + "/packages": { + "id": "packages", + "name": "Packages", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/packages", + "tags": [] + }, + "/packages#devkit": { + "id": "packages-devkit", + "name": "Nx Devkit", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/packages#devkit", + "tags": ["create-your-own-plugin"] + }, + "/reference/glossary": { + "id": "glossary", + "name": "Glossary", + "description": "", + "file": "shared/reference/glossary", + "itemList": [], + "isExternal": false, + "path": "/reference/glossary", + "tags": [] + }, + "/deprecated": { + "id": "deprecated", + "name": "Deprecated", + "description": "Functionality that has been superseded in the current version of Nx. Listed here for those running older versions.", + "file": "", + "itemList": [ + { + "id": "workspace-json", + "name": "workspace.json", + "description": "", + "file": "shared/deprecated/workspace-json", + "itemList": [], + "isExternal": false, + "path": "/deprecated/workspace-json", + "tags": [] + }, + { + "id": "workspace-generators", + "name": "Workspace Generators", + "description": "", + "file": "shared/deprecated/workspace-generators", + "itemList": [], + "isExternal": false, + "path": "/deprecated/workspace-generators", + "tags": [] + }, + { + "id": "workspace-executors", + "name": "Workspace Executors", + "description": "", + "file": "shared/deprecated/workspace-executors", + "itemList": [], + "isExternal": false, + "path": "/deprecated/workspace-executors", + "tags": [] + }, + { + "id": "default-collection", + "name": "defaultCollection", + "description": "", + "file": "shared/deprecated/default-collection", + "itemList": [], + "isExternal": false, + "path": "/deprecated/default-collection", + "tags": [] + }, + { + "id": "runtime-cache-inputs", + "name": "runtimeCacheInputs", + "description": "", + "file": "shared/deprecated/runtime-cache-inputs", + "itemList": [], + "isExternal": false, + "path": "/deprecated/runtime-cache-inputs", + "tags": [] + }, + { + "id": "global-implicit-dependencies", + "name": "globalImplicitDependencies", + "description": "", + "file": "shared/deprecated/global-implicit-dependencies", + "itemList": [], + "isExternal": false, + "path": "/deprecated/global-implicit-dependencies", + "tags": [] + } + ], + "isExternal": false, + "path": "/deprecated", + "tags": [] + }, + "/deprecated/workspace-json": { + "id": "workspace-json", + "name": "workspace.json", + "description": "", + "file": "shared/deprecated/workspace-json", + "itemList": [], + "isExternal": false, + "path": "/deprecated/workspace-json", + "tags": [] + }, + "/deprecated/workspace-generators": { + "id": "workspace-generators", + "name": "Workspace Generators", + "description": "", + "file": "shared/deprecated/workspace-generators", + "itemList": [], + "isExternal": false, + "path": "/deprecated/workspace-generators", + "tags": [] + }, + "/deprecated/workspace-executors": { + "id": "workspace-executors", + "name": "Workspace Executors", + "description": "", + "file": "shared/deprecated/workspace-executors", + "itemList": [], + "isExternal": false, + "path": "/deprecated/workspace-executors", + "tags": [] + }, + "/deprecated/default-collection": { + "id": "default-collection", + "name": "defaultCollection", + "description": "", + "file": "shared/deprecated/default-collection", + "itemList": [], + "isExternal": false, + "path": "/deprecated/default-collection", + "tags": [] + }, + "/deprecated/runtime-cache-inputs": { + "id": "runtime-cache-inputs", + "name": "runtimeCacheInputs", + "description": "", + "file": "shared/deprecated/runtime-cache-inputs", + "itemList": [], + "isExternal": false, + "path": "/deprecated/runtime-cache-inputs", + "tags": [] + }, + "/deprecated/global-implicit-dependencies": { + "id": "global-implicit-dependencies", + "name": "globalImplicitDependencies", + "description": "", + "file": "shared/deprecated/global-implicit-dependencies", + "itemList": [], + "isExternal": false, + "path": "/deprecated/global-implicit-dependencies", + "tags": [] + }, + "/see-also": { + "id": "see-also", + "name": "See Also", + "description": "Links to other pieces of documentation", + "file": "", + "itemList": [ + { + "id": "nx-cloud-documentation", + "name": "Nx Cloud Documentation", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/nx-cloud/intro/what-is-nx-cloud", + "tags": ["cache-task-results", "distribute-task-execution"] + }, + { + "id": "nx-cloud-main-site", + "name": "Nx Cloud Main Site", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "https://nx.app", + "tags": ["cache-task-results", "distribute-task-execution"] + }, + { + "id": "skip-nx-cache-flag", + "name": "--skip-nx-cache flag", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/nx/affected#skip-nx-cache", + "tags": ["cache-task-results"] + }, + { + "id": "tasks-runner-options-property", + "name": "tasks-runner-options property", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#tasks-runner-options", + "tags": ["cache-task-results"] + }, + { + "id": "nxjson-inputs", + "name": "nx.json reference: inputs and namedInputs", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#inputs-&-namedinputs", + "tags": ["cache-task-results"] + }, + { + "id": "project-config-inputs", + "name": "Project Configuration reference: inputs and namedInputs", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/project-configuration#inputs-&-namedinputs", + "tags": ["cache-task-results"] + }, + { + "id": "nxjson-workspaceLayout", + "name": "nx.json workspaceLayout property", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#workspace-layout", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "nxjson-generator-defaults", + "name": "nx.json generator defaults", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#generators", + "tags": ["use-code-generators"] + } + ], + "isExternal": false, + "path": "/see-also", + "tags": [] + }, + "/nx-cloud/intro/what-is-nx-cloud": { + "id": "nx-cloud-documentation", + "name": "Nx Cloud Documentation", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/nx-cloud/intro/what-is-nx-cloud", + "tags": ["cache-task-results", "distribute-task-execution"] + }, + "/nx/affected#skip-nx-cache": { + "id": "skip-nx-cache-flag", + "name": "--skip-nx-cache flag", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/nx/affected#skip-nx-cache", + "tags": ["cache-task-results"] + }, + "/reference/nx-json#tasks-runner-options": { + "id": "tasks-runner-options-property", + "name": "tasks-runner-options property", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#tasks-runner-options", + "tags": ["cache-task-results"] + }, + "/reference/nx-json#inputs-&-namedinputs": { + "id": "nxjson-inputs", + "name": "nx.json reference: inputs and namedInputs", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#inputs-&-namedinputs", + "tags": ["cache-task-results"] + }, + "/reference/project-configuration#inputs-&-namedinputs": { + "id": "project-config-inputs", + "name": "Project Configuration reference: inputs and namedInputs", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/project-configuration#inputs-&-namedinputs", + "tags": ["cache-task-results"] + }, + "/reference/nx-json#workspace-layout": { + "id": "nxjson-workspaceLayout", + "name": "nx.json workspaceLayout property", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#workspace-layout", + "tags": ["enforce-project-boundaries"] + }, + "/reference/nx-json#generators": { + "id": "nxjson-generator-defaults", + "name": "nx.json generator defaults", + "description": "", + "file": "", + "itemList": [], + "isExternal": true, + "path": "/reference/nx-json#generators", + "tags": ["use-code-generators"] + } +} diff --git a/docs/generated/manifests/packages.json b/docs/generated/manifests/packages.json new file mode 100644 index 0000000000000..1b66c751b8c6c --- /dev/null +++ b/docs/generated/manifests/packages.json @@ -0,0 +1,2951 @@ +{ + "add-nx-to-monorepo": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "add-nx-to-monorepo", + "packageName": "add-nx-to-monorepo", + "description": "Make any monorepo faster by adding Nx to it", + "documents": {}, + "root": "/packages/add-nx-to-monorepo", + "source": "/packages/add-nx-to-monorepo/src", + "executors": {}, + "generators": {}, + "path": "/packages/add-nx-to-monorepo" + }, + "angular": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "angular", + "packageName": "@nrwl/angular", + "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Cypress, Karma, and Protractor. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", + "documents": { + "/packages/angular/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Cypress, Karma, and Protractor. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", + "file": "generated/packages/angular/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/angular/documents/overview", + "tags": [], + "originalFilePath": "shared/angular-plugin" + }, + "/packages/angular/documents/angular-nx-version-matrix": { + "id": "angular-nx-version-matrix", + "name": "Angular and Nx Version Matrix", + "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Cypress, Karma, and Protractor. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", + "file": "generated/packages/angular/documents/angular-nx-version-matrix", + "itemList": [], + "isExternal": false, + "path": "/packages/angular/documents/angular-nx-version-matrix", + "tags": [], + "originalFilePath": "shared/angular-nx-version-matrix" + } + }, + "root": "/packages/angular", + "source": "/packages/angular/src", + "executors": { + "/packages/angular/executors/delegate-build": { + "description": "Delegates the build to a different target while supporting incremental builds.", + "file": "generated/packages/angular/executors/delegate-build.json", + "hidden": false, + "name": "delegate-build", + "originalFilePath": "/packages/angular/src/executors/delegate-build/schema.json", + "path": "/packages/angular/executors/delegate-build", + "type": "executor" + }, + "/packages/angular/executors/ng-packagr-lite": { + "description": "Builds a library with support for incremental builds.\nThis executor is meant to be used with buildable libraries in an incremental build scenario. It is similar to the `@nrwl/angular:package` executor but with some key differences:\n- It doesn't run `ngcc` automatically (`ngcc` needs to be run separately beforehand if needed, this can be done in a `postinstall` hook on `package.json`).\n- It only produces ESM2020 bundles.\n- It doesn't generate package exports in the `package.json`.", + "file": "generated/packages/angular/executors/ng-packagr-lite.json", + "hidden": false, + "name": "ng-packagr-lite", + "originalFilePath": "/packages/angular/src/executors/ng-packagr-lite/schema.json", + "path": "/packages/angular/executors/ng-packagr-lite", + "type": "executor" + }, + "/packages/angular/executors/package": { + "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\nThis executor is similar to the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.", + "file": "generated/packages/angular/executors/package.json", + "hidden": false, + "name": "package", + "originalFilePath": "/packages/angular/src/executors/package/schema.json", + "path": "/packages/angular/executors/package", + "type": "executor" + }, + "/packages/angular/executors/file-server": { + "description": "Serves a static web application from a folder.", + "file": "generated/packages/angular/executors/file-server.json", + "hidden": false, + "name": "file-server", + "originalFilePath": "/packages/angular/src/executors/file-server/schema.json", + "path": "/packages/angular/executors/file-server", + "type": "executor" + }, + "/packages/angular/executors/webpack-browser": { + "description": "The `webpack-browser` executor is very similar to the standard `browser` builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building", + "file": "generated/packages/angular/executors/webpack-browser.json", + "hidden": false, + "name": "webpack-browser", + "originalFilePath": "/packages/angular/src/builders/webpack-browser/schema.json", + "path": "/packages/angular/executors/webpack-browser", + "type": "executor" + }, + "/packages/angular/executors/webpack-dev-server": { + "description": "The `webpack-dev-server` executor is very similar to the standard `dev-server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration.", + "file": "generated/packages/angular/executors/webpack-dev-server.json", + "hidden": false, + "name": "webpack-dev-server", + "originalFilePath": "/packages/angular/src/builders/webpack-dev-server/schema.json", + "path": "/packages/angular/executors/webpack-dev-server", + "type": "executor" + }, + "/packages/angular/executors/webpack-server": { + "description": "The `webpack-server` executor is very similar to the standard `server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration and NgUniversal for SSR.", + "file": "generated/packages/angular/executors/webpack-server.json", + "hidden": false, + "name": "webpack-server", + "originalFilePath": "/packages/angular/src/builders/webpack-server/schema.json", + "path": "/packages/angular/executors/webpack-server", + "type": "executor" + }, + "/packages/angular/executors/module-federation-dev-server": { + "description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host.", + "file": "generated/packages/angular/executors/module-federation-dev-server.json", + "hidden": false, + "name": "module-federation-dev-server", + "originalFilePath": "/packages/angular/src/builders/module-federation-dev-server/schema.json", + "path": "/packages/angular/executors/module-federation-dev-server", + "type": "executor" + }, + "/packages/angular/executors/module-federation-dev-ssr": { + "description": "The module-federation-dev-ssr executor is reserved exclusively for use with host Module Federation applications that use SSR. It allows the user to specify which remote applications should be served with the host.", + "file": "generated/packages/angular/executors/module-federation-dev-ssr.json", + "hidden": false, + "name": "module-federation-dev-ssr", + "originalFilePath": "/packages/angular/src/builders/module-federation-dev-ssr/schema.json", + "path": "/packages/angular/executors/module-federation-dev-ssr", + "type": "executor" + } + }, + "generators": { + "/packages/angular/generators/add-linting": { + "description": "Adds linting configuration to an Angular project.", + "file": "generated/packages/angular/generators/add-linting.json", + "hidden": true, + "name": "add-linting", + "originalFilePath": "/packages/angular/src/generators/add-linting/schema.json", + "path": "/packages/angular/generators/add-linting", + "type": "generator" + }, + "/packages/angular/generators/application": { + "description": "Creates an Angular application.", + "file": "generated/packages/angular/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/angular/src/generators/application/schema.json", + "path": "/packages/angular/generators/application", + "type": "generator" + }, + "/packages/angular/generators/component": { + "description": "Generate an Angular Component.", + "file": "generated/packages/angular/generators/component.json", + "hidden": false, + "name": "component", + "originalFilePath": "/packages/angular/src/generators/component/schema.json", + "path": "/packages/angular/generators/component", + "type": "generator" + }, + "/packages/angular/generators/component-cypress-spec": { + "description": "Creates a Cypress spec for a UI component that has a story.", + "file": "generated/packages/angular/generators/component-cypress-spec.json", + "hidden": true, + "name": "component-cypress-spec", + "originalFilePath": "/packages/angular/src/generators/component-cypress-spec/schema.json", + "path": "/packages/angular/generators/component-cypress-spec", + "type": "generator" + }, + "/packages/angular/generators/component-story": { + "description": "Creates a stories.ts file for a component.", + "file": "generated/packages/angular/generators/component-story.json", + "hidden": true, + "name": "component-story", + "originalFilePath": "/packages/angular/src/generators/component-story/schema.json", + "path": "/packages/angular/generators/component-story", + "type": "generator" + }, + "/packages/angular/generators/component-test": { + "description": "Creates a cypress component test file for a component.", + "file": "generated/packages/angular/generators/component-test.json", + "hidden": false, + "name": "component-test", + "originalFilePath": "/packages/angular/src/generators/component-test/schema.json", + "path": "/packages/angular/generators/component-test", + "type": "generator" + }, + "/packages/angular/generators/convert-tslint-to-eslint": { + "description": "Converts a project from TSLint to ESLint.", + "file": "generated/packages/angular/generators/convert-tslint-to-eslint.json", + "hidden": false, + "name": "convert-tslint-to-eslint", + "originalFilePath": "/packages/angular/src/generators/convert-tslint-to-eslint/schema.json", + "path": "/packages/angular/generators/convert-tslint-to-eslint", + "type": "generator" + }, + "/packages/angular/generators/downgrade-module": { + "description": "Sets up a Downgrade Module.", + "file": "generated/packages/angular/generators/downgrade-module.json", + "hidden": false, + "name": "downgrade-module", + "originalFilePath": "/packages/angular/src/generators/downgrade-module/schema.json", + "path": "/packages/angular/generators/downgrade-module", + "type": "generator" + }, + "/packages/angular/generators/init": { + "description": "Initializes the `@nrwl/angular` plugin.", + "file": "generated/packages/angular/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/angular/src/generators/init/schema.json", + "path": "/packages/angular/generators/init", + "type": "generator" + }, + "/packages/angular/generators/karma": { + "description": "Adds Karma configuration to a workspace.", + "file": "generated/packages/angular/generators/karma.json", + "hidden": false, + "name": "karma", + "originalFilePath": "/packages/angular/src/generators/karma/schema.json", + "path": "/packages/angular/generators/karma", + "type": "generator" + }, + "/packages/angular/generators/karma-project": { + "description": "Adds Karma configuration to a project.", + "file": "generated/packages/angular/generators/karma-project.json", + "hidden": false, + "name": "karma-project", + "originalFilePath": "/packages/angular/src/generators/karma-project/schema.json", + "path": "/packages/angular/generators/karma-project", + "type": "generator" + }, + "/packages/angular/generators/library": { + "description": "Creates an Angular library.", + "file": "generated/packages/angular/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/angular/src/generators/library/schema.json", + "path": "/packages/angular/generators/library", + "type": "generator" + }, + "/packages/angular/generators/library-secondary-entry-point": { + "description": "Creates a secondary entry point for an Angular publishable library.", + "file": "generated/packages/angular/generators/library-secondary-entry-point.json", + "hidden": false, + "name": "library-secondary-entry-point", + "originalFilePath": "/packages/angular/src/generators/library-secondary-entry-point/schema.json", + "path": "/packages/angular/generators/library-secondary-entry-point", + "type": "generator" + }, + "/packages/angular/generators/remote": { + "description": "Generate a Remote Angular Module Federation Application.", + "file": "generated/packages/angular/generators/remote.json", + "hidden": false, + "name": "remote", + "originalFilePath": "/packages/angular/src/generators/remote/schema.json", + "path": "/packages/angular/generators/remote", + "type": "generator" + }, + "/packages/angular/generators/move": { + "description": "Moves an Angular application or library to another folder within the workspace and updates the project configuration.", + "file": "generated/packages/angular/generators/move.json", + "hidden": false, + "name": "move", + "originalFilePath": "/packages/angular/src/generators/move/schema.json", + "path": "/packages/angular/generators/move", + "type": "generator" + }, + "/packages/angular/generators/convert-to-with-mf": { + "description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n{% callout type=\"warning\" title=\"Overrides\" %}This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!{% /callout %}", + "file": "generated/packages/angular/generators/convert-to-with-mf.json", + "hidden": false, + "name": "convert-to-with-mf", + "originalFilePath": "/packages/angular/src/generators/convert-to-with-mf/schema.json", + "path": "/packages/angular/generators/convert-to-with-mf", + "type": "generator" + }, + "/packages/angular/generators/host": { + "description": "Generate a Host Angular Module Federation Application.", + "file": "generated/packages/angular/generators/host.json", + "hidden": false, + "name": "host", + "originalFilePath": "/packages/angular/src/generators/host/schema.json", + "path": "/packages/angular/generators/host", + "type": "generator" + }, + "/packages/angular/generators/ng-add": { + "description": "Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace.", + "file": "generated/packages/angular/generators/ng-add.json", + "hidden": true, + "name": "ng-add", + "originalFilePath": "/packages/angular/src/generators/ng-add/schema.json", + "path": "/packages/angular/generators/ng-add", + "type": "generator" + }, + "/packages/angular/generators/ngrx": { + "description": "Adds NgRx support to an application or library.", + "file": "generated/packages/angular/generators/ngrx.json", + "hidden": false, + "name": "ngrx", + "originalFilePath": "/packages/angular/src/generators/ngrx/schema.json", + "path": "/packages/angular/generators/ngrx", + "type": "generator" + }, + "/packages/angular/generators/scam-to-standalone": { + "description": "Convert an existing Single Component Angular Module (SCAM) to a Standalone Component.", + "file": "generated/packages/angular/generators/scam-to-standalone.json", + "hidden": false, + "name": "scam-to-standalone", + "originalFilePath": "/packages/angular/src/generators/scam-to-standalone/schema.json", + "path": "/packages/angular/generators/scam-to-standalone", + "type": "generator" + }, + "/packages/angular/generators/scam": { + "description": "Generate a component with an accompanying Single Component Angular Module (SCAM).", + "file": "generated/packages/angular/generators/scam.json", + "hidden": false, + "name": "scam", + "originalFilePath": "/packages/angular/src/generators/scam/schema.json", + "path": "/packages/angular/generators/scam", + "type": "generator" + }, + "/packages/angular/generators/scam-directive": { + "description": "Generate a directive with an accompanying Single Component Angular Module (SCAM).", + "file": "generated/packages/angular/generators/scam-directive.json", + "hidden": false, + "name": "scam-directive", + "originalFilePath": "/packages/angular/src/generators/scam-directive/schema.json", + "path": "/packages/angular/generators/scam-directive", + "type": "generator" + }, + "/packages/angular/generators/scam-pipe": { + "description": "Generate a pipe with an accompanying Single Component Angular Module (SCAM).", + "file": "generated/packages/angular/generators/scam-pipe.json", + "hidden": false, + "name": "scam-pipe", + "originalFilePath": "/packages/angular/src/generators/scam-pipe/schema.json", + "path": "/packages/angular/generators/scam-pipe", + "type": "generator" + }, + "/packages/angular/generators/setup-mf": { + "description": "Generate a Module Federation configuration for a given Angular application.", + "file": "generated/packages/angular/generators/setup-mf.json", + "hidden": false, + "name": "setup-mf", + "originalFilePath": "/packages/angular/src/generators/setup-mf/schema.json", + "path": "/packages/angular/generators/setup-mf", + "type": "generator" + }, + "/packages/angular/generators/setup-ssr": { + "description": "Generate Angular Universal (SSR) setup for an Angular application.", + "file": "generated/packages/angular/generators/setup-ssr.json", + "hidden": false, + "name": "setup-ssr", + "originalFilePath": "/packages/angular/src/generators/setup-ssr/schema.json", + "path": "/packages/angular/generators/setup-ssr", + "type": "generator" + }, + "/packages/angular/generators/setup-tailwind": { + "description": "Configures Tailwind CSS for an application or a buildable/publishable library.", + "file": "generated/packages/angular/generators/setup-tailwind.json", + "hidden": false, + "name": "setup-tailwind", + "originalFilePath": "/packages/angular/src/generators/setup-tailwind/schema.json", + "path": "/packages/angular/generators/setup-tailwind", + "type": "generator" + }, + "/packages/angular/generators/stories": { + "description": "Creates stories/specs for all components declared in a project.", + "file": "generated/packages/angular/generators/stories.json", + "hidden": false, + "name": "stories", + "originalFilePath": "/packages/angular/src/generators/stories/schema.json", + "path": "/packages/angular/generators/stories", + "type": "generator" + }, + "/packages/angular/generators/storybook-configuration": { + "description": "Adds Storybook configuration to a project.", + "file": "generated/packages/angular/generators/storybook-configuration.json", + "hidden": false, + "name": "storybook-configuration", + "originalFilePath": "/packages/angular/src/generators/storybook-configuration/schema.json", + "path": "/packages/angular/generators/storybook-configuration", + "type": "generator" + }, + "/packages/angular/generators/cypress-component-configuration": { + "description": "Setup Cypress component testing for a project.", + "file": "generated/packages/angular/generators/cypress-component-configuration.json", + "hidden": false, + "name": "cypress-component-configuration", + "originalFilePath": "/packages/angular/src/generators/cypress-component-configuration/schema.json", + "path": "/packages/angular/generators/cypress-component-configuration", + "type": "generator" + }, + "/packages/angular/generators/upgrade-module": { + "description": "Sets up an Upgrade Module.", + "file": "generated/packages/angular/generators/upgrade-module.json", + "hidden": false, + "name": "upgrade-module", + "originalFilePath": "/packages/angular/src/generators/upgrade-module/schema.json", + "path": "/packages/angular/generators/upgrade-module", + "type": "generator" + }, + "/packages/angular/generators/web-worker": { + "description": "Creates a Web Worker.", + "file": "generated/packages/angular/generators/web-worker.json", + "hidden": false, + "name": "web-worker", + "originalFilePath": "/packages/angular/src/generators/web-worker/schema.json", + "path": "/packages/angular/generators/web-worker", + "type": "generator" + }, + "/packages/angular/generators/change-storybook-targets": { + "description": "Change storybook targets for Angular projects to use @storybook/angular executors", + "file": "generated/packages/angular/generators/change-storybook-targets.json", + "hidden": false, + "name": "change-storybook-targets", + "originalFilePath": "/packages/angular/src/generators/change-storybook-targets/schema.json", + "path": "/packages/angular/generators/change-storybook-targets", + "type": "generator" + } + }, + "path": "/packages/angular" + }, + "cra-to-nx": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "cra-to-nx", + "packageName": "cra-to-nx", + "description": "This package will turn your React app into an Nx workspace. To use this package, your React app must have been generated and kept the structure of Create-React-App, with files generated either in js/jsx or ts/tsx.", + "documents": {}, + "root": "/packages/cra-to-nx", + "source": "/packages/cra-to-nx/src", + "executors": {}, + "generators": {}, + "path": "/packages/cra-to-nx" + }, + "create-nx-plugin": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "create-nx-plugin", + "packageName": "create-nx-plugin", + "description": "This package is used to scaffold a brand-new workspace used to develop an Nx plugin, and sets up a pre-configured plugin with the specified name. The new plugin is created with a default generator, executor, and e2e app.", + "documents": {}, + "root": "/packages/create-nx-plugin", + "source": "/packages/create-nx-plugin/src", + "executors": {}, + "generators": {}, + "path": "/packages/create-nx-plugin" + }, + "create-nx-workspace": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "create-nx-workspace", + "packageName": "create-nx-workspace", + "description": "Smart, Fast and Extensible Build System", + "documents": {}, + "root": "/packages/create-nx-workspace", + "source": "/packages/create-nx-workspace/src", + "executors": {}, + "generators": {}, + "path": "/packages/create-nx-workspace" + }, + "cypress": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "cypress", + "packageName": "@nrwl/cypress", + "description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.", + "documents": { + "/packages/cypress/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.", + "file": "generated/packages/cypress/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/cypress/documents/overview", + "tags": [], + "originalFilePath": "shared/cypress-plugin" + }, + "/packages/cypress/documents/cypress-component-testing": { + "id": "cypress-component-testing", + "name": "Component Testing", + "description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.", + "file": "generated/packages/cypress/documents/cypress-component-testing", + "itemList": [], + "isExternal": false, + "path": "/packages/cypress/documents/cypress-component-testing", + "tags": [], + "originalFilePath": "shared/guides/cypress/cypress-component-testing" + }, + "/packages/cypress/documents/v11-migration-guide": { + "id": "v11-migration-guide", + "name": "v11 Migration Guide", + "description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.", + "file": "generated/packages/cypress/documents/v11-migration-guide", + "itemList": [], + "isExternal": false, + "path": "/packages/cypress/documents/v11-migration-guide", + "tags": [], + "originalFilePath": "shared/guides/cypress/cypress-v11-migration" + } + }, + "root": "/packages/cypress", + "source": "/packages/cypress/src", + "executors": { + "/packages/cypress/executors/cypress": { + "description": "Run Cypress E2E tests.", + "file": "generated/packages/cypress/executors/cypress.json", + "hidden": false, + "name": "cypress", + "originalFilePath": "/packages/cypress/src/executors/cypress/schema.json", + "path": "/packages/cypress/executors/cypress", + "type": "executor" + } + }, + "generators": { + "/packages/cypress/generators/init": { + "description": "Initialize the `@nrwl/cypress` plugin.", + "file": "generated/packages/cypress/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/cypress/src/generators/init/schema.json", + "path": "/packages/cypress/generators/init", + "type": "generator" + }, + "/packages/cypress/generators/cypress-project": { + "description": "Add a Cypress E2E Project.", + "file": "generated/packages/cypress/generators/cypress-project.json", + "hidden": true, + "name": "cypress-project", + "originalFilePath": "/packages/cypress/src/generators/cypress-project/schema.json", + "path": "/packages/cypress/generators/cypress-project", + "type": "generator" + }, + "/packages/cypress/generators/cypress-component-project": { + "description": "Set up Cypress Component Test for a project", + "file": "generated/packages/cypress/generators/cypress-component-project.json", + "hidden": true, + "name": "cypress-component-project", + "originalFilePath": "/packages/cypress/src/generators/cypress-component-project/schema.json", + "path": "/packages/cypress/generators/cypress-component-project", + "type": "generator" + }, + "/packages/cypress/generators/migrate-to-cypress-11": { + "description": "Migrate existing Cypress e2e projects to Cypress v11", + "file": "generated/packages/cypress/generators/migrate-to-cypress-11.json", + "hidden": false, + "name": "migrate-to-cypress-11", + "originalFilePath": "/packages/cypress/src/generators/migrate-to-cypress-11/schema.json", + "path": "/packages/cypress/generators/migrate-to-cypress-11", + "type": "generator" + } + }, + "path": "/packages/cypress" + }, + "detox": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "detox", + "packageName": "@nrwl/detox", + "description": "The Nx Plugin for Detox contains executors and generators for allowing your workspace to use the powerful Detox integration testing capabilities.", + "documents": { + "/packages/detox/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for Detox contains executors and generators for allowing your workspace to use the powerful Detox integration testing capabilities.", + "file": "generated/packages/detox/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/detox/documents/overview", + "tags": [], + "originalFilePath": "shared/detox-plugin" + } + }, + "root": "/packages/detox", + "source": "/packages/detox/src", + "executors": { + "/packages/detox/executors/build": { + "description": "Run the command defined in build property of the specified configuration.", + "file": "generated/packages/detox/executors/build.json", + "hidden": false, + "name": "build", + "originalFilePath": "/packages/detox/src/executors/build/schema.json", + "path": "/packages/detox/executors/build", + "type": "executor" + }, + "/packages/detox/executors/test": { + "description": "Initiating your detox test suite.", + "file": "generated/packages/detox/executors/test.json", + "hidden": false, + "name": "test", + "originalFilePath": "/packages/detox/src/executors/test/schema.json", + "path": "/packages/detox/executors/test", + "type": "executor" + } + }, + "generators": { + "/packages/detox/generators/init": { + "description": "Initialize the `@nrwl/detox` plugin.", + "file": "generated/packages/detox/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/detox/src/generators/init/schema.json", + "path": "/packages/detox/generators/init", + "type": "generator" + }, + "/packages/detox/generators/application": { + "description": "Create a Detox application.", + "file": "generated/packages/detox/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/detox/src/generators/application/schema.json", + "path": "/packages/detox/generators/application", + "type": "generator" + } + }, + "path": "/packages/detox" + }, + "devkit": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "devkit", + "packageName": "@nrwl/devkit", + "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more.", + "documents": { + "/packages/devkit/documents/index": { + "id": "index", + "name": "Overview", + "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more.", + "file": "generated/packages/devkit/documents/index", + "itemList": [], + "isExternal": false, + "path": "/packages/devkit/documents/index", + "tags": [], + "originalFilePath": "generated/devkit/index" + }, + "/packages/devkit/documents/ngcli_adapter": { + "id": "ngcli_adapter", + "name": "Ng CLI Adapter", + "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more.", + "file": "generated/packages/devkit/documents/ngcli_adapter", + "itemList": [], + "isExternal": false, + "path": "/packages/devkit/documents/ngcli_adapter", + "tags": [], + "originalFilePath": "generated/devkit/ngcli_adapter" + } + }, + "root": "/packages/devkit", + "source": "/packages/devkit/src", + "executors": {}, + "generators": {}, + "path": "/packages/devkit" + }, + "esbuild": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "esbuild", + "packageName": "@nrwl/esbuild", + "description": "The Nx Plugin for esbuild contains executors and generators that support building applications using esbuild", + "documents": { + "/packages/esbuild/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for esbuild contains executors and generators that support building applications using esbuild", + "file": "generated/packages/esbuild/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/esbuild/documents/overview", + "tags": [], + "originalFilePath": "shared/esbuild-plugin" + } + }, + "root": "/packages/esbuild", + "source": "/packages/esbuild/src", + "executors": { + "/packages/esbuild/executors/esbuild": { + "description": "Bundle a package using EsBuild.", + "file": "generated/packages/esbuild/executors/esbuild.json", + "hidden": false, + "name": "esbuild", + "originalFilePath": "/packages/esbuild/src/executors/esbuild/schema.json", + "path": "/packages/esbuild/executors/esbuild", + "type": "executor" + } + }, + "generators": { + "/packages/esbuild/generators/init": { + "description": "Initialize the `@nrwl/esbuild` plugin.", + "file": "generated/packages/esbuild/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/esbuild/src/generators/init/schema.json", + "path": "/packages/esbuild/generators/init", + "type": "generator" + }, + "/packages/esbuild/generators/esbuild-project": { + "description": "Add esbuild configuration to a project.", + "file": "generated/packages/esbuild/generators/esbuild-project.json", + "hidden": true, + "name": "esbuild-project", + "originalFilePath": "/packages/esbuild/src/generators/esbuild-project/schema.json", + "path": "/packages/esbuild/generators/esbuild-project", + "type": "generator" + } + }, + "path": "/packages/esbuild" + }, + "eslint-plugin-nx": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "eslint-plugin-nx", + "packageName": "@nrwl/eslint-plugin-nx", + "description": "The ESLint Plugin for Nx contains a collection of recommended ESLint rule configurations wrapped as ESLint plugins and an Nx specific enforce-module-boundaries rule.", + "documents": { + "/packages/eslint-plugin-nx/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The ESLint Plugin for Nx contains a collection of recommended ESLint rule configurations wrapped as ESLint plugins and an Nx specific enforce-module-boundaries rule.", + "file": "generated/packages/eslint-plugin-nx/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/eslint-plugin-nx/documents/overview", + "tags": [], + "originalFilePath": "shared/eslint-plugin-nx" + } + }, + "root": "/packages/eslint-plugin-nx", + "source": "/packages/eslint-plugin-nx/src", + "executors": {}, + "generators": {}, + "path": "/packages/eslint-plugin-nx" + }, + "expo": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "expo", + "packageName": "@nrwl/expo", + "description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.", + "documents": {}, + "root": "/packages/expo", + "source": "/packages/expo/src", + "executors": { + "/packages/expo/executors/update": { + "description": "Start an EAS update for your expo project", + "file": "generated/packages/expo/executors/update.json", + "hidden": false, + "name": "update", + "originalFilePath": "/packages/expo/src/executors/update/schema.json", + "path": "/packages/expo/executors/update", + "type": "executor" + }, + "/packages/expo/executors/build": { + "description": "Start an EAS build for your expo project", + "file": "generated/packages/expo/executors/build.json", + "hidden": false, + "name": "build", + "originalFilePath": "/packages/expo/src/executors/build/schema.json", + "path": "/packages/expo/executors/build", + "type": "executor" + }, + "/packages/expo/executors/build-list": { + "description": "List all EAS builds for your Expo project", + "file": "generated/packages/expo/executors/build-list.json", + "hidden": false, + "name": "build-list", + "originalFilePath": "/packages/expo/src/executors/build-list/schema.json", + "path": "/packages/expo/executors/build-list", + "type": "executor" + }, + "/packages/expo/executors/download": { + "description": "Download an EAS build", + "file": "generated/packages/expo/executors/download.json", + "hidden": false, + "name": "download", + "originalFilePath": "/packages/expo/src/executors/download/schema.json", + "path": "/packages/expo/executors/download", + "type": "executor" + }, + "/packages/expo/executors/build-ios": { + "description": "Build and sign a standalone IPA for the Apple App Store", + "file": "generated/packages/expo/executors/build-ios.json", + "hidden": false, + "name": "build-ios", + "originalFilePath": "/packages/expo/src/executors/build-ios/schema.json", + "path": "/packages/expo/executors/build-ios", + "type": "executor" + }, + "/packages/expo/executors/build-android": { + "description": "Build and sign a standalone APK or App Bundle for the Google Play Store", + "file": "generated/packages/expo/executors/build-android.json", + "hidden": false, + "name": "build-android", + "originalFilePath": "/packages/expo/src/executors/build-android/schema.json", + "path": "/packages/expo/executors/build-android", + "type": "executor" + }, + "/packages/expo/executors/build-web": { + "description": "Build the web app for production", + "file": "generated/packages/expo/executors/build-web.json", + "hidden": false, + "name": "build-web", + "originalFilePath": "/packages/expo/src/executors/build-web/schema.json", + "path": "/packages/expo/executors/build-web", + "type": "executor" + }, + "/packages/expo/executors/build-status": { + "description": "Get the status of the latest build for the project", + "file": "generated/packages/expo/executors/build-status.json", + "hidden": false, + "name": "build-status", + "originalFilePath": "/packages/expo/src/executors/build-status/schema.json", + "path": "/packages/expo/executors/build-status", + "type": "executor" + }, + "/packages/expo/executors/publish": { + "description": "Deploy a project to Expo hosting", + "file": "generated/packages/expo/executors/publish.json", + "hidden": false, + "name": "publish", + "originalFilePath": "/packages/expo/src/executors/publish/schema.json", + "path": "/packages/expo/executors/publish", + "type": "executor" + }, + "/packages/expo/executors/publish-set": { + "description": "Specify the channel to serve a published release", + "file": "generated/packages/expo/executors/publish-set.json", + "hidden": false, + "name": "publish-set", + "originalFilePath": "/packages/expo/src/executors/publish-set/schema.json", + "path": "/packages/expo/executors/publish-set", + "type": "executor" + }, + "/packages/expo/executors/rollback": { + "description": "Undo an update to a channel", + "file": "generated/packages/expo/executors/rollback.json", + "hidden": false, + "name": "rollback", + "originalFilePath": "/packages/expo/src/executors/rollback/schema.json", + "path": "/packages/expo/executors/rollback", + "type": "executor" + }, + "/packages/expo/executors/run": { + "description": "Run the Android app binary locally or run the iOS app binary locally", + "file": "generated/packages/expo/executors/run.json", + "hidden": false, + "name": "run", + "originalFilePath": "/packages/expo/src/executors/run/schema.json", + "path": "/packages/expo/executors/run", + "type": "executor" + }, + "/packages/expo/executors/start": { + "description": "Start a local dev server for the app or start a Webpack dev server for the web app", + "file": "generated/packages/expo/executors/start.json", + "hidden": false, + "name": "start", + "originalFilePath": "/packages/expo/src/executors/start/schema.json", + "path": "/packages/expo/executors/start", + "type": "executor" + }, + "/packages/expo/executors/sync-deps": { + "description": "Syncs dependencies to package.json (required for autolinking).", + "file": "generated/packages/expo/executors/sync-deps.json", + "hidden": false, + "name": "sync-deps", + "originalFilePath": "/packages/expo/src/executors/sync-deps/schema.json", + "path": "/packages/expo/executors/sync-deps", + "type": "executor" + }, + "/packages/expo/executors/ensure-symlink": { + "description": "Ensure workspace node_modules is symlink under app's node_modules folder.", + "file": "generated/packages/expo/executors/ensure-symlink.json", + "hidden": false, + "name": "ensure-symlink", + "originalFilePath": "/packages/expo/src/executors/ensure-symlink/schema.json", + "path": "/packages/expo/executors/ensure-symlink", + "type": "executor" + }, + "/packages/expo/executors/prebuild": { + "description": "Create native iOS and Android project files for building natively.", + "file": "generated/packages/expo/executors/prebuild.json", + "hidden": false, + "name": "prebuild", + "originalFilePath": "/packages/expo/src/executors/prebuild/schema.json", + "path": "/packages/expo/executors/prebuild", + "type": "executor" + }, + "/packages/expo/executors/install": { + "description": "Install a module or other package to a project.", + "file": "generated/packages/expo/executors/install.json", + "hidden": false, + "name": "install", + "originalFilePath": "/packages/expo/src/executors/install/schema.json", + "path": "/packages/expo/executors/install", + "type": "executor" + }, + "/packages/expo/executors/export": { + "description": "Export the JavaScript and assets for your app using Metro/webpack bundler", + "file": "generated/packages/expo/executors/export.json", + "hidden": false, + "name": "export", + "originalFilePath": "/packages/expo/src/executors/export/schema.json", + "path": "/packages/expo/executors/export", + "type": "executor" + } + }, + "generators": { + "/packages/expo/generators/init": { + "description": "Initialize the @nrwl/expo plugin", + "file": "generated/packages/expo/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/expo/src/generators/init/schema.json", + "path": "/packages/expo/generators/init", + "type": "generator" + }, + "/packages/expo/generators/application": { + "description": "Create an application", + "file": "generated/packages/expo/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/expo/src/generators/application/schema.json", + "path": "/packages/expo/generators/application", + "type": "generator" + }, + "/packages/expo/generators/library": { + "description": "Create a library", + "file": "generated/packages/expo/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/expo/src/generators/library/schema.json", + "path": "/packages/expo/generators/library", + "type": "generator" + }, + "/packages/expo/generators/component": { + "description": "Create a component", + "file": "generated/packages/expo/generators/component.json", + "hidden": false, + "name": "component", + "originalFilePath": "/packages/expo/src/generators/component/schema.json", + "path": "/packages/expo/generators/component", + "type": "generator" + } + }, + "path": "/packages/expo" + }, + "express": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "express", + "packageName": "@nrwl/express", + "description": "The Nx Plugin for Express contains executors and generators for allowing your workspace to create powerful Express Node applications and APIs.", + "documents": { + "/packages/express/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for Express contains executors and generators for allowing your workspace to create powerful Express Node applications and APIs.", + "file": "generated/packages/express/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/express/documents/overview", + "tags": [], + "originalFilePath": "shared/express-plugin" + } + }, + "root": "/packages/express", + "source": "/packages/express/src", + "executors": {}, + "generators": { + "/packages/express/generators/init": { + "description": "Initialize the `@nrwl/express` plugin.", + "file": "generated/packages/express/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/express/src/generators/init/schema.json", + "path": "/packages/express/generators/init", + "type": "generator" + }, + "/packages/express/generators/application": { + "description": "Create an Express application.", + "file": "generated/packages/express/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/express/src/generators/application/schema.json", + "path": "/packages/express/generators/application", + "type": "generator" + } + }, + "path": "/packages/express" + }, + "jest": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "jest", + "packageName": "@nrwl/jest", + "description": "The Nx Plugin for Jest contains executors and generators allowing your workspace to use the powerful Jest testing capabilities.", + "documents": { + "/packages/jest/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for Jest contains executors and generators allowing your workspace to use the powerful Jest testing capabilities.", + "file": "generated/packages/jest/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/jest/documents/overview", + "tags": [], + "originalFilePath": "shared/jest-plugin" + } + }, + "root": "/packages/jest", + "source": "/packages/jest/src", + "executors": { + "/packages/jest/executors/jest": { + "description": "Run Jest unit tests.", + "file": "generated/packages/jest/executors/jest.json", + "hidden": false, + "name": "jest", + "originalFilePath": "/packages/jest/src/executors/jest/schema.json", + "path": "/packages/jest/executors/jest", + "type": "executor" + } + }, + "generators": { + "/packages/jest/generators/init": { + "description": "Initialize the `@nrwl/jest` plugin.", + "file": "generated/packages/jest/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/jest/src/generators/init/schema.json", + "path": "/packages/jest/generators/init", + "type": "generator" + }, + "/packages/jest/generators/jest-project": { + "description": "Add Jest configuration to a project.", + "file": "generated/packages/jest/generators/jest-project.json", + "hidden": true, + "name": "jest-project", + "originalFilePath": "/packages/jest/src/generators/jest-project/schema.json", + "path": "/packages/jest/generators/jest-project", + "type": "generator" + } + }, + "path": "/packages/jest" + }, + "js": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "js", + "packageName": "@nrwl/js", + "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ", + "documents": { + "/packages/js/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ", + "file": "generated/packages/js/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/js/documents/overview", + "tags": [], + "originalFilePath": "shared/js-plugin" + } + }, + "root": "/packages/js", + "source": "/packages/js/src", + "executors": { + "/packages/js/executors/tsc": { + "description": "Build a project using TypeScript.", + "file": "generated/packages/js/executors/tsc.json", + "hidden": false, + "name": "tsc", + "originalFilePath": "/packages/js/src/executors/tsc/schema.json", + "path": "/packages/js/executors/tsc", + "type": "executor" + }, + "/packages/js/executors/swc": { + "description": "Build a project using SWC.", + "file": "generated/packages/js/executors/swc.json", + "hidden": false, + "name": "swc", + "originalFilePath": "/packages/js/src/executors/swc/schema.json", + "path": "/packages/js/executors/swc", + "type": "executor" + }, + "/packages/js/executors/node": { + "description": "Execute a Node application.", + "file": "generated/packages/js/executors/node.json", + "hidden": false, + "name": "node", + "originalFilePath": "/packages/js/src/executors/node/schema.json", + "path": "/packages/js/executors/node", + "type": "executor" + } + }, + "generators": { + "/packages/js/generators/library": { + "description": "Create a library", + "file": "generated/packages/js/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/js/src/generators/library/schema.json", + "path": "/packages/js/generators/library", + "type": "generator" + }, + "/packages/js/generators/init": { + "description": "Init placeholder.", + "file": "generated/packages/js/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/js/src/generators/init/schema.json", + "path": "/packages/js/generators/init", + "type": "generator" + }, + "/packages/js/generators/convert-to-swc": { + "description": "Convert a TypeScript library to compile with SWC.", + "file": "generated/packages/js/generators/convert-to-swc.json", + "hidden": false, + "name": "convert-to-swc", + "originalFilePath": "/packages/js/src/generators/convert-to-swc/schema.json", + "path": "/packages/js/generators/convert-to-swc", + "type": "generator" + } + }, + "path": "/packages/js" + }, + "linter": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "linter", + "packageName": "@nrwl/linter", + "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", + "documents": { + "/packages/linter/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", + "file": "generated/packages/linter/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/linter/documents/overview", + "tags": [], + "originalFilePath": "shared/linter-plugin" + }, + "/packages/linter/documents/eslint-plugin-nx": { + "id": "eslint-plugin-nx", + "name": "eslint-plugin-nx", + "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", + "file": "generated/packages/linter/documents/eslint-plugin-nx", + "itemList": [], + "isExternal": false, + "path": "/packages/linter/documents/eslint-plugin-nx", + "tags": [], + "originalFilePath": "shared/eslint-plugin-nx" + } + }, + "root": "/packages/linter", + "source": "/packages/linter/src", + "executors": { + "/packages/linter/executors/eslint": { + "description": "Run ESLint on a project.", + "file": "generated/packages/linter/executors/eslint.json", + "hidden": false, + "name": "eslint", + "originalFilePath": "/packages/linter/src/executors/eslint/schema.json", + "path": "/packages/linter/executors/eslint", + "type": "executor" + } + }, + "generators": { + "/packages/linter/generators/workspace-rules-project": { + "description": "Create the Workspace Lint Rules Project.", + "file": "generated/packages/linter/generators/workspace-rules-project.json", + "hidden": true, + "name": "workspace-rules-project", + "originalFilePath": "/packages/linter/src/generators/workspace-rules-project/schema.json", + "path": "/packages/linter/generators/workspace-rules-project", + "type": "generator" + }, + "/packages/linter/generators/workspace-rule": { + "description": "Create a new Workspace ESLint rule.", + "file": "generated/packages/linter/generators/workspace-rule.json", + "hidden": false, + "name": "workspace-rule", + "originalFilePath": "/packages/linter/src/generators/workspace-rule/schema.json", + "path": "/packages/linter/generators/workspace-rule", + "type": "generator" + } + }, + "path": "/packages/linter" + }, + "make-angular-cli-faster": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "make-angular-cli-faster", + "packageName": "make-angular-cli-faster", + "description": "Make Angular CLI faster by enabling distributed computation caching", + "documents": {}, + "root": "/packages/make-angular-cli-faster", + "source": "/packages/make-angular-cli-faster/src", + "executors": {}, + "generators": {}, + "path": "/packages/make-angular-cli-faster" + }, + "nest": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "nest", + "packageName": "@nrwl/nest", + "description": "The Nx Plugin for Nest contains executors and generators for allowing your workspace to create powerful Nest best in class APIs.", + "documents": { + "/packages/nest/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for Nest contains executors and generators for allowing your workspace to create powerful Nest best in class APIs.", + "file": "generated/packages/nest/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/nest/documents/overview", + "tags": [], + "originalFilePath": "shared/nest-plugin" + } + }, + "root": "/packages/nest", + "source": "/packages/nest/src", + "executors": {}, + "generators": { + "/packages/nest/generators/application": { + "description": "Create a NestJS application.", + "file": "generated/packages/nest/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/nest/src/generators/application/schema.json", + "path": "/packages/nest/generators/application", + "type": "generator" + }, + "/packages/nest/generators/convert-tslint-to-eslint": { + "description": "Convert a project from TSLint to ESLint.", + "file": "generated/packages/nest/generators/convert-tslint-to-eslint.json", + "hidden": false, + "name": "convert-tslint-to-eslint", + "originalFilePath": "/packages/nest/src/generators/convert-tslint-to-eslint/schema.json", + "path": "/packages/nest/generators/convert-tslint-to-eslint", + "type": "generator" + }, + "/packages/nest/generators/init": { + "description": "Initialize the `@nrwl/nest` plugin.", + "file": "generated/packages/nest/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/nest/src/generators/init/schema.json", + "path": "/packages/nest/generators/init", + "type": "generator" + }, + "/packages/nest/generators/library": { + "description": "Create a new NestJS library.", + "file": "generated/packages/nest/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/nest/src/generators/library/schema.json", + "path": "/packages/nest/generators/library", + "type": "generator" + }, + "/packages/nest/generators/class": { + "description": "Run the `class` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/class.json", + "hidden": false, + "name": "class", + "originalFilePath": "/packages/nest/src/generators/class/schema.json", + "path": "/packages/nest/generators/class", + "type": "generator" + }, + "/packages/nest/generators/controller": { + "description": "Run the `controller` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/controller.json", + "hidden": false, + "name": "controller", + "originalFilePath": "/packages/nest/src/generators/controller/schema.json", + "path": "/packages/nest/generators/controller", + "type": "generator" + }, + "/packages/nest/generators/decorator": { + "description": "Run the `decorator` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/decorator.json", + "hidden": false, + "name": "decorator", + "originalFilePath": "/packages/nest/src/generators/decorator/schema.json", + "path": "/packages/nest/generators/decorator", + "type": "generator" + }, + "/packages/nest/generators/filter": { + "description": "Run the `filter` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/filter.json", + "hidden": false, + "name": "filter", + "originalFilePath": "/packages/nest/src/generators/filter/schema.json", + "path": "/packages/nest/generators/filter", + "type": "generator" + }, + "/packages/nest/generators/gateway": { + "description": "Run the `gateway` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/gateway.json", + "hidden": false, + "name": "gateway", + "originalFilePath": "/packages/nest/src/generators/gateway/schema.json", + "path": "/packages/nest/generators/gateway", + "type": "generator" + }, + "/packages/nest/generators/guard": { + "description": "Run the `guard` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/guard.json", + "hidden": false, + "name": "guard", + "originalFilePath": "/packages/nest/src/generators/guard/schema.json", + "path": "/packages/nest/generators/guard", + "type": "generator" + }, + "/packages/nest/generators/interceptor": { + "description": "Run the `interceptor` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/interceptor.json", + "hidden": false, + "name": "interceptor", + "originalFilePath": "/packages/nest/src/generators/interceptor/schema.json", + "path": "/packages/nest/generators/interceptor", + "type": "generator" + }, + "/packages/nest/generators/interface": { + "description": "Run the `interface` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/interface.json", + "hidden": false, + "name": "interface", + "originalFilePath": "/packages/nest/src/generators/interface/schema.json", + "path": "/packages/nest/generators/interface", + "type": "generator" + }, + "/packages/nest/generators/middleware": { + "description": "Run the `middleware` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/middleware.json", + "hidden": false, + "name": "middleware", + "originalFilePath": "/packages/nest/src/generators/middleware/schema.json", + "path": "/packages/nest/generators/middleware", + "type": "generator" + }, + "/packages/nest/generators/module": { + "description": "Run the `module` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/module.json", + "hidden": false, + "name": "module", + "originalFilePath": "/packages/nest/src/generators/module/schema.json", + "path": "/packages/nest/generators/module", + "type": "generator" + }, + "/packages/nest/generators/pipe": { + "description": "Run the `pipe` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/pipe.json", + "hidden": false, + "name": "pipe", + "originalFilePath": "/packages/nest/src/generators/pipe/schema.json", + "path": "/packages/nest/generators/pipe", + "type": "generator" + }, + "/packages/nest/generators/provider": { + "description": "Run the `provider` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/provider.json", + "hidden": false, + "name": "provider", + "originalFilePath": "/packages/nest/src/generators/provider/schema.json", + "path": "/packages/nest/generators/provider", + "type": "generator" + }, + "/packages/nest/generators/resolver": { + "description": "Run the `resolver` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/resolver.json", + "hidden": false, + "name": "resolver", + "originalFilePath": "/packages/nest/src/generators/resolver/schema.json", + "path": "/packages/nest/generators/resolver", + "type": "generator" + }, + "/packages/nest/generators/resource": { + "description": "Run the `resource` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/resource.json", + "hidden": false, + "name": "resource", + "originalFilePath": "/packages/nest/src/generators/resource/schema.json", + "path": "/packages/nest/generators/resource", + "type": "generator" + }, + "/packages/nest/generators/service": { + "description": "Run the `service` NestJS generator with Nx project support.", + "file": "generated/packages/nest/generators/service.json", + "hidden": false, + "name": "service", + "originalFilePath": "/packages/nest/src/generators/service/schema.json", + "path": "/packages/nest/generators/service", + "type": "generator" + } + }, + "path": "/packages/nest" + }, + "next": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "next", + "packageName": "@nrwl/next", + "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", + "documents": { + "/packages/next/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", + "file": "generated/packages/next/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/next/documents/overview", + "tags": [], + "originalFilePath": "shared/next-plugin" + } + }, + "root": "/packages/next", + "source": "/packages/next/src", + "executors": { + "/packages/next/executors/build": { + "description": "Build a Next.js application.", + "file": "generated/packages/next/executors/build.json", + "hidden": false, + "name": "build", + "originalFilePath": "/packages/next/src/executors/build/schema.json", + "path": "/packages/next/executors/build", + "type": "executor" + }, + "/packages/next/executors/server": { + "description": "Serve a Next.js application.", + "file": "generated/packages/next/executors/server.json", + "hidden": false, + "name": "server", + "originalFilePath": "/packages/next/src/executors/server/schema.json", + "path": "/packages/next/executors/server", + "type": "executor" + }, + "/packages/next/executors/export": { + "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`.", + "file": "generated/packages/next/executors/export.json", + "hidden": false, + "name": "export", + "originalFilePath": "/packages/next/src/executors/export/schema.json", + "path": "/packages/next/executors/export", + "type": "executor" + } + }, + "generators": { + "/packages/next/generators/init": { + "description": "Initialize the `@nrwl/next` plugin.", + "file": "generated/packages/next/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/next/src/generators/init/schema.json", + "path": "/packages/next/generators/init", + "type": "generator" + }, + "/packages/next/generators/application": { + "description": "Create an application.", + "file": "generated/packages/next/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/next/src/generators/application/schema.json", + "path": "/packages/next/generators/application", + "type": "generator" + }, + "/packages/next/generators/page": { + "description": "Create a page.", + "file": "generated/packages/next/generators/page.json", + "hidden": false, + "name": "page", + "originalFilePath": "/packages/next/src/generators/page/schema.json", + "path": "/packages/next/generators/page", + "type": "generator" + }, + "/packages/next/generators/component": { + "description": "Create a component.", + "file": "generated/packages/next/generators/component.json", + "hidden": false, + "name": "component", + "originalFilePath": "/packages/next/src/generators/component/schema.json", + "path": "/packages/next/generators/component", + "type": "generator" + }, + "/packages/next/generators/library": { + "description": "Create a library.", + "file": "generated/packages/next/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/next/src/generators/library/schema.json", + "path": "/packages/next/generators/library", + "type": "generator" + }, + "/packages/next/generators/custom-server": { + "description": "Set up a custom server.", + "file": "generated/packages/next/generators/custom-server.json", + "hidden": false, + "name": "custom-server", + "originalFilePath": "/packages/next/src/generators/custom-server/schema.json", + "path": "/packages/next/generators/custom-server", + "type": "generator" + } + }, + "path": "/packages/next" + }, + "node": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "node", + "packageName": "@nrwl/node", + "description": "The Node Plugin for Nx contains generators and executors to manage Node applications within an Nx workspace.", + "documents": { + "/packages/node/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Node Plugin for Nx contains generators and executors to manage Node applications within an Nx workspace.", + "file": "generated/packages/node/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/node/documents/overview", + "tags": [], + "originalFilePath": "shared/node-plugin" + } + }, + "root": "/packages/node", + "source": "/packages/node/src", + "executors": { + "/packages/node/executors/webpack": { + "description": "Build a Node application using Webpack.", + "file": "generated/packages/node/executors/webpack.json", + "hidden": false, + "name": "webpack", + "originalFilePath": "/packages/node/src/executors/webpack/schema.json", + "path": "/packages/node/executors/webpack", + "type": "executor" + }, + "/packages/node/executors/node": { + "description": "Execute a Node application.", + "file": "generated/packages/node/executors/node.json", + "hidden": false, + "name": "node", + "originalFilePath": "/packages/node/src/executors/node/schema.json", + "path": "/packages/node/executors/node", + "type": "executor" + } + }, + "generators": { + "/packages/node/generators/init": { + "description": "Initialize the `@nrwl/node` plugin.", + "file": "generated/packages/node/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/node/src/generators/init/schema.json", + "path": "/packages/node/generators/init", + "type": "generator" + }, + "/packages/node/generators/application": { + "description": "Create a node application.", + "file": "generated/packages/node/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/node/src/generators/application/schema.json", + "path": "/packages/node/generators/application", + "type": "generator" + }, + "/packages/node/generators/library": { + "description": "Create a node library.", + "file": "generated/packages/node/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/node/src/generators/library/schema.json", + "path": "/packages/node/generators/library", + "type": "generator" + } + }, + "path": "/packages/node" + }, + "nx": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "nx", + "packageName": "nx", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "documents": { + "/packages/nx/documents/create-nx-workspace": { + "id": "create-nx-workspace", + "name": "create-nx-workspace", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/create-nx-workspace", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/create-nx-workspace", + "tags": [], + "originalFilePath": "generated/cli/create-nx-workspace" + }, + "/packages/nx/documents/init": { + "id": "init", + "name": "init", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/init", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/init", + "tags": [], + "originalFilePath": "generated/cli/init" + }, + "/packages/nx/documents/generate": { + "id": "generate", + "name": "generate", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/generate", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/generate", + "tags": ["use-code-generators"], + "originalFilePath": "generated/cli/generate" + }, + "/packages/nx/documents/run": { + "id": "run", + "name": "run", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/run", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/run", + "tags": ["run-tasks", "use-task-executors"], + "originalFilePath": "generated/cli/run" + }, + "/packages/nx/documents/daemon": { + "id": "daemon", + "name": "daemon", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/daemon", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/daemon", + "tags": [], + "originalFilePath": "generated/cli/daemon" + }, + "/packages/nx/documents/dep-graph": { + "id": "dep-graph", + "name": "graph", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/dep-graph", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/dep-graph", + "tags": ["explore-graph"], + "originalFilePath": "generated/cli/graph" + }, + "/packages/nx/documents/run-many": { + "id": "run-many", + "name": "run-many", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/run-many", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/run-many", + "tags": ["run-tasks", "use-task-executors"], + "originalFilePath": "generated/cli/run-many" + }, + "/packages/nx/documents/affected": { + "id": "affected", + "name": "affected", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/affected", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/affected", + "tags": ["run-tasks", "use-task-executors"], + "originalFilePath": "generated/cli/affected" + }, + "/packages/nx/documents/affected-dep-graph": { + "id": "affected-dep-graph", + "name": "affected:graph", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/affected-dep-graph", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/affected-dep-graph", + "tags": [], + "originalFilePath": "generated/cli/affected-graph" + }, + "/packages/nx/documents/affected-apps": { + "id": "affected-apps", + "name": "affected:apps", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/affected-apps", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/affected-apps", + "tags": [], + "originalFilePath": "generated/cli/affected-apps" + }, + "/packages/nx/documents/affected-libs": { + "id": "affected-libs", + "name": "affected:libs", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/affected-libs", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/affected-libs", + "tags": [], + "originalFilePath": "generated/cli/affected-libs" + }, + "/packages/nx/documents/print-affected": { + "id": "print-affected", + "name": "print-affected", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/print-affected", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/print-affected", + "tags": [], + "originalFilePath": "generated/cli/print-affected" + }, + "/packages/nx/documents/format-check": { + "id": "format-check", + "name": "format:check", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/format-check", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/format-check", + "tags": ["enforce-project-boundaries"], + "originalFilePath": "generated/cli/format-check" + }, + "/packages/nx/documents/format-write": { + "id": "format-write", + "name": "format:write", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/format-write", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/format-write", + "tags": ["enforce-project-boundaries"], + "originalFilePath": "generated/cli/format-write" + }, + "/packages/nx/documents/migrate": { + "id": "migrate", + "name": "migrate", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/migrate", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/migrate", + "tags": ["automate-updating-dependencies"], + "originalFilePath": "generated/cli/migrate" + }, + "/packages/nx/documents/report": { + "id": "report", + "name": "report", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/report", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/report", + "tags": [], + "originalFilePath": "generated/cli/report" + }, + "/packages/nx/documents/list": { + "id": "list", + "name": "list", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/list", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/list", + "tags": [], + "originalFilePath": "generated/cli/list" + }, + "/packages/nx/documents/workspace-lint": { + "id": "workspace-lint", + "name": "workspace-lint", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/workspace-lint", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/workspace-lint", + "tags": ["enforce-project-boundaries"], + "originalFilePath": "generated/cli/workspace-lint" + }, + "/packages/nx/documents/workspace-generator": { + "id": "workspace-generator", + "name": "workspace-generator", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/workspace-generator", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/workspace-generator", + "tags": [], + "originalFilePath": "generated/cli/workspace-generator" + }, + "/packages/nx/documents/connect-to-nx-cloud": { + "id": "connect-to-nx-cloud", + "name": "connect-to-nx-cloud", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/connect-to-nx-cloud", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/connect-to-nx-cloud", + "tags": ["cache-task-results", "distribute-task-execution"], + "originalFilePath": "generated/cli/connect" + }, + "/packages/nx/documents/reset": { + "id": "reset", + "name": "reset", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/reset", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/reset", + "tags": ["cache-task-results"], + "originalFilePath": "generated/cli/reset" + }, + "/packages/nx/documents/repair": { + "id": "repair", + "name": "repair", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/repair", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/repair", + "tags": [], + "originalFilePath": "generated/cli/repair" + }, + "/packages/nx/documents/exec": { + "id": "exec", + "name": "exec", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/exec", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/exec", + "tags": [], + "originalFilePath": "generated/cli/exec" + }, + "/packages/nx/documents/watch": { + "id": "watch", + "name": "watch", + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/nx/documents/watch", + "itemList": [], + "isExternal": false, + "path": "/packages/nx/documents/watch", + "tags": ["workspace-watching"], + "originalFilePath": "generated/cli/watch" + } + }, + "root": "/packages/nx", + "source": "/packages/nx/src", + "executors": { + "/packages/nx/executors/noop": { + "description": "An executor that does nothing", + "file": "generated/packages/nx/executors/noop.json", + "hidden": false, + "name": "noop", + "originalFilePath": "/packages/nx/src/executors/noop/schema.json", + "path": "/packages/nx/executors/noop", + "type": "executor" + }, + "/packages/nx/executors/run-commands": { + "description": "Run any custom commands with Nx.", + "file": "generated/packages/nx/executors/run-commands.json", + "hidden": false, + "name": "run-commands", + "originalFilePath": "/packages/nx/src/executors/run-commands/schema.json", + "path": "/packages/nx/executors/run-commands", + "type": "executor" + }, + "/packages/nx/executors/run-script": { + "description": "Run an NPM script using Nx.", + "file": "generated/packages/nx/executors/run-script.json", + "hidden": false, + "name": "run-script", + "originalFilePath": "/packages/nx/src/executors/run-script/schema.json", + "path": "/packages/nx/executors/run-script", + "type": "executor" + } + }, + "generators": {}, + "path": "/packages/nx" + }, + "nx-plugin": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "nx-plugin", + "packageName": "@nrwl/nx-plugin", + "description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.", + "documents": { + "/packages/nx-plugin/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.", + "file": "generated/packages/nx-plugin/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/nx-plugin/documents/overview", + "tags": [], + "originalFilePath": "shared/nx-plugin" + } + }, + "root": "/packages/nx-plugin", + "source": "/packages/nx-plugin/src", + "executors": { + "/packages/nx-plugin/executors/e2e": { + "description": "Creates and runs the E2E tests for an Nx Plugin.", + "file": "generated/packages/nx-plugin/executors/e2e.json", + "hidden": false, + "name": "e2e", + "originalFilePath": "/packages/nx-plugin/src/executors/e2e/schema.json", + "path": "/packages/nx-plugin/executors/e2e", + "type": "executor" + } + }, + "generators": { + "/packages/nx-plugin/generators/plugin": { + "description": "Create a Nx Plugin.", + "file": "generated/packages/nx-plugin/generators/plugin.json", + "hidden": false, + "name": "plugin", + "originalFilePath": "/packages/nx-plugin/src/generators/plugin/schema.json", + "path": "/packages/nx-plugin/generators/plugin", + "type": "generator" + }, + "/packages/nx-plugin/generators/e2e-project": { + "description": "Create a E2E application for a Nx Plugin.", + "file": "generated/packages/nx-plugin/generators/e2e-project.json", + "hidden": true, + "name": "e2e-project", + "originalFilePath": "/packages/nx-plugin/src/generators/e2e-project/schema.json", + "path": "/packages/nx-plugin/generators/e2e-project", + "type": "generator" + }, + "/packages/nx-plugin/generators/migration": { + "description": "Create a migration for an Nx Plugin.", + "file": "generated/packages/nx-plugin/generators/migration.json", + "hidden": false, + "name": "migration", + "originalFilePath": "/packages/nx-plugin/src/generators/migration/schema.json", + "path": "/packages/nx-plugin/generators/migration", + "type": "generator" + }, + "/packages/nx-plugin/generators/generator": { + "description": "Create a generator for an Nx Plugin.", + "file": "generated/packages/nx-plugin/generators/generator.json", + "hidden": false, + "name": "generator", + "originalFilePath": "/packages/nx-plugin/src/generators/generator/schema.json", + "path": "/packages/nx-plugin/generators/generator", + "type": "generator" + }, + "/packages/nx-plugin/generators/executor": { + "description": "Create an executor for an Nx Plugin.", + "file": "generated/packages/nx-plugin/generators/executor.json", + "hidden": false, + "name": "executor", + "originalFilePath": "/packages/nx-plugin/src/generators/executor/schema.json", + "path": "/packages/nx-plugin/generators/executor", + "type": "generator" + }, + "/packages/nx-plugin/generators/plugin-lint-checks": { + "description": "Adds linting configuration to validate common json files for nx plugins.", + "file": "generated/packages/nx-plugin/generators/plugin-lint-checks.json", + "hidden": false, + "name": "plugin-lint-checks", + "originalFilePath": "/packages/nx-plugin/src/generators/lint-checks/schema.json", + "path": "/packages/nx-plugin/generators/plugin-lint-checks", + "type": "generator" + } + }, + "path": "/packages/nx-plugin" + }, + "react": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "react", + "packageName": "@nrwl/react", + "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", + "documents": { + "/packages/react/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", + "file": "generated/packages/react/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/react/documents/overview", + "tags": [], + "originalFilePath": "shared/react-plugin" + } + }, + "root": "/packages/react", + "source": "/packages/react/src", + "executors": { + "/packages/react/executors/module-federation-dev-server": { + "description": "Serve a host or remote application.", + "file": "generated/packages/react/executors/module-federation-dev-server.json", + "hidden": false, + "name": "module-federation-dev-server", + "originalFilePath": "/packages/react/src/executors/module-federation-dev-server/schema.json", + "path": "/packages/react/executors/module-federation-dev-server", + "type": "executor" + }, + "/packages/react/executors/module-federation-ssr-dev-server": { + "description": "Serve a host application along with it's known remotes.", + "file": "generated/packages/react/executors/module-federation-ssr-dev-server.json", + "hidden": false, + "name": "module-federation-ssr-dev-server", + "originalFilePath": "/packages/react/src/executors/module-federation-ssr-dev-server/schema.json", + "path": "/packages/react/executors/module-federation-ssr-dev-server", + "type": "executor" + } + }, + "generators": { + "/packages/react/generators/init": { + "description": "Initialize the `@nrwl/react` plugin.", + "file": "generated/packages/react/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/react/src/generators/init/schema.json", + "path": "/packages/react/generators/init", + "type": "generator" + }, + "/packages/react/generators/application": { + "description": "Create a React application.", + "file": "generated/packages/react/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/react/src/generators/application/schema.json", + "path": "/packages/react/generators/application", + "type": "generator" + }, + "/packages/react/generators/library": { + "description": "Create a React library.", + "file": "generated/packages/react/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/react/src/generators/library/schema.json", + "path": "/packages/react/generators/library", + "type": "generator" + }, + "/packages/react/generators/component": { + "description": "Create a React component.", + "file": "generated/packages/react/generators/component.json", + "hidden": false, + "name": "component", + "originalFilePath": "/packages/react/src/generators/component/schema.json", + "path": "/packages/react/generators/component", + "type": "generator" + }, + "/packages/react/generators/redux": { + "description": "Create a Redux slice for a project.", + "file": "generated/packages/react/generators/redux.json", + "hidden": false, + "name": "redux", + "originalFilePath": "/packages/react/src/generators/redux/schema.json", + "path": "/packages/react/generators/redux", + "type": "generator" + }, + "/packages/react/generators/storybook-configuration": { + "description": "Set up storybook for a React app or library.", + "file": "generated/packages/react/generators/storybook-configuration.json", + "hidden": false, + "name": "storybook-configuration", + "originalFilePath": "/packages/react/src/generators/storybook-configuration/schema.json", + "path": "/packages/react/generators/storybook-configuration", + "type": "generator" + }, + "/packages/react/generators/component-story": { + "description": "Generate storybook story for a React component", + "file": "generated/packages/react/generators/component-story.json", + "hidden": false, + "name": "component-story", + "originalFilePath": "/packages/react/src/generators/component-story/schema.json", + "path": "/packages/react/generators/component-story", + "type": "generator" + }, + "/packages/react/generators/stories": { + "description": "Create stories/specs for all components declared in an app or library.", + "file": "generated/packages/react/generators/stories.json", + "hidden": false, + "name": "stories", + "originalFilePath": "/packages/react/src/generators/stories/schema.json", + "path": "/packages/react/generators/stories", + "type": "generator" + }, + "/packages/react/generators/component-cypress-spec": { + "description": "Create a Cypress spec for a UI component that has a story.", + "file": "generated/packages/react/generators/component-cypress-spec.json", + "hidden": false, + "name": "component-cypress-spec", + "originalFilePath": "/packages/react/src/generators/component-cypress-spec/schema.json", + "path": "/packages/react/generators/component-cypress-spec", + "type": "generator" + }, + "/packages/react/generators/hook": { + "description": "Create a hook.", + "file": "generated/packages/react/generators/hook.json", + "hidden": false, + "name": "hook", + "originalFilePath": "/packages/react/src/generators/hook/schema.json", + "path": "/packages/react/generators/hook", + "type": "generator" + }, + "/packages/react/generators/host": { + "description": "Generate a host react application", + "file": "generated/packages/react/generators/host.json", + "hidden": false, + "name": "host", + "originalFilePath": "/packages/react/src/generators/host/schema.json", + "path": "/packages/react/generators/host", + "type": "generator" + }, + "/packages/react/generators/remote": { + "description": "Generate a remote react application", + "file": "generated/packages/react/generators/remote.json", + "hidden": false, + "name": "remote", + "originalFilePath": "/packages/react/src/generators/remote/schema.json", + "path": "/packages/react/generators/remote", + "type": "generator" + }, + "/packages/react/generators/cypress-component-configuration": { + "description": "Setup Cypress component testing for a React project", + "file": "generated/packages/react/generators/cypress-component-configuration.json", + "hidden": false, + "name": "cypress-component-configuration", + "originalFilePath": "/packages/react/src/generators/cypress-component-configuration/schema.json", + "path": "/packages/react/generators/cypress-component-configuration", + "type": "generator" + }, + "/packages/react/generators/component-test": { + "description": "Generate a Cypress component test for a React component", + "file": "generated/packages/react/generators/component-test.json", + "hidden": false, + "name": "component-test", + "originalFilePath": "/packages/react/src/generators/component-test/schema.json", + "path": "/packages/react/generators/component-test", + "type": "generator" + }, + "/packages/react/generators/setup-tailwind": { + "description": "Set up Tailwind configuration for a project.", + "file": "generated/packages/react/generators/setup-tailwind.json", + "hidden": false, + "name": "setup-tailwind", + "originalFilePath": "/packages/react/src/generators/setup-tailwind/schema.json", + "path": "/packages/react/generators/setup-tailwind", + "type": "generator" + }, + "/packages/react/generators/setup-ssr": { + "description": "Set up SSR configuration for a project.", + "file": "generated/packages/react/generators/setup-ssr.json", + "hidden": false, + "name": "setup-ssr", + "originalFilePath": "/packages/react/src/generators/setup-ssr/schema.json", + "path": "/packages/react/generators/setup-ssr", + "type": "generator" + } + }, + "path": "/packages/react" + }, + "react-native": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "react-native", + "packageName": "@nrwl/react-native", + "description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.", + "documents": { + "/packages/react-native/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.", + "file": "generated/packages/react-native/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/react-native/documents/overview", + "tags": [], + "originalFilePath": "shared/react-native-plugin" + } + }, + "root": "/packages/react-native", + "source": "/packages/react-native/src", + "executors": { + "/packages/react-native/executors/run-android": { + "description": "Runs Android application.", + "file": "generated/packages/react-native/executors/run-android.json", + "hidden": false, + "name": "run-android", + "originalFilePath": "/packages/react-native/src/executors/run-android/schema.json", + "path": "/packages/react-native/executors/run-android", + "type": "executor" + }, + "/packages/react-native/executors/run-ios": { + "description": "Runs iOS application.", + "file": "generated/packages/react-native/executors/run-ios.json", + "hidden": false, + "name": "run-ios", + "originalFilePath": "/packages/react-native/src/executors/run-ios/schema.json", + "path": "/packages/react-native/executors/run-ios", + "type": "executor" + }, + "/packages/react-native/executors/bundle": { + "description": "Builds the JavaScript bundle for offline use.", + "file": "generated/packages/react-native/executors/bundle.json", + "hidden": false, + "name": "bundle", + "originalFilePath": "/packages/react-native/src/executors/bundle/schema.json", + "path": "/packages/react-native/executors/bundle", + "type": "executor" + }, + "/packages/react-native/executors/build-android": { + "description": "Release Build for Android.", + "file": "generated/packages/react-native/executors/build-android.json", + "hidden": false, + "name": "build-android", + "originalFilePath": "/packages/react-native/src/executors/build-android/schema.json", + "path": "/packages/react-native/executors/build-android", + "type": "executor" + }, + "/packages/react-native/executors/start": { + "description": "Starts the Javascript server that communicates with connected devices.", + "file": "generated/packages/react-native/executors/start.json", + "hidden": false, + "name": "start", + "originalFilePath": "/packages/react-native/src/executors/start/schema.json", + "path": "/packages/react-native/executors/start", + "type": "executor" + }, + "/packages/react-native/executors/sync-deps": { + "description": "Syncs dependencies to `package.json` (required for autolinking).", + "file": "generated/packages/react-native/executors/sync-deps.json", + "hidden": false, + "name": "sync-deps", + "originalFilePath": "/packages/react-native/src/executors/sync-deps/schema.json", + "path": "/packages/react-native/executors/sync-deps", + "type": "executor" + }, + "/packages/react-native/executors/ensure-symlink": { + "description": "Ensure workspace `node_modules` is symlink under app's `node_modules` folder.", + "file": "generated/packages/react-native/executors/ensure-symlink.json", + "hidden": false, + "name": "ensure-symlink", + "originalFilePath": "/packages/react-native/src/executors/ensure-symlink/schema.json", + "path": "/packages/react-native/executors/ensure-symlink", + "type": "executor" + }, + "/packages/react-native/executors/storybook": { + "description": "Serve React Native Storybook.", + "file": "generated/packages/react-native/executors/storybook.json", + "hidden": false, + "name": "storybook", + "originalFilePath": "/packages/react-native/src/executors/storybook/schema.json", + "path": "/packages/react-native/executors/storybook", + "type": "executor" + } + }, + "generators": { + "/packages/react-native/generators/init": { + "description": "Initialize the `@nrwl/react-native` plugin.", + "file": "generated/packages/react-native/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/react-native/src/generators/init/schema.json", + "path": "/packages/react-native/generators/init", + "type": "generator" + }, + "/packages/react-native/generators/application": { + "description": "Create a React Native application.", + "file": "generated/packages/react-native/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/react-native/src/generators/application/schema.json", + "path": "/packages/react-native/generators/application", + "type": "generator" + }, + "/packages/react-native/generators/library": { + "description": "Create a React Native library.", + "file": "generated/packages/react-native/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/react-native/src/generators/library/schema.json", + "path": "/packages/react-native/generators/library", + "type": "generator" + }, + "/packages/react-native/generators/component": { + "description": "Create a React Native component.", + "file": "generated/packages/react-native/generators/component.json", + "hidden": false, + "name": "component", + "originalFilePath": "/packages/react-native/src/generators/component/schema.json", + "path": "/packages/react-native/generators/component", + "type": "generator" + }, + "/packages/react-native/generators/storybook-configuration": { + "description": "Set up Storybook for a React-native application or library.", + "file": "generated/packages/react-native/generators/storybook-configuration.json", + "hidden": false, + "name": "storybook-configuration", + "originalFilePath": "/packages/react-native/src/generators/storybook-configuration/schema.json", + "path": "/packages/react-native/generators/storybook-configuration", + "type": "generator" + }, + "/packages/react-native/generators/component-story": { + "description": "Generate Storybook story for a React-native component.", + "file": "generated/packages/react-native/generators/component-story.json", + "hidden": false, + "name": "component-story", + "originalFilePath": "/packages/react-native/src/generators/component-story/schema.json", + "path": "/packages/react-native/generators/component-story", + "type": "generator" + }, + "/packages/react-native/generators/stories": { + "description": "Create stories/specs for all components declared in an application or library.", + "file": "generated/packages/react-native/generators/stories.json", + "hidden": false, + "name": "stories", + "originalFilePath": "/packages/react-native/src/generators/stories/schema.json", + "path": "/packages/react-native/generators/stories", + "type": "generator" + }, + "/packages/react-native/generators/upgrade-native": { + "description": "Destructive command to upgrade native iOS and Android code to latest.", + "file": "generated/packages/react-native/generators/upgrade-native.json", + "hidden": false, + "name": "upgrade-native", + "originalFilePath": "/packages/react-native/src/generators/upgrade-native/schema.json", + "path": "/packages/react-native/generators/upgrade-native", + "type": "generator" + } + }, + "path": "/packages/react-native" + }, + "rollup": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "rollup", + "packageName": "@nrwl/rollup", + "description": "The Nx Plugin for Rollup contains executors and generators that support building applications using Rollup.", + "documents": {}, + "root": "/packages/rollup", + "source": "/packages/rollup/src", + "executors": { + "/packages/rollup/executors/rollup": { + "description": "Bundle a package using Rollup.", + "file": "generated/packages/rollup/executors/rollup.json", + "hidden": false, + "name": "rollup", + "originalFilePath": "/packages/rollup/src/executors/rollup/schema.json", + "path": "/packages/rollup/executors/rollup", + "type": "executor" + } + }, + "generators": { + "/packages/rollup/generators/init": { + "description": "Initialize the `@nrwl/rollup` plugin.", + "file": "generated/packages/rollup/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/rollup/src/generators/init/schema.json", + "path": "/packages/rollup/generators/init", + "type": "generator" + }, + "/packages/rollup/generators/rollup-project": { + "description": "Add rollup configuration to a project.", + "file": "generated/packages/rollup/generators/rollup-project.json", + "hidden": true, + "name": "rollup-project", + "originalFilePath": "/packages/rollup/src/generators/rollup-project/schema.json", + "path": "/packages/rollup/generators/rollup-project", + "type": "generator" + } + }, + "path": "/packages/rollup" + }, + "storybook": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "storybook", + "packageName": "@nrwl/storybook", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "documents": { + "/packages/storybook/documents/overview": { + "id": "overview", + "name": "Overview Generic", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/overview", + "tags": [], + "originalFilePath": "shared/guides/storybook/plugin-overview" + }, + "/packages/storybook/documents/overview-react": { + "id": "overview-react", + "name": "Set up Storybook for React Projects", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/overview-react", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/overview-react", + "tags": [], + "originalFilePath": "shared/guides/storybook/plugin-react" + }, + "/packages/storybook/documents/overview-angular": { + "id": "overview-angular", + "name": "Set up Storybook for Angular Projects", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/overview-angular", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/overview-angular", + "tags": [], + "originalFilePath": "shared/guides/storybook/plugin-angular" + }, + "/packages/storybook/documents/best-practices": { + "id": "best-practices", + "name": "Storybook best practices for making the most out of Nx", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/best-practices", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/best-practices", + "tags": [], + "originalFilePath": "shared/guides/storybook/best-practices" + }, + "/packages/storybook/documents/storybook-composition-setup": { + "id": "storybook-composition-setup", + "name": "Setting up Storybook Composition with Nx", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/storybook-composition-setup", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/storybook-composition-setup", + "tags": [], + "originalFilePath": "shared/guides/storybook/storybook-composition-setup" + }, + "/packages/storybook/documents/angular-storybook-compodoc": { + "id": "angular-storybook-compodoc", + "name": "Angular: Set up Compodoc for Storybook on Nx", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/angular-storybook-compodoc", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/angular-storybook-compodoc", + "tags": [], + "originalFilePath": "shared/guides/storybook/angular-storybook-compodoc" + }, + "/packages/storybook/documents/angular-storybook-targets": { + "id": "angular-storybook-targets", + "name": "Angular: Information about the Storybook targets", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/angular-storybook-targets", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/angular-storybook-targets", + "tags": [], + "originalFilePath": "shared/guides/storybook/angular-storybook-targets" + }, + "/packages/storybook/documents/angular-configuring-styles": { + "id": "angular-configuring-styles", + "name": "Angular: Configuring styles and preprocessor options", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/angular-configuring-styles", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/angular-configuring-styles", + "tags": [], + "originalFilePath": "shared/guides/storybook/angular-configuring-styles" + }, + "/packages/storybook/documents/angular-browser-target": { + "id": "angular-browser-target", + "name": "Angular: The browserTarget", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/angular-browser-target", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/angular-browser-target", + "tags": [], + "originalFilePath": "shared/guides/storybook/angular-browser-target" + }, + "/packages/storybook/documents/migrate-webpack-final-angular": { + "id": "migrate-webpack-final-angular", + "name": "Angular: Storybook Webpack Migration", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/migrate-webpack-final-angular", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/migrate-webpack-final-angular", + "tags": [], + "originalFilePath": "shared/guides/storybook/migrate-webpack-final-angular" + }, + "/packages/storybook/documents/upgrade-storybook-v6-angular": { + "id": "upgrade-storybook-v6-angular", + "name": "Angular: Upgrading to Storybook 6", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/upgrade-storybook-v6-angular", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/upgrade-storybook-v6-angular", + "tags": [], + "originalFilePath": "shared/guides/storybook/storybook-v6-angular" + }, + "/packages/storybook/documents/migrate-webpack-final-react": { + "id": "migrate-webpack-final-react", + "name": "React: Migrate to the Nrwl React Storybook Preset", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/migrate-webpack-final-react", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/migrate-webpack-final-react", + "tags": [], + "originalFilePath": "shared/guides/storybook/migrate-webpack-final-react" + }, + "/packages/storybook/documents/upgrade-storybook-v6-react": { + "id": "upgrade-storybook-v6-react", + "name": "React: Upgrading to Storybook 6", + "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", + "file": "generated/packages/storybook/documents/upgrade-storybook-v6-react", + "itemList": [], + "isExternal": false, + "path": "/packages/storybook/documents/upgrade-storybook-v6-react", + "tags": [], + "originalFilePath": "shared/guides/storybook/storybook-v6-react" + } + }, + "root": "/packages/storybook", + "source": "/packages/storybook/src", + "executors": { + "/packages/storybook/executors/storybook": { + "description": "Serve Storybook.", + "file": "generated/packages/storybook/executors/storybook.json", + "hidden": false, + "name": "storybook", + "originalFilePath": "/packages/storybook/src/executors/storybook/schema.json", + "path": "/packages/storybook/executors/storybook", + "type": "executor" + }, + "/packages/storybook/executors/build": { + "description": "Build Storybook.", + "file": "generated/packages/storybook/executors/build.json", + "hidden": false, + "name": "build", + "originalFilePath": "/packages/storybook/src/executors/build-storybook/schema.json", + "path": "/packages/storybook/executors/build", + "type": "executor" + } + }, + "generators": { + "/packages/storybook/generators/init": { + "description": "Add Storybook configuration to the workspace.", + "file": "generated/packages/storybook/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/storybook/src/generators/init/schema.json", + "path": "/packages/storybook/generators/init", + "type": "generator" + }, + "/packages/storybook/generators/configuration": { + "description": "Add Storybook configuration to a UI library or an application.", + "file": "generated/packages/storybook/generators/configuration.json", + "hidden": false, + "name": "configuration", + "originalFilePath": "/packages/storybook/src/generators/configuration/schema.json", + "path": "/packages/storybook/generators/configuration", + "type": "generator" + }, + "/packages/storybook/generators/cypress-project": { + "description": "Add cypress e2e app to test a UI library that is set up for Storybook.", + "file": "generated/packages/storybook/generators/cypress-project.json", + "hidden": false, + "name": "cypress-project", + "originalFilePath": "/packages/storybook/src/generators/cypress-project/schema.json", + "path": "/packages/storybook/generators/cypress-project", + "type": "generator" + }, + "/packages/storybook/generators/change-storybook-targets": { + "description": "Change storybook targets for Angular projects to use @storybook/angular executors", + "file": "generated/packages/storybook/generators/change-storybook-targets.json", + "hidden": false, + "name": "change-storybook-targets", + "originalFilePath": "/packages/storybook/src/generators/change-storybook-targets/schema.json", + "path": "/packages/storybook/generators/change-storybook-targets", + "type": "generator" + } + }, + "path": "/packages/storybook" + }, + "tao": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "tao", + "packageName": "@nrwl/tao", + "description": "CLI for generating code and running commands", + "documents": {}, + "root": "/packages/tao", + "source": "/packages/tao/src", + "executors": {}, + "generators": {}, + "path": "/packages/tao" + }, + "vite": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "vite", + "packageName": "@nrwl/vite", + "description": "The Nx Plugin for building and testing applications using Vite (Early Release)", + "documents": { + "/packages/vite/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for building and testing applications using Vite (Early Release)", + "file": "generated/packages/vite/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/vite/documents/overview", + "tags": [], + "originalFilePath": "shared/vite-plugin" + } + }, + "root": "/packages/vite", + "source": "/packages/vite/src", + "executors": { + "/packages/vite/executors/dev-server": { + "description": "Vite dev server.", + "file": "generated/packages/vite/executors/dev-server.json", + "hidden": false, + "name": "dev-server", + "originalFilePath": "/packages/vite/src/executors/dev-server/schema.json", + "path": "/packages/vite/executors/dev-server", + "type": "executor" + }, + "/packages/vite/executors/build": { + "description": "Build with Vite.", + "file": "generated/packages/vite/executors/build.json", + "hidden": false, + "name": "build", + "originalFilePath": "/packages/vite/src/executors/build/schema.json", + "path": "/packages/vite/executors/build", + "type": "executor" + }, + "/packages/vite/executors/test": { + "description": "Test with Vitest", + "file": "generated/packages/vite/executors/test.json", + "hidden": false, + "name": "test", + "originalFilePath": "/packages/vite/src/executors/test/schema.json", + "path": "/packages/vite/executors/test", + "type": "executor" + } + }, + "generators": { + "/packages/vite/generators/init": { + "description": "Initialize Vite in the workspace.", + "file": "generated/packages/vite/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/vite/src/generators/init/schema.json", + "path": "/packages/vite/generators/init", + "type": "generator" + }, + "/packages/vite/generators/configuration": { + "description": "Add Vite configuration to an application.", + "file": "generated/packages/vite/generators/configuration.json", + "hidden": false, + "name": "configuration", + "originalFilePath": "/packages/vite/src/generators/configuration/schema.json", + "path": "/packages/vite/generators/configuration", + "type": "generator" + }, + "/packages/vite/generators/vitest": { + "description": "Generate a vitest configuration", + "file": "generated/packages/vite/generators/vitest.json", + "hidden": false, + "name": "vitest", + "originalFilePath": "/packages/vite/src/generators/vitest/schema.json", + "path": "/packages/vite/generators/vitest", + "type": "generator" + } + }, + "path": "/packages/vite" + }, + "web": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "web", + "packageName": "@nrwl/web", + "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.", + "documents": { + "/packages/web/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.", + "file": "generated/packages/web/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/web/documents/overview", + "tags": [], + "originalFilePath": "shared/web-plugin" + } + }, + "root": "/packages/web", + "source": "/packages/web/src", + "executors": { + "/packages/web/executors/webpack": { + "description": "Build an application using Webpack.", + "file": "generated/packages/web/executors/webpack.json", + "hidden": false, + "name": "webpack", + "originalFilePath": "/packages/web/src/executors/webpack/schema.json", + "path": "/packages/web/executors/webpack", + "type": "executor" + }, + "/packages/web/executors/rollup": { + "description": "Package a library using Rollup.", + "file": "generated/packages/web/executors/rollup.json", + "hidden": false, + "name": "rollup", + "originalFilePath": "/packages/web/src/executors/rollup/schema.json", + "path": "/packages/web/executors/rollup", + "type": "executor" + }, + "/packages/web/executors/dev-server": { + "description": "Serve a web application.", + "file": "generated/packages/web/executors/dev-server.json", + "hidden": false, + "name": "dev-server", + "originalFilePath": "/packages/web/src/executors/dev-server/schema.json", + "path": "/packages/web/executors/dev-server", + "type": "executor" + }, + "/packages/web/executors/file-server": { + "description": "Serve a web application from a folder.", + "file": "generated/packages/web/executors/file-server.json", + "hidden": false, + "name": "file-server", + "originalFilePath": "/packages/web/src/executors/file-server/schema.json", + "path": "/packages/web/executors/file-server", + "type": "executor" + } + }, + "generators": { + "/packages/web/generators/init": { + "description": "Add `@nrwl/web` to a project.", + "file": "generated/packages/web/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/web/src/generators/init/schema.json", + "path": "/packages/web/generators/init", + "type": "generator" + }, + "/packages/web/generators/application": { + "description": "Create an web application.", + "file": "generated/packages/web/generators/application.json", + "hidden": false, + "name": "application", + "originalFilePath": "/packages/web/src/generators/application/schema.json", + "path": "/packages/web/generators/application", + "type": "generator" + } + }, + "path": "/packages/web" + }, + "webpack": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "webpack", + "packageName": "@nrwl/webpack", + "description": "The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.", + "documents": {}, + "root": "/packages/webpack", + "source": "/packages/webpack/src", + "executors": { + "/packages/webpack/executors/webpack": { + "description": "Run webpack build.", + "file": "generated/packages/webpack/executors/webpack.json", + "hidden": false, + "name": "webpack", + "originalFilePath": "/packages/webpack/src/executors/webpack/schema.json", + "path": "/packages/webpack/executors/webpack", + "type": "executor" + }, + "/packages/webpack/executors/dev-server": { + "description": "Serve a web application.", + "file": "generated/packages/webpack/executors/dev-server.json", + "hidden": false, + "name": "dev-server", + "originalFilePath": "/packages/webpack/src/executors/dev-server/schema.json", + "path": "/packages/webpack/executors/dev-server", + "type": "executor" + }, + "/packages/webpack/executors/ssr-dev-server": { + "description": "Serve a SSR application.", + "file": "generated/packages/webpack/executors/ssr-dev-server.json", + "hidden": false, + "name": "ssr-dev-server", + "originalFilePath": "/packages/webpack/src/executors/ssr-dev-server/schema.json", + "path": "/packages/webpack/executors/ssr-dev-server", + "type": "executor" + } + }, + "generators": { + "/packages/webpack/generators/init": { + "description": "Initialize the `@nrwl/webpack` plugin.", + "file": "generated/packages/webpack/generators/init.json", + "hidden": true, + "name": "init", + "originalFilePath": "/packages/webpack/src/generators/init/schema.json", + "path": "/packages/webpack/generators/init", + "type": "generator" + }, + "/packages/webpack/generators/webpack-project": { + "description": "Add webpack configuration to a project.", + "file": "generated/packages/webpack/generators/webpack-project.json", + "hidden": true, + "name": "webpack-project", + "originalFilePath": "/packages/webpack/src/generators/webpack-project/schema.json", + "path": "/packages/webpack/generators/webpack-project", + "type": "generator" + } + }, + "path": "/packages/webpack" + }, + "workspace": { + "githubRoot": "https://github.com/nrwl/nx/blob/master", + "name": "workspace", + "packageName": "@nrwl/workspace", + "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.", + "documents": { + "/packages/workspace/documents/overview": { + "id": "overview", + "name": "Overview", + "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.", + "file": "generated/packages/workspace/documents/overview", + "itemList": [], + "isExternal": false, + "path": "/packages/workspace/documents/overview", + "tags": [], + "originalFilePath": "shared/workspace-plugin" + }, + "/packages/workspace/documents/nx-nodejs-typescript-version-matrix": { + "id": "nx-nodejs-typescript-version-matrix", + "name": "Nx, NodeJS and Typescript Versions", + "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.", + "file": "generated/packages/workspace/documents/nx-nodejs-typescript-version-matrix", + "itemList": [], + "isExternal": false, + "path": "/packages/workspace/documents/nx-nodejs-typescript-version-matrix", + "tags": [], + "originalFilePath": "shared/nx-compatibility-matrix" + } + }, + "root": "/packages/workspace", + "source": "/packages/workspace/src", + "executors": { + "/packages/workspace/executors/run-commands": { + "description": "Run any custom commands with Nx.", + "file": "generated/packages/workspace/executors/run-commands.json", + "hidden": false, + "name": "run-commands", + "originalFilePath": "/packages/workspace/src/executors/run-commands/schema.json", + "path": "/packages/workspace/executors/run-commands", + "type": "executor" + }, + "/packages/workspace/executors/counter": { + "description": "A dummy executor useful for E2E tests.", + "file": "generated/packages/workspace/executors/counter.json", + "hidden": true, + "name": "counter", + "originalFilePath": "/packages/workspace/src/executors/counter/schema.json", + "path": "/packages/workspace/executors/counter", + "type": "executor" + }, + "/packages/workspace/executors/run-script": { + "description": "Run an NPM script using Nx.", + "file": "generated/packages/workspace/executors/run-script.json", + "hidden": false, + "name": "run-script", + "originalFilePath": "/packages/workspace/src/executors/run-script/schema.json", + "path": "/packages/workspace/executors/run-script", + "type": "executor" + } + }, + "generators": { + "/packages/workspace/generators/preset": { + "description": "Create application in an empty workspace.", + "file": "generated/packages/workspace/generators/preset.json", + "hidden": true, + "name": "preset", + "originalFilePath": "/packages/workspace/src/generators/preset/schema.json", + "path": "/packages/workspace/generators/preset", + "type": "generator" + }, + "/packages/workspace/generators/move": { + "description": "Move an application or library to another folder.", + "file": "generated/packages/workspace/generators/move.json", + "hidden": false, + "name": "move", + "originalFilePath": "/packages/workspace/src/generators/move/schema.json", + "path": "/packages/workspace/generators/move", + "type": "generator" + }, + "/packages/workspace/generators/remove": { + "description": "Remove an application or library.", + "file": "generated/packages/workspace/generators/remove.json", + "hidden": false, + "name": "remove", + "originalFilePath": "/packages/workspace/src/generators/remove/schema.json", + "path": "/packages/workspace/generators/remove", + "type": "generator" + }, + "/packages/workspace/generators/new": { + "description": "Create a workspace.", + "file": "generated/packages/workspace/generators/new.json", + "hidden": true, + "name": "new", + "originalFilePath": "/packages/workspace/src/generators/new/schema.json", + "path": "/packages/workspace/generators/new", + "type": "generator" + }, + "/packages/workspace/generators/library": { + "description": "Create a library.", + "file": "generated/packages/workspace/generators/library.json", + "hidden": false, + "name": "library", + "originalFilePath": "/packages/workspace/src/generators/library/schema.json", + "path": "/packages/workspace/generators/library", + "type": "generator" + }, + "/packages/workspace/generators/workspace-generator": { + "description": "Generates a workspace generator.", + "file": "generated/packages/workspace/generators/workspace-generator.json", + "hidden": false, + "name": "workspace-generator", + "originalFilePath": "/packages/workspace/src/generators/workspace-generator/schema.json", + "path": "/packages/workspace/generators/workspace-generator", + "type": "generator" + }, + "/packages/workspace/generators/run-commands": { + "description": "Generates a target to run any command in the terminal.", + "file": "generated/packages/workspace/generators/run-commands.json", + "hidden": false, + "name": "run-commands", + "originalFilePath": "/packages/workspace/src/generators/run-commands/schema.json", + "path": "/packages/workspace/generators/run-commands", + "type": "generator" + }, + "/packages/workspace/generators/convert-to-nx-project": { + "description": "Moves a project's configuration outside of `workspace.json`.", + "file": "generated/packages/workspace/generators/convert-to-nx-project.json", + "hidden": false, + "name": "convert-to-nx-project", + "originalFilePath": "/packages/workspace/src/generators/convert-to-nx-project/schema.json", + "path": "/packages/workspace/generators/convert-to-nx-project", + "type": "generator" + }, + "/packages/workspace/generators/npm-package": { + "description": "Create a minimal NPM package.", + "file": "generated/packages/workspace/generators/npm-package.json", + "hidden": false, + "name": "npm-package", + "originalFilePath": "/packages/workspace/src/generators/npm-package/schema.json", + "path": "/packages/workspace/generators/npm-package", + "type": "generator" + }, + "/packages/workspace/generators/ci-workflow": { + "description": "Generate a CI workflow.", + "file": "generated/packages/workspace/generators/ci-workflow.json", + "hidden": false, + "name": "ci-workflow", + "originalFilePath": "/packages/workspace/src/generators/ci-workflow/schema.json", + "path": "/packages/workspace/generators/ci-workflow", + "type": "generator" + } + }, + "path": "/packages/workspace" + } +} diff --git a/docs/generated/manifests/recipes.json b/docs/generated/manifests/recipes.json new file mode 100644 index 0000000000000..2df3786f13eda --- /dev/null +++ b/docs/generated/manifests/recipes.json @@ -0,0 +1,1583 @@ +{ + "/recipes/getting-started": { + "id": "getting-started", + "name": "Getting Started", + "description": "Basic information to get you started.", + "file": "", + "itemList": [ + { + "id": "set-up-a-new-workspace", + "name": "Set up a new workspace", + "description": "How to setup quickly a new Nx workspace.", + "file": "shared/recipes/set-up-a-new-workspace", + "itemList": [], + "isExternal": false, + "path": "/recipes/getting-started/set-up-a-new-workspace", + "tags": [] + } + ], + "isExternal": false, + "path": "/recipes/getting-started", + "tags": [] + }, + "/recipes/getting-started/set-up-a-new-workspace": { + "id": "set-up-a-new-workspace", + "name": "Set up a new workspace", + "description": "How to setup quickly a new Nx workspace.", + "file": "shared/recipes/set-up-a-new-workspace", + "itemList": [], + "isExternal": false, + "path": "/recipes/getting-started/set-up-a-new-workspace", + "tags": [] + }, + "/recipes/nx-console": { + "id": "nx-console", + "name": "Nx Console", + "description": "Checkout all the recipes related to Nx Console.", + "file": "", + "itemList": [ + { + "id": "console-generate-command", + "name": "Nx Console Generate Command", + "description": "", + "file": "shared/recipes/console-generate-command", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-generate-command", + "tags": ["integrate-with-editors"] + }, + { + "id": "console-run-command", + "name": "Nx Console Run Command", + "description": "", + "file": "shared/recipes/console-run-command", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-run-command", + "tags": ["integrate-with-editors"] + }, + { + "id": "console-add-dependency-command", + "name": "Nx Console Add Dependency Command", + "description": "", + "file": "shared/recipes/console-add-dependency-command", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-add-dependency-command", + "tags": ["integrate-with-editors"] + }, + { + "id": "console-project-pane", + "name": "Nx Console Project Pane", + "description": "", + "file": "shared/recipes/console-project-pane", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-project-pane", + "tags": ["integrate-with-editors"] + }, + { + "id": "console-shortcuts", + "name": "Nx Console Keyboard Shortcuts", + "description": "", + "file": "shared/recipes/console-shortcuts", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-shortcuts", + "tags": ["integrate-with-editors"] + } + ], + "isExternal": false, + "path": "/recipes/nx-console", + "tags": [] + }, + "/recipes/nx-console/console-generate-command": { + "id": "console-generate-command", + "name": "Nx Console Generate Command", + "description": "", + "file": "shared/recipes/console-generate-command", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-generate-command", + "tags": ["integrate-with-editors"] + }, + "/recipes/nx-console/console-run-command": { + "id": "console-run-command", + "name": "Nx Console Run Command", + "description": "", + "file": "shared/recipes/console-run-command", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-run-command", + "tags": ["integrate-with-editors"] + }, + "/recipes/nx-console/console-add-dependency-command": { + "id": "console-add-dependency-command", + "name": "Nx Console Add Dependency Command", + "description": "", + "file": "shared/recipes/console-add-dependency-command", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-add-dependency-command", + "tags": ["integrate-with-editors"] + }, + "/recipes/nx-console/console-project-pane": { + "id": "console-project-pane", + "name": "Nx Console Project Pane", + "description": "", + "file": "shared/recipes/console-project-pane", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-project-pane", + "tags": ["integrate-with-editors"] + }, + "/recipes/nx-console/console-shortcuts": { + "id": "console-shortcuts", + "name": "Nx Console Keyboard Shortcuts", + "description": "", + "file": "shared/recipes/console-shortcuts", + "itemList": [], + "isExternal": false, + "path": "/recipes/nx-console/console-shortcuts", + "tags": ["integrate-with-editors"] + }, + "/recipes/ci": { + "id": "ci", + "name": "CI", + "description": "All recipes about how to use Nx to make your CI faster.", + "file": "", + "itemList": [ + { + "id": "ci-setup", + "name": "CI Setup", + "description": "", + "file": "shared/ci-overview", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/ci-setup", + "tags": ["distribute-task-execution"] + }, + { + "id": "ci-deployment", + "name": "Prepare applications for deployment via CI", + "description": "", + "file": "shared/recipes/ci-deployment", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/ci-deployment", + "tags": ["docker", "deploy"] + }, + { + "id": "monorepo-ci-azure", + "name": "Setting up Azure Pipelines", + "description": "", + "file": "shared/monorepo-ci-azure", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-azure", + "tags": [] + }, + { + "id": "monorepo-ci-circle-ci", + "name": "Setting up CircleCI", + "description": "", + "file": "shared/monorepo-ci-circle-ci", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-circle-ci", + "tags": [] + }, + { + "id": "monorepo-ci-github-actions", + "name": "Setting up GitHub Actions", + "description": "", + "file": "shared/monorepo-ci-github-actions", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-github-actions", + "tags": [] + }, + { + "id": "monorepo-ci-jenkins", + "name": "Setting up Jenkins", + "description": "", + "file": "shared/monorepo-ci-jenkins", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-jenkins", + "tags": [] + }, + { + "id": "monorepo-ci-gitlab", + "name": "Setting up GitLab", + "description": "", + "file": "shared/monorepo-ci-gitlab", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-gitlab", + "tags": [] + }, + { + "id": "monorepo-ci-bitbucket-pipelines", + "name": "Setting up Bitbucket", + "description": "", + "file": "shared/monorepo-ci-bitbucket-pipelines", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-bitbucket-pipelines", + "tags": [] + } + ], + "isExternal": false, + "path": "/recipes/ci", + "tags": [] + }, + "/recipes/ci/ci-setup": { + "id": "ci-setup", + "name": "CI Setup", + "description": "", + "file": "shared/ci-overview", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/ci-setup", + "tags": ["distribute-task-execution"] + }, + "/recipes/ci/ci-deployment": { + "id": "ci-deployment", + "name": "Prepare applications for deployment via CI", + "description": "", + "file": "shared/recipes/ci-deployment", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/ci-deployment", + "tags": ["docker", "deploy"] + }, + "/recipes/ci/monorepo-ci-azure": { + "id": "monorepo-ci-azure", + "name": "Setting up Azure Pipelines", + "description": "", + "file": "shared/monorepo-ci-azure", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-azure", + "tags": [] + }, + "/recipes/ci/monorepo-ci-circle-ci": { + "id": "monorepo-ci-circle-ci", + "name": "Setting up CircleCI", + "description": "", + "file": "shared/monorepo-ci-circle-ci", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-circle-ci", + "tags": [] + }, + "/recipes/ci/monorepo-ci-github-actions": { + "id": "monorepo-ci-github-actions", + "name": "Setting up GitHub Actions", + "description": "", + "file": "shared/monorepo-ci-github-actions", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-github-actions", + "tags": [] + }, + "/recipes/ci/monorepo-ci-jenkins": { + "id": "monorepo-ci-jenkins", + "name": "Setting up Jenkins", + "description": "", + "file": "shared/monorepo-ci-jenkins", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-jenkins", + "tags": [] + }, + "/recipes/ci/monorepo-ci-gitlab": { + "id": "monorepo-ci-gitlab", + "name": "Setting up GitLab", + "description": "", + "file": "shared/monorepo-ci-gitlab", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-gitlab", + "tags": [] + }, + "/recipes/ci/monorepo-ci-bitbucket-pipelines": { + "id": "monorepo-ci-bitbucket-pipelines", + "name": "Setting up Bitbucket", + "description": "", + "file": "shared/monorepo-ci-bitbucket-pipelines", + "itemList": [], + "isExternal": false, + "path": "/recipes/ci/monorepo-ci-bitbucket-pipelines", + "tags": [] + }, + "/recipes/adopting-nx": { + "id": "adopting-nx", + "name": "Adopting Nx", + "description": "Adopting Nx incrementally, on existing project or from scratch.", + "file": "", + "itemList": [ + { + "id": "adding-to-monorepo", + "name": "NPM/Yarn/PNPM workspaces", + "description": "", + "file": "shared/migration/adding-to-monorepo", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/adding-to-monorepo", + "tags": [] + }, + { + "id": "adding-to-existing-project", + "name": "Add to any Project", + "description": "", + "file": "shared/migration/adding-to-existing-project", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/adding-to-existing-project", + "tags": [] + }, + { + "id": "migration-cra", + "name": "From CRA", + "description": "", + "file": "shared/migration/migration-cra", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/migration-cra", + "tags": [] + }, + { + "id": "migration-angular", + "name": "From Angular CLI", + "description": "", + "file": "shared/migration/migration-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/migration-angular", + "tags": [] + }, + { + "id": "lerna-and-nx", + "name": "Nx and Lerna", + "description": "", + "file": "shared/migration/lerna-and-nx", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/lerna-and-nx", + "tags": [] + }, + { + "id": "migration-angularjs", + "name": "From AngularJS", + "description": "", + "file": "shared/migration/migration-angularjs", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/migration-angularjs", + "tags": [] + }, + { + "id": "preserving-git-histories", + "name": "Preserving Git Histories", + "description": "", + "file": "shared/migration/preserving-git-histories", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/preserving-git-histories", + "tags": [] + }, + { + "id": "manual", + "name": "Manual migration", + "description": "", + "file": "shared/migration/manual", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/manual", + "tags": [] + } + ], + "isExternal": false, + "path": "/recipes/adopting-nx", + "tags": [] + }, + "/recipes/adopting-nx/adding-to-monorepo": { + "id": "adding-to-monorepo", + "name": "NPM/Yarn/PNPM workspaces", + "description": "", + "file": "shared/migration/adding-to-monorepo", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/adding-to-monorepo", + "tags": [] + }, + "/recipes/adopting-nx/adding-to-existing-project": { + "id": "adding-to-existing-project", + "name": "Add to any Project", + "description": "", + "file": "shared/migration/adding-to-existing-project", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/adding-to-existing-project", + "tags": [] + }, + "/recipes/adopting-nx/migration-cra": { + "id": "migration-cra", + "name": "From CRA", + "description": "", + "file": "shared/migration/migration-cra", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/migration-cra", + "tags": [] + }, + "/recipes/adopting-nx/migration-angular": { + "id": "migration-angular", + "name": "From Angular CLI", + "description": "", + "file": "shared/migration/migration-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/migration-angular", + "tags": [] + }, + "/recipes/adopting-nx/lerna-and-nx": { + "id": "lerna-and-nx", + "name": "Nx and Lerna", + "description": "", + "file": "shared/migration/lerna-and-nx", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/lerna-and-nx", + "tags": [] + }, + "/recipes/adopting-nx/migration-angularjs": { + "id": "migration-angularjs", + "name": "From AngularJS", + "description": "", + "file": "shared/migration/migration-angularjs", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/migration-angularjs", + "tags": [] + }, + "/recipes/adopting-nx/preserving-git-histories": { + "id": "preserving-git-histories", + "name": "Preserving Git Histories", + "description": "", + "file": "shared/migration/preserving-git-histories", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/preserving-git-histories", + "tags": [] + }, + "/recipes/adopting-nx/manual": { + "id": "manual", + "name": "Manual migration", + "description": "", + "file": "shared/migration/manual", + "itemList": [], + "isExternal": false, + "path": "/recipes/adopting-nx/manual", + "tags": [] + }, + "/recipes/executors": { + "id": "executors", + "name": "Executors", + "description": "Use, extend and compose executors.", + "file": "", + "itemList": [ + { + "id": "use-executor-configurations", + "name": "Use Executor Configurations", + "description": "", + "file": "shared/recipes/use-executor-configurations", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/use-executor-configurations", + "tags": ["use-task-executors"] + }, + { + "id": "run-commands-executor", + "name": "Running Custom Commands", + "description": "", + "file": "shared/running-custom-commands", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/run-commands-executor", + "tags": ["use-task-executors"] + }, + { + "id": "creating-custom-executors", + "name": "Local Executors", + "description": "", + "file": "shared/recipes/local-executors", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/creating-custom-executors", + "tags": ["use-task-executors"] + }, + { + "id": "compose-executors", + "name": "Compose Executors", + "description": "", + "file": "shared/recipes/compose-executors", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/compose-executors", + "tags": ["use-task-executors"] + } + ], + "isExternal": false, + "path": "/recipes/executors", + "tags": [] + }, + "/recipes/executors/use-executor-configurations": { + "id": "use-executor-configurations", + "name": "Use Executor Configurations", + "description": "", + "file": "shared/recipes/use-executor-configurations", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/use-executor-configurations", + "tags": ["use-task-executors"] + }, + "/recipes/executors/run-commands-executor": { + "id": "run-commands-executor", + "name": "Running Custom Commands", + "description": "", + "file": "shared/running-custom-commands", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/run-commands-executor", + "tags": ["use-task-executors"] + }, + "/recipes/executors/creating-custom-executors": { + "id": "creating-custom-executors", + "name": "Local Executors", + "description": "", + "file": "shared/recipes/local-executors", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/creating-custom-executors", + "tags": ["use-task-executors"] + }, + "/recipes/executors/compose-executors": { + "id": "compose-executors", + "name": "Compose Executors", + "description": "", + "file": "shared/recipes/compose-executors", + "itemList": [], + "isExternal": false, + "path": "/recipes/executors/compose-executors", + "tags": ["use-task-executors"] + }, + "/recipes/generators": { + "id": "generators", + "name": "Generators", + "description": "Use, extend and compose generators.", + "file": "", + "itemList": [ + { + "id": "local-generators", + "name": "Local Generators", + "description": "", + "file": "shared/recipes/local-generators", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/local-generators", + "tags": ["use-code-generators"] + }, + { + "id": "composing-generators", + "name": "Composing Generators", + "description": "", + "file": "shared/generators/composing-generators", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/composing-generators", + "tags": ["use-code-generators"] + }, + { + "id": "generator-options", + "name": "Generator Options", + "description": "", + "file": "shared/generators/generator-options", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/generator-options", + "tags": ["use-code-generators"] + }, + { + "id": "creating-files", + "name": "Creating Files", + "description": "", + "file": "shared/generators/creating-files", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/creating-files", + "tags": ["use-code-generators"] + }, + { + "id": "modifying-files", + "name": "Modifying Files", + "description": "", + "file": "shared/generators/modifying-files", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/modifying-files", + "tags": ["use-code-generators"] + } + ], + "isExternal": false, + "path": "/recipes/generators", + "tags": [] + }, + "/recipes/generators/local-generators": { + "id": "local-generators", + "name": "Local Generators", + "description": "", + "file": "shared/recipes/local-generators", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/local-generators", + "tags": ["use-code-generators"] + }, + "/recipes/generators/composing-generators": { + "id": "composing-generators", + "name": "Composing Generators", + "description": "", + "file": "shared/generators/composing-generators", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/composing-generators", + "tags": ["use-code-generators"] + }, + "/recipes/generators/generator-options": { + "id": "generator-options", + "name": "Generator Options", + "description": "", + "file": "shared/generators/generator-options", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/generator-options", + "tags": ["use-code-generators"] + }, + "/recipes/generators/creating-files": { + "id": "creating-files", + "name": "Creating Files", + "description": "", + "file": "shared/generators/creating-files", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/creating-files", + "tags": ["use-code-generators"] + }, + "/recipes/generators/modifying-files": { + "id": "modifying-files", + "name": "Modifying Files", + "description": "", + "file": "shared/generators/modifying-files", + "itemList": [], + "isExternal": false, + "path": "/recipes/generators/modifying-files", + "tags": ["use-code-generators"] + }, + "/recipes/advanced-plugins": { + "id": "advanced-plugins", + "name": "Advanced Plugins", + "description": "Learn more about creating your own plugin, extending Nx.", + "file": "", + "itemList": [ + { + "id": "project-inference-plugins", + "name": "Project Inference Plugins", + "description": "", + "file": "shared/extending-nx/project-inference-plugins", + "itemList": [], + "isExternal": false, + "path": "/recipes/advanced-plugins/project-inference-plugins", + "tags": ["create-your-own-plugin"] + }, + { + "id": "project-graph-plugins", + "name": "Project Graph Plugins", + "description": "", + "file": "shared/extending-nx/project-graph-plugins", + "itemList": [], + "isExternal": false, + "path": "/recipes/advanced-plugins/project-graph-plugins", + "tags": ["create-your-own-plugin", "explore-graph"] + } + ], + "isExternal": false, + "path": "/recipes/advanced-plugins", + "tags": [] + }, + "/recipes/advanced-plugins/project-inference-plugins": { + "id": "project-inference-plugins", + "name": "Project Inference Plugins", + "description": "", + "file": "shared/extending-nx/project-inference-plugins", + "itemList": [], + "isExternal": false, + "path": "/recipes/advanced-plugins/project-inference-plugins", + "tags": ["create-your-own-plugin"] + }, + "/recipes/advanced-plugins/project-graph-plugins": { + "id": "project-graph-plugins", + "name": "Project Graph Plugins", + "description": "", + "file": "shared/extending-nx/project-graph-plugins", + "itemList": [], + "isExternal": false, + "path": "/recipes/advanced-plugins/project-graph-plugins", + "tags": ["create-your-own-plugin", "explore-graph"] + }, + "/recipes/environment-variables": { + "id": "environment-variables", + "name": "Environment Variables", + "description": "Using environment variables in an Nx workspace.", + "file": "", + "itemList": [ + { + "id": "define-environment-variables", + "name": "Define Environment Variables", + "description": "", + "file": "shared/guides/define-environment-variables", + "itemList": [], + "isExternal": false, + "path": "/recipes/environment-variables/define-environment-variables", + "tags": ["environment-variables"] + }, + { + "id": "use-environment-variables-in-react", + "name": "Use Environment Variables in React", + "description": "", + "file": "shared/guides/use-environment-variables-in-react", + "itemList": [], + "isExternal": false, + "path": "/recipes/environment-variables/use-environment-variables-in-react", + "tags": ["environment-variables"] + }, + { + "id": "use-environment-variables-in-angular", + "name": "Use Environment Variables in Angular", + "description": "", + "file": "shared/guides/use-environment-variables-in-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/environment-variables/use-environment-variables-in-angular", + "tags": ["environment-variables"] + } + ], + "isExternal": false, + "path": "/recipes/environment-variables", + "tags": [] + }, + "/recipes/environment-variables/define-environment-variables": { + "id": "define-environment-variables", + "name": "Define Environment Variables", + "description": "", + "file": "shared/guides/define-environment-variables", + "itemList": [], + "isExternal": false, + "path": "/recipes/environment-variables/define-environment-variables", + "tags": ["environment-variables"] + }, + "/recipes/environment-variables/use-environment-variables-in-react": { + "id": "use-environment-variables-in-react", + "name": "Use Environment Variables in React", + "description": "", + "file": "shared/guides/use-environment-variables-in-react", + "itemList": [], + "isExternal": false, + "path": "/recipes/environment-variables/use-environment-variables-in-react", + "tags": ["environment-variables"] + }, + "/recipes/environment-variables/use-environment-variables-in-angular": { + "id": "use-environment-variables-in-angular", + "name": "Use Environment Variables in Angular", + "description": "", + "file": "shared/guides/use-environment-variables-in-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/environment-variables/use-environment-variables-in-angular", + "tags": ["environment-variables"] + }, + "/recipes/module-federation": { + "id": "module-federation", + "name": "Module Federation and Micro Frontends", + "description": "How to work with and setup Module Federation with Nx.", + "file": "", + "itemList": [ + { + "id": "faster-builds", + "name": "Faster Builds with Module Federation", + "description": "", + "file": "shared/guides/module-federation/faster-builds", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/faster-builds", + "tags": ["use-task-executors", "module-federation", "angular", "react"] + }, + { + "id": "module-federation-with-ssr", + "name": "Setup Module Federation with SSR for Angular and React", + "description": "", + "file": "shared/recipes/module-federation-with-ssr", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/module-federation-with-ssr", + "tags": ["use-task-executors", "module-federation", "angular", "react"] + }, + { + "id": "dynamic-module-federation-with-angular", + "name": "Advanced Micro Frontends with Angular using Dynamic Federation", + "description": "", + "file": "shared/guides/module-federation/dynamic-mfe-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/dynamic-module-federation-with-angular", + "tags": ["use-task-executors", "module-federation", "angular"] + }, + { + "id": "nx-examples", + "name": "Nx Micro-Frontend Example", + "description": "", + "file": "shared/examples/nx-examples", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/nx-examples", + "tags": [] + } + ], + "isExternal": false, + "path": "/recipes/module-federation", + "tags": [] + }, + "/recipes/module-federation/faster-builds": { + "id": "faster-builds", + "name": "Faster Builds with Module Federation", + "description": "", + "file": "shared/guides/module-federation/faster-builds", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/faster-builds", + "tags": ["use-task-executors", "module-federation", "angular", "react"] + }, + "/recipes/module-federation/module-federation-with-ssr": { + "id": "module-federation-with-ssr", + "name": "Setup Module Federation with SSR for Angular and React", + "description": "", + "file": "shared/recipes/module-federation-with-ssr", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/module-federation-with-ssr", + "tags": ["use-task-executors", "module-federation", "angular", "react"] + }, + "/recipes/module-federation/dynamic-module-federation-with-angular": { + "id": "dynamic-module-federation-with-angular", + "name": "Advanced Micro Frontends with Angular using Dynamic Federation", + "description": "", + "file": "shared/guides/module-federation/dynamic-mfe-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/dynamic-module-federation-with-angular", + "tags": ["use-task-executors", "module-federation", "angular"] + }, + "/recipes/module-federation/nx-examples": { + "id": "nx-examples", + "name": "Nx Micro-Frontend Example", + "description": "", + "file": "shared/examples/nx-examples", + "itemList": [], + "isExternal": false, + "path": "/recipes/module-federation/nx-examples", + "tags": [] + }, + "/recipes/storybook": { + "id": "storybook", + "name": "Storybook", + "description": "Storybook how tos", + "file": "", + "itemList": [ + { + "id": "one-storybook-for-all", + "name": "Publishing Storybook: One main Storybook instance for all projects", + "description": "", + "file": "shared/recipes/one-storybook-for-all", + "itemList": [], + "isExternal": false, + "path": "/recipes/storybook/one-storybook-for-all", + "tags": ["storybook"] + }, + { + "id": "one-storybook-per-scope", + "name": "Publishing Storybook: One Storybook instance per scope", + "description": "", + "file": "shared/recipes/one-storybook-per-scope", + "itemList": [], + "isExternal": false, + "path": "/recipes/storybook/one-storybook-per-scope", + "tags": ["storybook"] + }, + { + "id": "one-storybook-with-composition", + "name": "Publishing Storybook: One main Storybook instance using Storybook Composition", + "description": "", + "file": "shared/recipes/one-storybook-with-composition", + "itemList": [], + "isExternal": false, + "path": "/recipes/storybook/one-storybook-with-composition", + "tags": ["storybook"] + } + ], + "isExternal": false, + "path": "/recipes/storybook", + "tags": [] + }, + "/recipes/storybook/one-storybook-for-all": { + "id": "one-storybook-for-all", + "name": "Publishing Storybook: One main Storybook instance for all projects", + "description": "", + "file": "shared/recipes/one-storybook-for-all", + "itemList": [], + "isExternal": false, + "path": "/recipes/storybook/one-storybook-for-all", + "tags": ["storybook"] + }, + "/recipes/storybook/one-storybook-per-scope": { + "id": "one-storybook-per-scope", + "name": "Publishing Storybook: One Storybook instance per scope", + "description": "", + "file": "shared/recipes/one-storybook-per-scope", + "itemList": [], + "isExternal": false, + "path": "/recipes/storybook/one-storybook-per-scope", + "tags": ["storybook"] + }, + "/recipes/storybook/one-storybook-with-composition": { + "id": "one-storybook-with-composition", + "name": "Publishing Storybook: One main Storybook instance using Storybook Composition", + "description": "", + "file": "shared/recipes/one-storybook-with-composition", + "itemList": [], + "isExternal": false, + "path": "/recipes/storybook/one-storybook-with-composition", + "tags": ["storybook"] + }, + "/recipes/other": { + "id": "other", + "name": "Other", + "description": "Other recipes you will find useful.", + "file": "", + "itemList": [ + { + "id": "root-level-scripts", + "name": "Run Root-Level NPM Scripts with Nx", + "description": "", + "file": "shared/recipes/root-level-scripts", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/root-level-scripts", + "tags": ["run-tasks"] + }, + { + "id": "analyze-source-files", + "name": "Disable Graph Links Created from Analyzing Source Files", + "description": "", + "file": "shared/recipes/analyze-source-files", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/analyze-source-files", + "tags": ["explore-graph"] + }, + { + "id": "advanced-update", + "name": "Advanced Update Nx", + "description": "", + "file": "shared/recipes/advanced-update", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/advanced-update", + "tags": ["automate-updating-dependencies"] + }, + { + "id": "js-and-ts", + "name": "JavaScript and TypeScript", + "description": "", + "file": "shared/guides/js-and-ts", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/js-and-ts", + "tags": [] + }, + { + "id": "react-native", + "name": "React Native with Nx", + "description": "", + "file": "shared/guides/react-native", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/react-native", + "tags": [] + }, + { + "id": "adding-assets-react", + "name": "Adding Images, Fonts, and Files", + "description": "", + "file": "shared/guides/adding-assets", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/adding-assets-react", + "tags": [] + }, + { + "id": "setup-incremental-builds-angular", + "name": "Setup incremental builds for Angular applications", + "description": "", + "file": "shared/guides/setup-incremental-builds-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/setup-incremental-builds-angular", + "tags": [] + }, + { + "id": "performance-profiling", + "name": "Profiling Build Performance", + "description": "", + "file": "shared/guides/performance-profiling", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/performance-profiling", + "tags": ["use-task-executors", "environment-variables"] + }, + { + "id": "eslint", + "name": "Using ESLint in Nx Workspaces", + "description": "", + "file": "shared/eslint", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/eslint", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "browser-support", + "name": "Configuring Browser Support", + "description": "", + "file": "shared/guides/browser-support", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/browser-support", + "tags": [] + }, + { + "id": "deploy-nextjs-to-vercel", + "name": "Deploying Next.js applications to Vercel", + "description": "", + "file": "shared/guides/deploy-nextjs-to-vercel", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/deploy-nextjs-to-vercel", + "tags": [] + }, + { + "id": "webpack-5", + "name": "Webpack 5 Migration", + "description": "", + "file": "shared/guides/webpack-5", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/webpack-5", + "tags": [] + }, + { + "id": "using-tailwind-css-in-react", + "name": "Using Tailwind CSS in React", + "description": "", + "file": "shared/guides/using-tailwind-css-in-react", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/using-tailwind-css-in-react", + "tags": [] + }, + { + "id": "react-18", + "name": "React 18 Migration", + "description": "", + "file": "shared/guides/react-18", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/react-18", + "tags": [] + }, + { + "id": "using-tailwind-css-with-angular-projects", + "name": "Using Tailwind CSS with Angular projects", + "description": "", + "file": "shared/guides/using-tailwind-css-with-angular-projects", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/using-tailwind-css-with-angular-projects", + "tags": [] + }, + { + "id": "misc-ngrx", + "name": "Using NgRx", + "description": "", + "file": "shared/guides/misc-ngrx", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/misc-ngrx", + "tags": [] + }, + { + "id": "misc-data-persistence", + "name": "Using Data Persistence operators", + "description": "", + "file": "shared/guides/misc-data-persistence", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/misc-data-persistence", + "tags": [] + }, + { + "id": "customize-webpack", + "name": "Customizing Webpack Config", + "description": "", + "file": "shared/guides/customize-webpack", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/customize-webpack", + "tags": ["use-task-executors"] + }, + { + "id": "react-nx", + "name": "Powering Up React Development With Nx", + "description": "", + "file": "shared/examples/react-nx", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/react-nx", + "tags": [] + }, + { + "id": "apollo-react", + "name": "Using Apollo GraphQL", + "description": "", + "file": "shared/examples/apollo-react", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/apollo-react", + "tags": [] + }, + { + "id": "caching", + "name": "Large Repo and Caching", + "description": "", + "file": "shared/examples/caching", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/caching", + "tags": [] + }, + { + "id": "dte", + "name": "Large Repo and DTE", + "description": "", + "file": "shared/examples/dte", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/dte", + "tags": [] + }, + { + "id": "troubleshoot-cache-misses", + "name": "Troubleshoot Cache Misses", + "description": "", + "file": "shared/recipes/troubleshoot-cache-misses", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/troubleshoot-cache-misses", + "tags": ["cache-task-results"] + }, + { + "id": "ban-dependencies-with-tags", + "name": "Ban Dependencies with Certain Tags", + "description": "", + "file": "shared/recipes/ban-dependencies-with-tags", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/ban-dependencies-with-tags", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "tag-multiple-dimensions", + "name": "Tag in Multiple Dimensions", + "description": "", + "file": "shared/recipes/tag-multiple-dimensions", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/tag-multiple-dimensions", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "ban-external-imports", + "name": "Ban External Imports", + "description": "", + "file": "shared/recipes/ban-external-imports", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/ban-external-imports", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "tags-allow-list", + "name": "Tags Allow List", + "description": "", + "file": "shared/recipes/tags-allow-list", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/tags-allow-list", + "tags": ["enforce-project-boundaries"] + }, + { + "id": "export-project-graph", + "name": "Export Project Graph", + "description": "", + "file": "shared/recipes/export-project-graph", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/export-project-graph", + "tags": ["explore-graph"] + }, + { + "id": "resolve-circular-dependencies", + "name": "Resolve Circular Dependencies", + "description": "", + "file": "shared/recipes/resolve-circular-dependencies", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/resolve-circular-dependencies", + "tags": ["explore-graph"] + }, + { + "id": "include-all-packagejson", + "name": "Include All package.json Files as Projects", + "description": "", + "file": "shared/recipes/include-all-packagejson", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/include-all-packagejson", + "tags": [] + } + ], + "isExternal": false, + "path": "/recipes/other", + "tags": [] + }, + "/recipes/other/root-level-scripts": { + "id": "root-level-scripts", + "name": "Run Root-Level NPM Scripts with Nx", + "description": "", + "file": "shared/recipes/root-level-scripts", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/root-level-scripts", + "tags": ["run-tasks"] + }, + "/recipes/other/analyze-source-files": { + "id": "analyze-source-files", + "name": "Disable Graph Links Created from Analyzing Source Files", + "description": "", + "file": "shared/recipes/analyze-source-files", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/analyze-source-files", + "tags": ["explore-graph"] + }, + "/recipes/other/advanced-update": { + "id": "advanced-update", + "name": "Advanced Update Nx", + "description": "", + "file": "shared/recipes/advanced-update", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/advanced-update", + "tags": ["automate-updating-dependencies"] + }, + "/recipes/other/js-and-ts": { + "id": "js-and-ts", + "name": "JavaScript and TypeScript", + "description": "", + "file": "shared/guides/js-and-ts", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/js-and-ts", + "tags": [] + }, + "/recipes/other/react-native": { + "id": "react-native", + "name": "React Native with Nx", + "description": "", + "file": "shared/guides/react-native", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/react-native", + "tags": [] + }, + "/recipes/other/adding-assets-react": { + "id": "adding-assets-react", + "name": "Adding Images, Fonts, and Files", + "description": "", + "file": "shared/guides/adding-assets", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/adding-assets-react", + "tags": [] + }, + "/recipes/other/setup-incremental-builds-angular": { + "id": "setup-incremental-builds-angular", + "name": "Setup incremental builds for Angular applications", + "description": "", + "file": "shared/guides/setup-incremental-builds-angular", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/setup-incremental-builds-angular", + "tags": [] + }, + "/recipes/other/performance-profiling": { + "id": "performance-profiling", + "name": "Profiling Build Performance", + "description": "", + "file": "shared/guides/performance-profiling", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/performance-profiling", + "tags": ["use-task-executors", "environment-variables"] + }, + "/recipes/other/eslint": { + "id": "eslint", + "name": "Using ESLint in Nx Workspaces", + "description": "", + "file": "shared/eslint", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/eslint", + "tags": ["enforce-project-boundaries"] + }, + "/recipes/other/browser-support": { + "id": "browser-support", + "name": "Configuring Browser Support", + "description": "", + "file": "shared/guides/browser-support", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/browser-support", + "tags": [] + }, + "/recipes/other/deploy-nextjs-to-vercel": { + "id": "deploy-nextjs-to-vercel", + "name": "Deploying Next.js applications to Vercel", + "description": "", + "file": "shared/guides/deploy-nextjs-to-vercel", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/deploy-nextjs-to-vercel", + "tags": [] + }, + "/recipes/other/webpack-5": { + "id": "webpack-5", + "name": "Webpack 5 Migration", + "description": "", + "file": "shared/guides/webpack-5", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/webpack-5", + "tags": [] + }, + "/recipes/other/using-tailwind-css-in-react": { + "id": "using-tailwind-css-in-react", + "name": "Using Tailwind CSS in React", + "description": "", + "file": "shared/guides/using-tailwind-css-in-react", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/using-tailwind-css-in-react", + "tags": [] + }, + "/recipes/other/react-18": { + "id": "react-18", + "name": "React 18 Migration", + "description": "", + "file": "shared/guides/react-18", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/react-18", + "tags": [] + }, + "/recipes/other/using-tailwind-css-with-angular-projects": { + "id": "using-tailwind-css-with-angular-projects", + "name": "Using Tailwind CSS with Angular projects", + "description": "", + "file": "shared/guides/using-tailwind-css-with-angular-projects", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/using-tailwind-css-with-angular-projects", + "tags": [] + }, + "/recipes/other/misc-ngrx": { + "id": "misc-ngrx", + "name": "Using NgRx", + "description": "", + "file": "shared/guides/misc-ngrx", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/misc-ngrx", + "tags": [] + }, + "/recipes/other/misc-data-persistence": { + "id": "misc-data-persistence", + "name": "Using Data Persistence operators", + "description": "", + "file": "shared/guides/misc-data-persistence", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/misc-data-persistence", + "tags": [] + }, + "/recipes/other/customize-webpack": { + "id": "customize-webpack", + "name": "Customizing Webpack Config", + "description": "", + "file": "shared/guides/customize-webpack", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/customize-webpack", + "tags": ["use-task-executors"] + }, + "/recipes/other/react-nx": { + "id": "react-nx", + "name": "Powering Up React Development With Nx", + "description": "", + "file": "shared/examples/react-nx", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/react-nx", + "tags": [] + }, + "/recipes/other/apollo-react": { + "id": "apollo-react", + "name": "Using Apollo GraphQL", + "description": "", + "file": "shared/examples/apollo-react", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/apollo-react", + "tags": [] + }, + "/recipes/other/caching": { + "id": "caching", + "name": "Large Repo and Caching", + "description": "", + "file": "shared/examples/caching", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/caching", + "tags": [] + }, + "/recipes/other/dte": { + "id": "dte", + "name": "Large Repo and DTE", + "description": "", + "file": "shared/examples/dte", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/dte", + "tags": [] + }, + "/recipes/other/troubleshoot-cache-misses": { + "id": "troubleshoot-cache-misses", + "name": "Troubleshoot Cache Misses", + "description": "", + "file": "shared/recipes/troubleshoot-cache-misses", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/troubleshoot-cache-misses", + "tags": ["cache-task-results"] + }, + "/recipes/other/ban-dependencies-with-tags": { + "id": "ban-dependencies-with-tags", + "name": "Ban Dependencies with Certain Tags", + "description": "", + "file": "shared/recipes/ban-dependencies-with-tags", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/ban-dependencies-with-tags", + "tags": ["enforce-project-boundaries"] + }, + "/recipes/other/tag-multiple-dimensions": { + "id": "tag-multiple-dimensions", + "name": "Tag in Multiple Dimensions", + "description": "", + "file": "shared/recipes/tag-multiple-dimensions", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/tag-multiple-dimensions", + "tags": ["enforce-project-boundaries"] + }, + "/recipes/other/ban-external-imports": { + "id": "ban-external-imports", + "name": "Ban External Imports", + "description": "", + "file": "shared/recipes/ban-external-imports", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/ban-external-imports", + "tags": ["enforce-project-boundaries"] + }, + "/recipes/other/tags-allow-list": { + "id": "tags-allow-list", + "name": "Tags Allow List", + "description": "", + "file": "shared/recipes/tags-allow-list", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/tags-allow-list", + "tags": ["enforce-project-boundaries"] + }, + "/recipes/other/export-project-graph": { + "id": "export-project-graph", + "name": "Export Project Graph", + "description": "", + "file": "shared/recipes/export-project-graph", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/export-project-graph", + "tags": ["explore-graph"] + }, + "/recipes/other/resolve-circular-dependencies": { + "id": "resolve-circular-dependencies", + "name": "Resolve Circular Dependencies", + "description": "", + "file": "shared/recipes/resolve-circular-dependencies", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/resolve-circular-dependencies", + "tags": ["explore-graph"] + }, + "/recipes/other/include-all-packagejson": { + "id": "include-all-packagejson", + "name": "Include All package.json Files as Projects", + "description": "", + "file": "shared/recipes/include-all-packagejson", + "itemList": [], + "isExternal": false, + "path": "/recipes/other/include-all-packagejson", + "tags": [] + } +} diff --git a/docs/generated/manifests/tags.json b/docs/generated/manifests/tags.json new file mode 100644 index 0000000000000..f7460cb8b76fb --- /dev/null +++ b/docs/generated/manifests/tags.json @@ -0,0 +1,805 @@ +{ + "run-tasks": [ + { + "description": "", + "file": "shared/core-features/run-tasks", + "id": "run-tasks", + "name": "Run Tasks", + "path": "/core-features/run-tasks" + }, + { + "description": "", + "file": "shared/concepts/task-pipeline-configuration", + "id": "task-pipeline-configuration", + "name": "Task Pipeline Configuration", + "path": "/concepts/task-pipeline-configuration" + }, + { + "description": "", + "file": "shared/using-nx/affected", + "id": "affected", + "name": "Affected", + "path": "/concepts/affected" + }, + { + "description": "", + "file": "shared/recipes/root-level-scripts", + "id": "root-level-scripts", + "name": "Run Root-Level NPM Scripts with Nx", + "path": "/recipes/other/root-level-scripts" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/run", + "id": "run", + "name": "run", + "path": "/packages/nx/documents/run" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/run-many", + "id": "run-many", + "name": "run-many", + "path": "/packages/nx/documents/run-many" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/affected", + "id": "affected", + "name": "affected", + "path": "/packages/nx/documents/affected" + } + ], + "cache-task-results": [ + { + "description": "", + "file": "shared/core-features/cache-task-results", + "id": "cache-task-results", + "name": "Cache Task Results", + "path": "/core-features/cache-task-results" + }, + { + "description": "", + "file": "shared/concepts/how-caching-works", + "id": "how-caching-works", + "name": "How Caching Works", + "path": "/concepts/how-caching-works" + }, + { + "description": "", + "file": "shared/concepts/task-pipeline-configuration", + "id": "task-pipeline-configuration", + "name": "Task Pipeline Configuration", + "path": "/concepts/task-pipeline-configuration" + }, + { + "description": "", + "file": "shared/concepts/customizing-inputs", + "id": "customizing-inputs", + "name": "Customizing Inputs", + "path": "/more-concepts/customizing-inputs" + }, + { + "description": "", + "file": "", + "id": "nx-cloud-documentation", + "name": "Nx Cloud Documentation", + "path": "/nx-cloud/intro/what-is-nx-cloud" + }, + { + "description": "", + "file": "", + "id": "skip-nx-cache-flag", + "name": "--skip-nx-cache flag", + "path": "/nx/affected#skip-nx-cache" + }, + { + "description": "", + "file": "", + "id": "tasks-runner-options-property", + "name": "tasks-runner-options property", + "path": "/reference/nx-json#tasks-runner-options" + }, + { + "description": "", + "file": "", + "id": "nxjson-inputs", + "name": "nx.json reference: inputs and namedInputs", + "path": "/reference/nx-json#inputs-&-namedinputs" + }, + { + "description": "", + "file": "", + "id": "project-config-inputs", + "name": "Project Configuration reference: inputs and namedInputs", + "path": "/reference/project-configuration#inputs-&-namedinputs" + }, + { + "description": "", + "file": "shared/recipes/troubleshoot-cache-misses", + "id": "troubleshoot-cache-misses", + "name": "Troubleshoot Cache Misses", + "path": "/recipes/other/troubleshoot-cache-misses" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/connect-to-nx-cloud", + "id": "connect-to-nx-cloud", + "name": "connect-to-nx-cloud", + "path": "/packages/nx/documents/connect-to-nx-cloud" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/reset", + "id": "reset", + "name": "reset", + "path": "/packages/nx/documents/reset" + } + ], + "share-your-cache": [ + { + "description": "", + "file": "shared/core-features/share-your-cache", + "id": "share-your-cache", + "name": "Share Your Cache", + "path": "/core-features/share-your-cache" + } + ], + "explore-graph": [ + { + "description": "", + "file": "shared/core-features/explore-graph", + "id": "explore-graph", + "name": "Explore the Graph", + "path": "/core-features/explore-graph" + }, + { + "description": "", + "file": "shared/concepts/how-project-graph-is-built", + "id": "how-project-graph-is-built", + "name": "How the Project Graph is Built", + "path": "/more-concepts/how-project-graph-is-built" + }, + { + "description": "", + "file": "shared/extending-nx/project-graph-plugins", + "id": "project-graph-plugins", + "name": "Project Graph Plugins", + "path": "/recipes/advanced-plugins/project-graph-plugins" + }, + { + "description": "", + "file": "shared/recipes/analyze-source-files", + "id": "analyze-source-files", + "name": "Disable Graph Links Created from Analyzing Source Files", + "path": "/recipes/other/analyze-source-files" + }, + { + "description": "", + "file": "shared/recipes/export-project-graph", + "id": "export-project-graph", + "name": "Export Project Graph", + "path": "/recipes/other/export-project-graph" + }, + { + "description": "", + "file": "shared/recipes/resolve-circular-dependencies", + "id": "resolve-circular-dependencies", + "name": "Resolve Circular Dependencies", + "path": "/recipes/other/resolve-circular-dependencies" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/dep-graph", + "id": "dep-graph", + "name": "graph", + "path": "/packages/nx/documents/dep-graph" + } + ], + "distribute-task-execution": [ + { + "description": "", + "file": "shared/core-features/distribute-task-execution", + "id": "distribute-task-execution", + "name": "Distribute Task Execution", + "path": "/core-features/distribute-task-execution" + }, + { + "description": "", + "file": "shared/concepts/improve-worst-case-ci-times", + "id": "dte", + "name": "Improve Worst Case CI Times", + "path": "/concepts/dte" + }, + { + "description": "", + "file": "shared/concepts/illustrated-dte-guide", + "id": "illustrated-dte", + "name": "Illustrated Distributed Task Execution", + "path": "/more-concepts/illustrated-dte" + }, + { + "description": "", + "file": "", + "id": "nx-cloud-documentation", + "name": "Nx Cloud Documentation", + "path": "/nx-cloud/intro/what-is-nx-cloud" + }, + { + "description": "", + "file": "shared/ci-overview", + "id": "ci-setup", + "name": "CI Setup", + "path": "/recipes/ci/ci-setup" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/connect-to-nx-cloud", + "id": "connect-to-nx-cloud", + "name": "connect-to-nx-cloud", + "path": "/packages/nx/documents/connect-to-nx-cloud" + } + ], + "integrate-with-editors": [ + { + "description": "", + "file": "shared/core-features/integrate-with-editors", + "id": "integrate-with-editors", + "name": "Integrate with Editors", + "path": "/core-features/integrate-with-editors" + }, + { + "description": "", + "file": "shared/recipes/console-generate-command", + "id": "console-generate-command", + "name": "Nx Console Generate Command", + "path": "/recipes/nx-console/console-generate-command" + }, + { + "description": "", + "file": "shared/recipes/console-run-command", + "id": "console-run-command", + "name": "Nx Console Run Command", + "path": "/recipes/nx-console/console-run-command" + }, + { + "description": "", + "file": "shared/recipes/console-add-dependency-command", + "id": "console-add-dependency-command", + "name": "Nx Console Add Dependency Command", + "path": "/recipes/nx-console/console-add-dependency-command" + }, + { + "description": "", + "file": "shared/recipes/console-project-pane", + "id": "console-project-pane", + "name": "Nx Console Project Pane", + "path": "/recipes/nx-console/console-project-pane" + }, + { + "description": "", + "file": "shared/recipes/console-shortcuts", + "id": "console-shortcuts", + "name": "Nx Console Keyboard Shortcuts", + "path": "/recipes/nx-console/console-shortcuts" + } + ], + "automate-updating-dependencies": [ + { + "description": "", + "file": "shared/core-features/automate-updating-dependencies", + "id": "automate-updating-dependencies", + "name": "Automate Updating Dependencies", + "path": "/core-features/automate-updating-dependencies" + }, + { + "description": "", + "file": "shared/recipes/advanced-update", + "id": "advanced-update", + "name": "Advanced Update Nx", + "path": "/recipes/other/advanced-update" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/migrate", + "id": "migrate", + "name": "migrate", + "path": "/packages/nx/documents/migrate" + } + ], + "enforce-project-boundaries": [ + { + "description": "", + "file": "shared/core-features/enforce-project-boundaries", + "id": "enforce-project-boundaries", + "name": "Enforce Project Boundaries", + "path": "/core-features/enforce-project-boundaries" + }, + { + "description": "", + "file": "shared/monorepo-nx-enterprise", + "id": "monorepo-nx-enterprise", + "name": "Using Nx at Enterprises", + "path": "/more-concepts/monorepo-nx-enterprise" + }, + { + "description": "", + "file": "shared/workspace/applications-and-libraries", + "id": "applications-and-libraries", + "name": "Applications and Libraries", + "path": "/more-concepts/applications-and-libraries" + }, + { + "description": "", + "file": "shared/workspace/creating-libraries", + "id": "creating-libraries", + "name": "Creating Libraries", + "path": "/more-concepts/creating-libraries" + }, + { + "description": "", + "file": "shared/workspace/library-types", + "id": "library-types", + "name": "Library Types", + "path": "/more-concepts/library-types" + }, + { + "description": "", + "file": "shared/workspace/grouping-libraries", + "id": "grouping-libraries", + "name": "Grouping Libraries", + "path": "/more-concepts/grouping-libraries" + }, + { + "description": "", + "file": "shared/reference/nxignore", + "id": "nxignore", + "name": ".nxignore", + "path": "/reference/nxignore" + }, + { + "description": "", + "file": "", + "id": "nxjson-workspaceLayout", + "name": "nx.json workspaceLayout property", + "path": "/reference/nx-json#workspace-layout" + }, + { + "description": "", + "file": "shared/eslint", + "id": "eslint", + "name": "Using ESLint in Nx Workspaces", + "path": "/recipes/other/eslint" + }, + { + "description": "", + "file": "shared/recipes/ban-dependencies-with-tags", + "id": "ban-dependencies-with-tags", + "name": "Ban Dependencies with Certain Tags", + "path": "/recipes/other/ban-dependencies-with-tags" + }, + { + "description": "", + "file": "shared/recipes/tag-multiple-dimensions", + "id": "tag-multiple-dimensions", + "name": "Tag in Multiple Dimensions", + "path": "/recipes/other/tag-multiple-dimensions" + }, + { + "description": "", + "file": "shared/recipes/ban-external-imports", + "id": "ban-external-imports", + "name": "Ban External Imports", + "path": "/recipes/other/ban-external-imports" + }, + { + "description": "", + "file": "shared/recipes/tags-allow-list", + "id": "tags-allow-list", + "name": "Tags Allow List", + "path": "/recipes/other/tags-allow-list" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/format-check", + "id": "format-check", + "name": "format:check", + "path": "/packages/nx/documents/format-check" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/format-write", + "id": "format-write", + "name": "format:write", + "path": "/packages/nx/documents/format-write" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/workspace-lint", + "id": "workspace-lint", + "name": "workspace-lint", + "path": "/packages/nx/documents/workspace-lint" + } + ], + "use-task-executors": [ + { + "description": "", + "file": "shared/plugin-features/use-task-executors", + "id": "use-task-executors", + "name": "Use Task Executors", + "path": "/plugin-features/use-task-executors" + }, + { + "description": "", + "file": "shared/concepts/task-pipeline-configuration", + "id": "task-pipeline-configuration", + "name": "Task Pipeline Configuration", + "path": "/concepts/task-pipeline-configuration" + }, + { + "description": "", + "file": "shared/incremental-builds", + "id": "incremental-builds", + "name": "Incremental Builds", + "path": "/more-concepts/incremental-builds" + }, + { + "description": "", + "file": "shared/reference/project-configuration", + "id": "project-configuration", + "name": "Project Configuration", + "path": "/reference/project-configuration" + }, + { + "description": "", + "file": "shared/recipes/use-executor-configurations", + "id": "use-executor-configurations", + "name": "Use Executor Configurations", + "path": "/recipes/executors/use-executor-configurations" + }, + { + "description": "", + "file": "shared/running-custom-commands", + "id": "run-commands-executor", + "name": "Running Custom Commands", + "path": "/recipes/executors/run-commands-executor" + }, + { + "description": "", + "file": "shared/recipes/local-executors", + "id": "creating-custom-executors", + "name": "Local Executors", + "path": "/recipes/executors/creating-custom-executors" + }, + { + "description": "", + "file": "shared/recipes/compose-executors", + "id": "compose-executors", + "name": "Compose Executors", + "path": "/recipes/executors/compose-executors" + }, + { + "description": "", + "file": "shared/guides/module-federation/faster-builds", + "id": "faster-builds", + "name": "Faster Builds with Module Federation", + "path": "/recipes/module-federation/faster-builds" + }, + { + "description": "", + "file": "shared/recipes/module-federation-with-ssr", + "id": "module-federation-with-ssr", + "name": "Setup Module Federation with SSR for Angular and React", + "path": "/recipes/module-federation/module-federation-with-ssr" + }, + { + "description": "", + "file": "shared/guides/module-federation/dynamic-mfe-angular", + "id": "dynamic-module-federation-with-angular", + "name": "Advanced Micro Frontends with Angular using Dynamic Federation", + "path": "/recipes/module-federation/dynamic-module-federation-with-angular" + }, + { + "description": "", + "file": "shared/guides/performance-profiling", + "id": "performance-profiling", + "name": "Profiling Build Performance", + "path": "/recipes/other/performance-profiling" + }, + { + "description": "", + "file": "shared/guides/customize-webpack", + "id": "customize-webpack", + "name": "Customizing Webpack Config", + "path": "/recipes/other/customize-webpack" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/run", + "id": "run", + "name": "run", + "path": "/packages/nx/documents/run" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/run-many", + "id": "run-many", + "name": "run-many", + "path": "/packages/nx/documents/run-many" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/affected", + "id": "affected", + "name": "affected", + "path": "/packages/nx/documents/affected" + } + ], + "use-code-generators": [ + { + "description": "", + "file": "shared/plugin-features/use-code-generators", + "id": "use-code-generators", + "name": "Use Code Generators", + "path": "/plugin-features/use-code-generators" + }, + { + "description": "", + "file": "shared/monorepo-nx-enterprise", + "id": "monorepo-nx-enterprise", + "name": "Using Nx at Enterprises", + "path": "/more-concepts/monorepo-nx-enterprise" + }, + { + "description": "", + "file": "", + "id": "nxjson-generator-defaults", + "name": "nx.json generator defaults", + "path": "/reference/nx-json#generators" + }, + { + "description": "", + "file": "shared/recipes/local-generators", + "id": "local-generators", + "name": "Local Generators", + "path": "/recipes/generators/local-generators" + }, + { + "description": "", + "file": "shared/generators/composing-generators", + "id": "composing-generators", + "name": "Composing Generators", + "path": "/recipes/generators/composing-generators" + }, + { + "description": "", + "file": "shared/generators/generator-options", + "id": "generator-options", + "name": "Generator Options", + "path": "/recipes/generators/generator-options" + }, + { + "description": "", + "file": "shared/generators/creating-files", + "id": "creating-files", + "name": "Creating Files", + "path": "/recipes/generators/creating-files" + }, + { + "description": "", + "file": "shared/generators/modifying-files", + "id": "modifying-files", + "name": "Modifying Files", + "path": "/recipes/generators/modifying-files" + }, + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/generate", + "id": "generate", + "name": "generate", + "path": "/packages/nx/documents/generate" + } + ], + "create-your-own-plugin": [ + { + "description": "", + "file": "shared/plugin-features/create-your-own-plugin", + "id": "create-your-own-plugin", + "name": "Create Your Own Plugin", + "path": "/plugin-features/create-your-own-plugin" + }, + { + "description": "", + "file": "shared/guides/nx-devkit-angular-devkit", + "id": "nx-devkit-angular-devkit", + "name": "Nx Devkit and Angular Devkit", + "path": "/more-concepts/nx-devkit-angular-devkit" + }, + { + "description": "", + "file": "", + "id": "packages-devkit", + "name": "Nx Devkit", + "path": "/packages#devkit" + }, + { + "description": "", + "file": "shared/extending-nx/project-inference-plugins", + "id": "project-inference-plugins", + "name": "Project Inference Plugins", + "path": "/recipes/advanced-plugins/project-inference-plugins" + }, + { + "description": "", + "file": "shared/extending-nx/project-graph-plugins", + "id": "project-graph-plugins", + "name": "Project Graph Plugins", + "path": "/recipes/advanced-plugins/project-graph-plugins" + } + ], + "intro": [ + { + "description": "", + "file": "shared/concepts/integrated-vs-package-based", + "id": "integrated-vs-package-based", + "name": "Integrated Repos vs. Package-Based Repos", + "path": "/concepts/integrated-vs-package-based" + }, + { + "description": "", + "file": "shared/mental-model", + "id": "mental-model", + "name": "Mental Model", + "path": "/concepts/mental-model" + } + ], + "environment-variables": [ + { + "description": "", + "file": "shared/reference/environment-variables", + "id": "environment-variables", + "name": "Environment Variables", + "path": "/reference/environment-variables" + }, + { + "description": "", + "file": "shared/guides/define-environment-variables", + "id": "define-environment-variables", + "name": "Define Environment Variables", + "path": "/recipes/environment-variables/define-environment-variables" + }, + { + "description": "", + "file": "shared/guides/use-environment-variables-in-react", + "id": "use-environment-variables-in-react", + "name": "Use Environment Variables in React", + "path": "/recipes/environment-variables/use-environment-variables-in-react" + }, + { + "description": "", + "file": "shared/guides/use-environment-variables-in-angular", + "id": "use-environment-variables-in-angular", + "name": "Use Environment Variables in Angular", + "path": "/recipes/environment-variables/use-environment-variables-in-angular" + }, + { + "description": "", + "file": "shared/guides/performance-profiling", + "id": "performance-profiling", + "name": "Profiling Build Performance", + "path": "/recipes/other/performance-profiling" + } + ], + "docker": [ + { + "description": "", + "file": "shared/recipes/ci-deployment", + "id": "ci-deployment", + "name": "Prepare applications for deployment via CI", + "path": "/recipes/ci/ci-deployment" + } + ], + "deploy": [ + { + "description": "", + "file": "shared/recipes/ci-deployment", + "id": "ci-deployment", + "name": "Prepare applications for deployment via CI", + "path": "/recipes/ci/ci-deployment" + } + ], + "module-federation": [ + { + "description": "", + "file": "shared/guides/module-federation/faster-builds", + "id": "faster-builds", + "name": "Faster Builds with Module Federation", + "path": "/recipes/module-federation/faster-builds" + }, + { + "description": "", + "file": "shared/recipes/module-federation-with-ssr", + "id": "module-federation-with-ssr", + "name": "Setup Module Federation with SSR for Angular and React", + "path": "/recipes/module-federation/module-federation-with-ssr" + }, + { + "description": "", + "file": "shared/guides/module-federation/dynamic-mfe-angular", + "id": "dynamic-module-federation-with-angular", + "name": "Advanced Micro Frontends with Angular using Dynamic Federation", + "path": "/recipes/module-federation/dynamic-module-federation-with-angular" + } + ], + "angular": [ + { + "description": "", + "file": "shared/guides/module-federation/faster-builds", + "id": "faster-builds", + "name": "Faster Builds with Module Federation", + "path": "/recipes/module-federation/faster-builds" + }, + { + "description": "", + "file": "shared/recipes/module-federation-with-ssr", + "id": "module-federation-with-ssr", + "name": "Setup Module Federation with SSR for Angular and React", + "path": "/recipes/module-federation/module-federation-with-ssr" + }, + { + "description": "", + "file": "shared/guides/module-federation/dynamic-mfe-angular", + "id": "dynamic-module-federation-with-angular", + "name": "Advanced Micro Frontends with Angular using Dynamic Federation", + "path": "/recipes/module-federation/dynamic-module-federation-with-angular" + } + ], + "react": [ + { + "description": "", + "file": "shared/guides/module-federation/faster-builds", + "id": "faster-builds", + "name": "Faster Builds with Module Federation", + "path": "/recipes/module-federation/faster-builds" + }, + { + "description": "", + "file": "shared/recipes/module-federation-with-ssr", + "id": "module-federation-with-ssr", + "name": "Setup Module Federation with SSR for Angular and React", + "path": "/recipes/module-federation/module-federation-with-ssr" + } + ], + "storybook": [ + { + "description": "", + "file": "shared/recipes/one-storybook-for-all", + "id": "one-storybook-for-all", + "name": "Publishing Storybook: One main Storybook instance for all projects", + "path": "/recipes/storybook/one-storybook-for-all" + }, + { + "description": "", + "file": "shared/recipes/one-storybook-per-scope", + "id": "one-storybook-per-scope", + "name": "Publishing Storybook: One Storybook instance per scope", + "path": "/recipes/storybook/one-storybook-per-scope" + }, + { + "description": "", + "file": "shared/recipes/one-storybook-with-composition", + "id": "one-storybook-with-composition", + "name": "Publishing Storybook: One main Storybook instance using Storybook Composition", + "path": "/recipes/storybook/one-storybook-with-composition" + } + ], + "workspace-watching": [ + { + "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", + "file": "generated/packages/generated/packages/nx/documents/watch", + "id": "watch", + "name": "watch", + "path": "/packages/nx/documents/watch" + } + ] +} diff --git a/docs/generated/packages/add-nx-to-monorepo.json b/docs/generated/packages/add-nx-to-monorepo.json deleted file mode 100644 index 7e9b8a3730777..0000000000000 --- a/docs/generated/packages/add-nx-to-monorepo.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "add-nx-to-monorepo", - "packageName": "add-nx-to-monorepo", - "description": "Make any monorepo faster by adding Nx to it", - "root": "/packages/add-nx-to-monorepo", - "source": "/packages/add-nx-to-monorepo/src", - "documentation": [], - "generators": [], - "executors": [] -} diff --git a/docs/generated/packages/angular.json b/docs/generated/packages/angular.json deleted file mode 100644 index b1df803d10df9..0000000000000 --- a/docs/generated/packages/angular.json +++ /dev/null @@ -1,4041 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "angular", - "packageName": "@nrwl/angular", - "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Cypress, Karma, and Protractor. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.", - "root": "/packages/angular", - "source": "/packages/angular/src", - "documentation": [ - { - "name": "Overview", - "id": "overview", - "path": "/packages/angular", - "file": "shared/angular-plugin", - "content": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides:\n\n- Integration with libraries such as Storybook, Jest, Cypress, Karma, and Protractor.\n- Generators to help scaffold code quickly, including:\n - Micro Frontends\n - Libraries, both internal to your codebase and publishable to npm\n - Upgrading AngularJS applications\n - Single Component Application Modules (SCAMs)\n- NgRx helpers.\n- Utilities for automatic workspace refactoring.\n\n{% callout type=\"note\" title=\"Currently using the Angular CLI?\" %}\nYou can easily and mostly **automatically migrate from an Angular CLI** project to Nx! Learn more [here](/recipes/adopting-nx/migration-angular).\n{% /callout %}\n\n## Setting up the Angular plugin\n\nAdding the Angular plugin to an existing Nx workspace can be done with the following:\n\n```shell\nyarn add -D @nrwl/angular\n```\n\n```shell\nnpm install -D @nrwl/angular\n```\n\n## Using the Angular Plugin\n\n### Generating an application\n\nIt's straightforward to generate an Angular application:\n\n```shell\nnx g @nrwl/angular:app appName\n```\n\nBy default, the application will be generated with:\n\n- ESLint as the linter.\n- Jest as the unit test runner.\n- Cypress as the E2E test runner.\n\nWe can then serve, build, test, lint, and run e2e tests on the application with the following commands:\n\n```shell\nnx serve appName\nnx build appName\nnx test appName\nnx lint appName\nnx e2e appName\n```\n\n### Generating a library\n\nGenerating an Angular library is very similar to generating an application:\n\n```shell\nnx g @nrwl/angular:lib libName\n```\n\nBy default, the library will be generated with:\n\n- ESLint as the linter.\n- Jest as the unit test runner.\n\nWe can then test and lint the library with the following commands:\n\n```shell\nnx test libName\nnx lint libName\n```\n\nRead more about:\n\n- [Creating Libraries](/more-concepts/creating-libraries)\n- [Library Types](/more-concepts/library-types)\n- [Buildable and Publishable Libraries](/more-concepts/buildable-and-publishable-libraries)\n\n## More Documentation\n\n- [Angular Nx Tutorial](/angular-tutorial/1-code-generation)\n- [Migrating from the Angular CLI](recipe/migration-angular)\n- [Setup Module Federation with Angular and Nx](/recipes/module-federation/faster-builds)\n- [Using NgRx](/recipes/other/misc-ngrx)\n- [Using Data Persistence operators](/recipes/other/misc-data-persistence)\n- [Upgrading an AngularJS application to Angular](/recipes/adopting-nx/migration-angularjs)\n- [Using Tailwind CSS with Angular projects](/recipes/other/using-tailwind-css-with-angular-projects)\n" - }, - { - "name": "Angular and Nx Version Matrix", - "id": "angular-nx-version-matrix", - "file": "shared/angular-nx-version-matrix", - "path": "/angular-nx-version-matrix", - "content": "# Nx and Angular Version Compatibility Matrix\n\nBelow is a reference table that matches versions of Angular to the version of Nx that is compatible with it. The table shows the version of Angular, the recommended version of Nx to use and the range of Nx versions that support the version of Angular.\n\nWe provide a recommended version, and it is usually the latest minor version of Nx in the range provided because there will have been bug fixes added since the first release in the range.\n\n| Angular Version | **Nx Version _(recommended)_** | Nx Version _(range)_ |\n| --------------- | ------------------------------ | -------------------- |\n| ~15.0.0 | **latest** | 15.2.0 <= latest |\n| ~14.2.0 | **15.1.1** | 14.6.0 <= 15.1.1 |\n| ~14.1.0 | **14.5.10** | 14.5.0 <= 14.5.10 |\n| ~14.0.0 | **14.4.3** | 14.2.1 <= 14.4.3 |\n| ^13.0.0 | **14.1.9** | 13.2.0 <= 14.1.9 |\n| ^12.0.0 | **13.1.4** | 12.3.0 <= 13.1.4 |\n| ^11.0.0 | **12.2.0** | 11.0.0 <= 12.2.0 |\n| ^10.0.0 | **10.4.15** | 9.7.0 <= 10.4.15 |\n| ^9.0.0 | **9.6.0** | 8.12.4 <= 9.6.0 |\n| ^8.0.0 | **8.12.2** | 8.7.0 <= 8.12.2 |\n\nIf you would like to see how the supported versions of Node and Typescript for the version of Angular you are using, [Lars Gyrup Brink Nielsen](https://twitter.com/LayZeeDK) has a very good resource for that [here](https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3).\n" - } - ], - "generators": [ - { - "name": "add-linting", - "factory": "./src/generators/add-linting/add-linting", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularAddLintingGenerator", - "title": "Add linting to an Angular project.", - "description": "Adds linting configuration to an Angular project.", - "cli": "nx", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:add-linting --prefix=cool --projectName=cool-lib --projectRoot=libs/cool-lib", - "description": "Adds ESLint with Angular-specific rules for an existing project named `cool-lib` with the [prefix](https://angular.io/guide/styleguide#style-02-07) `cool`" - } - ], - "properties": { - "prefix": { - "type": "string", - "format": "html-selector", - "description": "The prefix to apply to generated selectors." - }, - "projectName": { - "type": "string", - "description": "The name of the project." - }, - "projectRoot": { - "type": "string", - "description": "The path to the root of the selected project." - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files.", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - } - }, - "additionalProperties": false, - "required": ["prefix", "projectName", "projectRoot"], - "presets": [] - }, - "description": "Adds linting configuration to an Angular project.", - "hidden": true, - "implementation": "/packages/angular/src/generators/add-linting/add-linting.ts", - "aliases": [], - "path": "/packages/angular/src/generators/add-linting/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorNxApp", - "title": "Creates an Angular application.", - "description": "Creates an Angular application.", - "type": "object", - "cli": "nx", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the application?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less"], - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "sass", - "label": "SASS(.sass) [ http://sass-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - } - ] - } - }, - "routing": { - "type": "boolean", - "description": "Generate a routing module.", - "default": false, - "x-prompt": "Would you like to configure routing for this application?" - }, - "inlineStyle": { - "description": "Specifies if the style will be in the ts file.", - "type": "boolean", - "default": false, - "alias": "s" - }, - "inlineTemplate": { - "description": "Specifies if the template will be in the ts file.", - "type": "boolean", - "default": false, - "alias": "t" - }, - "viewEncapsulation": { - "description": "Specifies the view encapsulation strategy.", - "enum": ["Emulated", "None", "ShadowDom"], - "type": "string" - }, - "prefix": { - "type": "string", - "format": "html-selector", - "description": "The prefix to apply to generated selectors.", - "alias": "p" - }, - "skipTests": { - "description": "Skip creating spec files.", - "type": "boolean", - "default": false, - "alias": "S" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "unitTestRunner": { - "type": "string", - "enum": ["karma", "jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["protractor", "cypress", "none"], - "description": "Test runner to use for end to end (E2E) tests. The `protractor` option is deprecated and it will be removed in v15.", - "default": "cypress" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting)." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "backendProject": { - "type": "string", - "description": "Backend project that provides data to this application. This sets up `proxy.config.json`." - }, - "strict": { - "type": "boolean", - "description": "Create an application with stricter type checking and build optimization options.", - "default": true - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "port": { - "type": "number", - "description": "The port at which the remote application should be served." - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "addTailwind": { - "type": "boolean", - "description": "Whether to configure Tailwind CSS for the application.", - "default": false - }, - "skipDefaultProject": { - "description": "Skip setting the project as the default project. When `false` (the default), the project is set as the default project only if there is no default project already set.", - "type": "boolean", - "default": false - }, - "standalone": { - "description": "Generate an application that is setup to use standalone components.", - "type": "boolean", - "default": false - }, - "rootProject": { - "description": "Create an application at the root of the workspace.", - "type": "boolean", - "default": false, - "hidden": true - } - }, - "additionalProperties": false, - "required": ["name"], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/angular:application my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory and style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n```bash\nnx g @nrwl/angular:app my-app --directory=my-dir --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Components application\" %}\n\nCreate an application with Single File Components (inline styles and inline templates):\n\n```bash\nnx g @nrwl/angular:app my-app --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Standalone Components application\" %}\n\nCreate an application that is setup to use standalone components:\n\n```bash\nnx g @nrwl/angular:app my-app --standalone\n```\n\n{% /tab %}\n\n{% tab label=\"Set custom prefix and tags\" %}\n\nSet the prefix to apply to generated selectors and add tags to the application (used for linting).\n\n```bash\nnx g @nrwl/angular:app my-app --prefix=admin --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Creates an Angular application.", - "implementation": "/packages/angular/src/generators/application/application.ts", - "hidden": false, - "path": "/packages/angular/src/generators/application/schema.json" - }, - { - "name": "component", - "factory": "./src/generators/component/component", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "SchematicsAngularComponent", - "title": "Angular Component Schema", - "cli": "nx", - "type": "object", - "description": "Creates a new, generic Angular component definition in the given or default project.", - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "format": "path", - "description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.", - "visible": false - }, - "project": { - "type": "string", - "description": "The name of the project.", - "x-dropdown": "projects" - }, - "name": { - "type": "string", - "description": "The name of the component.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the component?" - }, - "displayBlock": { - "description": "Specifies if the style will contain `:host { display: block; }`.", - "type": "boolean", - "default": false, - "alias": "b" - }, - "inlineStyle": { - "description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.", - "type": "boolean", - "default": false, - "alias": "s" - }, - "inlineTemplate": { - "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.", - "type": "boolean", - "default": false, - "alias": "t" - }, - "standalone": { - "description": "Whether the generated component is standalone.", - "type": "boolean", - "default": false - }, - "viewEncapsulation": { - "description": "The view encapsulation strategy to use in the new component.", - "enum": ["Emulated", "None", "ShadowDom"], - "type": "string", - "alias": "v" - }, - "changeDetection": { - "description": "The change detection strategy to use in the new component.", - "enum": ["Default", "OnPush"], - "type": "string", - "default": "Default", - "alias": "c" - }, - "module": { - "type": "string", - "description": "The filename or path to the NgModule that will declare this component.", - "alias": "m" - }, - "style": { - "description": "The file extension or preprocessor to use for style files, or `none` to skip generating the style file.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less", "none"] - }, - "skipTests": { - "type": "boolean", - "description": "Do not create `spec.ts` test files for the new component.", - "default": false - }, - "flat": { - "type": "boolean", - "description": "Create the new files at the top level of the current project.", - "default": false - }, - "skipImport": { - "type": "boolean", - "description": "Do not import this component into the owning NgModule.", - "default": false - }, - "selector": { - "type": "string", - "format": "html-selector", - "description": "The HTML selector to use for this component." - }, - "skipSelector": { - "type": "boolean", - "default": false, - "description": "Specifies if the component should have a selector or not." - }, - "type": { - "type": "string", - "description": "Adds a developer-defined type to the filename, in the format `name.type.ts`.", - "default": "component" - }, - "export": { - "type": "boolean", - "description": "Specifies if the component should be exported in the declaring `NgModule`. Additionally, if the project is a library, the component will be exported from the project's entry point (normally `index.ts`) if the module it belongs to is also exported or if the component is standalone.", - "default": false - } - }, - "required": ["name"], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nCreate a component named `my-component`:\n\n```bash\nnx g @nrwl/angular:component my-component\n```\n\n{% /tab %}\n\n{% tab label=\"Standalone Component\" %}\n\nCreate a standalone component named `my-component`:\n\n```bash\nnx g @nrwl/angular:component my-component --standalone\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nrwl/angular:component my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nrwl/angular:component my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n", - "presets": [] - }, - "aliases": ["c"], - "description": "Generate an Angular Component.", - "implementation": "/packages/angular/src/generators/component/component.ts", - "hidden": false, - "path": "/packages/angular/src/generators/component/schema.json" - }, - { - "name": "component-cypress-spec", - "factory": "./src/generators/component-cypress-spec/component-cypress-spec", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularComponentCypressSpecGenerator", - "type": "object", - "cli": "nx", - "description": "Creates a Cypress spec for a UI component that has a story.", - "properties": { - "projectName": { - "type": "string", - "description": "The name of the project.", - "examples": ["ui-samples"] - }, - "projectPath": { - "type": "string", - "description": "Path to the project.", - "examples": ["libs/ui-samples"] - }, - "componentName": { - "type": "string", - "description": "Class name of the component.", - "examples": ["AwesomeComponent"] - }, - "componentPath": { - "type": "string", - "description": "Relative path to the component file from the project root.", - "examples": ["awesome"] - }, - "componentFileName": { - "type": "string", - "description": "Component file name without the `.ts` extension.", - "examples": ["awesome.component"] - }, - "cypressProject": { - "type": "string", - "description": "The Cypress project to generate the stories under. By default, inferred from `projectName`." - }, - "specDirectory": { - "type": "string", - "description": "Directory where to place the generated spec file. By default matches the value of the `componentPath` option." - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": [ - "projectName", - "projectPath", - "componentName", - "componentPath", - "componentFileName" - ], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\nCreate a cypress spec for a component that is set up with Storybook.\n\n```bash\nnx g @nrwl/angular:component-cypress-spec --componentName=MyButtonComponent --componentPath=libs/ui/src/lib/button/button.component.ts --componentFileName=button.component --projectName=ui --projectPath=libs/ui\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Creates a Cypress spec for a UI component that has a story.", - "hidden": true, - "implementation": "/packages/angular/src/generators/component-cypress-spec/component-cypress-spec.ts", - "aliases": [], - "path": "/packages/angular/src/generators/component-cypress-spec/schema.json" - }, - { - "name": "component-story", - "factory": "./src/generators/component-story/component-story", - "schema": { - "$schema": "https://json-schema.org/schema", - "$id": "NxAngularComponentStoryGenerator", - "type": "object", - "cli": "nx", - "description": "Creates a `stories.ts` file for an Angular component.", - "properties": { - "projectPath": { - "type": "string", - "description": "Path to the project.", - "examples": ["libs/ui-samples"] - }, - "componentName": { - "type": "string", - "description": "Class name of the component.", - "examples": ["AwesomeComponent"] - }, - "componentPath": { - "type": "string", - "description": "Relative path to the component file from the project root.", - "examples": ["awesome"] - }, - "componentFileName": { - "type": "string", - "description": "Component file name without the `.ts` extension.", - "examples": ["awesome.component"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": [ - "projectPath", - "componentName", - "componentPath", - "componentFileName" - ], - "presets": [] - }, - "description": "Creates a stories.ts file for a component.", - "hidden": true, - "implementation": "/packages/angular/src/generators/component-story/component-story.ts", - "aliases": [], - "path": "/packages/angular/src/generators/component-story/schema.json" - }, - { - "name": "component-test", - "factory": "./src/generators/component-test/component-test", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularComponentTestGenerator", - "type": "object", - "cli": "nx", - "description": "Create a `*.cy.ts` file for Cypress component testing for an Angular component.", - "properties": { - "project": { - "type": "string", - "description": "The name of the project where the component is located.", - "x-dropdown": "projects", - "x-prompt": "What project is the component located in?" - }, - "componentName": { - "type": "string", - "description": "Class name of the component to create a test for.", - "examples": ["MyFancyButtonComponent"], - "x-prompt": "What is the class name of the component to create a test for?" - }, - "componentDir": { - "type": "string", - "description": "Relative path to the folder that contains the component from the project root.", - "examples": ["src/lib/my-fancy-button"], - "x-prompt": "What is the path to the component directory from the project root?" - }, - "componentFileName": { - "type": "string", - "description": "File name that contains the component without the `.ts` extension.", - "examples": ["my-fancy-button.component"], - "x-prompt": "What is the file name that contains the component?" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": [ - "project", - "componentName", - "componentDir", - "componentFileName" - ], - "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nAngular component testing with Nx requires **Cypress version 10.7.0** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you're wanting to create Cypress tests for a Storybook story, then check out the [component-cypress-spec generator docs](/packages/angular/generators/component-cypress-spec)\n\nIf you're wanting to create Storybook stories for a component, then check out the [stories generator docs](/packages/angular/generators/stories) or [component-story generator docs](/packages/angular/generators/component-cypress-spec)\n{% /callout %}\n\nThis generator is used to create a Cypress component test file for a given Angular component.\n\n```shell\nnx g @nrwl/angular:component-test --project=my-cool-angular-project --componentName=CoolBtnComponent --componentDir=src/cool-btn --componentFileName=cool-btn.component\n```\n\nTest file are generated with the `.cy.ts` suffix. this is to prevent colliding with any existing `.spec.` files contained in the project.\n\nIt's currently expected the generated `.cy.ts` file will live side by side with the component. It is also assumed the project is already setup for component testing. If it isn't, then you can run the [cypress-component-project generator](/packages/angular/generators/cypress-component-configuration) to set up the project for component testing.\n", - "presets": [] - }, - "description": "Creates a cypress component test file for a component.", - "implementation": "/packages/angular/src/generators/component-test/component-test.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/component-test/schema.json" - }, - { - "name": "convert-tslint-to-eslint", - "factory": "./src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularConvertTSLintToESLintGenerator", - "cli": "nx", - "title": "Convert an Angular project from TSLint to ESLint", - "description": "Convert an Angular project from TSLint to ESLint. NOTE: Does not work in `--dry-run mode`.", - "examples": [ - { - "command": "nx g convert-tslint-to-eslint myapp", - "description": "The following will first configure the project, `myapp`, the same way a _new_ project is configured i.e. It will use Nx's new recommended ESLint config. By default, this also adds the existing TSLint configuration on top of the default ESLint config from Nx to continue checking what it checks today. This is done by migrating TSLint rules to their equivalent ESLint rules to the best of its abilities. Some TSLint rules may not have ESLint equivalents and will be reported during the conversion" - }, - { - "command": "nx g convert-tslint-to-eslint myapp --ignoreExistingTslintConfig=true", - "description": "If your TSLint config isn't extremely important to you, ignoring it makes this process more deterministic. Unlike the prior example, this will discard the existing TSLint configuration, meaning that the project will only have the Nx's latest recommended ESLint configuration which may be good enough for some workspaces" - }, - { - "command": "nx g convert-tslint-to-eslint myapp --removeTSLintIfNoMoreTSLintTargets=false", - "description": "By default, this process removes the TSLint related dependencies and configuration once no more projects use TSLint. This can be disabled with the following flag to keep TSLint related dependencies and configuration in the repo" - } - ], - "type": "object", - "properties": { - "project": { - "description": "The name of the Angular project to convert. Please note, if the project is an Angular app with an associated Cypress e2e project, it will also attempt to convert that.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "Which Angular project would you like to convert from TSLint to ESLint?" - }, - "ignoreExistingTslintConfig": { - "type": "boolean", - "description": "If true, it will not use existing TSLint config as a reference, it will just reset the project with the latest recommended ESLint config.", - "default": false, - "x-prompt": "Would you like to ignore the existing TSLint config? Recommended if the TSLint config has not been altered much as it makes the new ESLint config cleaner." - }, - "removeTSLintIfNoMoreTSLintTargets": { - "type": "boolean", - "description": "If this conversion leaves no more TSLint usage in the workspace, it will remove TSLint and related dependencies and configuration.", - "default": true, - "x-prompt": "Would you like to remove TSLint and its related config if there are no TSLint projects remaining after this conversion?" - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files.", - "default": false - } - }, - "additionalProperties": false, - "required": ["project"], - "presets": [] - }, - "description": "Converts a project from TSLint to ESLint.", - "implementation": "/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/convert-tslint-to-eslint/schema.json" - }, - { - "name": "downgrade-module", - "factory": "./src/generators/downgrade-module/downgrade-module", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxDowngradeModuleGenerator", - "title": "Generates downgradeModule setup.", - "description": "Sets up a Downgrade Module for using AngularJS and Angular.", - "cli": "nx", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project." - }, - "name": { - "type": "string", - "description": "The name of the main AngularJS module.", - "$default": { "$source": "argv", "index": 0 } - }, - "angularJsImport": { - "type": "string", - "description": "Import expression of the AngularJS application (e.g., `--angularJsImport=some_node_module/my_app`)." - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files.", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "description": "Do not add `@angular/upgrade` to `package.json` (e.g., `--skipPackageJson`).", - "default": false - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "examplesFile": "## Examples\n\nBelow are some examples of how to generate configuration and setup for using `ngUpgrade`'s `DowngradeModule` for your application.\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\n```bash\nnx g @nrwl/angular:downgrade-module --name=myAngularJsModule --project=myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Setup Router\" %}\n\nAllow a setup that configures routing for `DowngradeModule`.\n\n```bash\nnx g @nrwl/angular:downgrade-module --name=myAngularJsModule --project=myapp --router=true\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Sets up a Downgrade Module.", - "implementation": "/packages/angular/src/generators/downgrade-module/downgrade-module.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/downgrade-module/schema.json" - }, - { - "name": "init", - "factory": "./src/generators/init/init", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "SchematicsAngularModuleInit", - "cli": "nx", - "title": "Init Angular Plugin", - "description": "Initializes the `@nrwl/angular` plugin. NOTE: Does not work in the `--dry-run` mode.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:init --style=scss", - "description": "Installs angular dependencies and initializes the `@nrwl/angular` plugin with the `scss` stylesheet format." - } - ], - "properties": { - "unitTestRunner": { - "type": "string", - "enum": ["karma", "jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["protractor", "cypress", "none"], - "description": "Test runner to use for end to end (e2e) tests.", - "default": "cypress" - }, - "skipInstall": { - "type": "boolean", - "description": "Skip installing after adding `@nrwl/workspace`.", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less"], - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "sass", - "label": "SASS(.sass) [ http://sass-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - } - ] - } - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - } - }, - "additionalProperties": false, - "presets": [] - }, - "description": "Initializes the `@nrwl/angular` plugin.", - "hidden": true, - "implementation": "/packages/angular/src/generators/init/init.ts", - "aliases": [], - "path": "/packages/angular/src/generators/init/schema.json" - }, - { - "name": "karma", - "factory": "./src/generators/karma/karma", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularKarmaGenerator", - "title": "Add Karma Configuration to the workspace.", - "description": "Add Karma configuration to an Nx workspace.", - "cli": "nx", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:karma", - "description": "Add a base karma configuration to the workspace." - } - ], - "properties": { - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - } - }, - "additionalProperties": false, - "required": [], - "presets": [] - }, - "description": "Adds Karma configuration to a workspace.", - "implementation": "/packages/angular/src/generators/karma/karma.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/karma/schema.json" - }, - { - "name": "karma-project", - "factory": "./src/generators/karma-project/karma-project", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxKarmaProjectGenerator", - "title": "Create Karma Configuration for a project", - "description": "Add Karma configuration to an angular project.", - "cli": "nx", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "x-dropdown": "projects" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "description": "Skip updating package.json.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": ["project"], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\nTo add karma to project, run the following command.\n\n```bash\nnx g @nrwl/angular:karma-project --project=myapp\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Adds Karma configuration to a project.", - "implementation": "/packages/angular/src/generators/karma-project/karma-project.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/karma-project/schema.json" - }, - { - "name": "library", - "factory": "./src/generators/library/library", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorAngularLibrary", - "title": "Create a library", - "description": "Creates an Angular library.", - "type": "object", - "cli": "nx", - "properties": { - "name": { - "type": "string", - "description": "The name of the library.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "type": "string", - "description": "A directory where the library is placed." - }, - "publishable": { - "type": "boolean", - "default": false, - "description": "Generate a publishable library." - }, - "buildable": { - "type": "boolean", - "default": false, - "description": "Generate a buildable library." - }, - "prefix": { - "type": "string", - "format": "html-selector", - "description": "The prefix to apply to generated selectors.", - "alias": "p" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "simpleModuleName": { - "description": "Keep the module name simple (when using `--directory`).", - "type": "boolean", - "default": false, - "x-deprecated": "Use `simpleName` instead. It will be removed in v16." - }, - "simpleName": { - "description": "Don't include the directory in the name of the module or standalone component entry of the library.", - "type": "boolean", - "default": false - }, - "addModuleSpec": { - "description": "Add a module spec file.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update `tsconfig.json` for development experience." - }, - "routing": { - "type": "boolean", - "default": false, - "description": "Add router configuration. See `lazy` for more information." - }, - "lazy": { - "type": "boolean", - "default": false, - "description": "Add `RouterModule.forChild` when set to true, and a simple array of routes when set to false." - }, - "parent": { - "type": "string", - "description": "Path to the parent route configuration using `loadChildren` or `children`, depending on what `lazy` is set to." - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting)." - }, - "unitTestRunner": { - "type": "string", - "enum": ["karma", "jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like `@myorg/my-awesome-lib`. Must be a valid npm name." - }, - "strict": { - "type": "boolean", - "description": "Create a library with stricter type checking and build optimization options.", - "default": true - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "compilationMode": { - "description": "Specifies the compilation mode to use. If not specified, it will default to `partial` for publishable libraries and to `full` for buildable libraries. The `full` value can not be used for publishable libraries.", - "type": "string", - "enum": ["full", "partial"] - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "addTailwind": { - "type": "boolean", - "description": "Whether to configure Tailwind CSS for the application. It can only be used with buildable and publishable libraries. Non-buildable libraries will use the application's Tailwind configuration.", - "default": false - }, - "skipModule": { - "type": "boolean", - "description": "Whether to skip the creation of a default module when generating the library.", - "default": false - }, - "standalone": { - "type": "boolean", - "description": "Generate a library that uses a standalone component instead of a module as the entry point.", - "default": false - }, - "displayBlock": { - "description": "Specifies if the component generated style will contain `:host { display: block; }`. Disclaimer: This option is only valid when `--standalone` is set to `true`.", - "type": "boolean", - "default": false, - "alias": "b" - }, - "inlineStyle": { - "description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file. Disclaimer: This option is only valid when `--standalone` is set to `true`.", - "type": "boolean", - "default": false, - "alias": "s" - }, - "inlineTemplate": { - "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file. Disclaimer: This option is only valid when `--standalone` is set to `true`.", - "type": "boolean", - "default": false, - "alias": "t" - }, - "viewEncapsulation": { - "description": "The view encapsulation strategy to use in the new component. Disclaimer: This option is only valid when `--standalone` is set to `true`.", - "enum": ["Emulated", "None", "ShadowDom"], - "type": "string", - "alias": "v" - }, - "changeDetection": { - "description": "The change detection strategy to use in the new component. Disclaimer: This option is only valid when `--standalone` is set to `true`.", - "enum": ["Default", "OnPush"], - "type": "string", - "default": "Default", - "alias": "c" - }, - "style": { - "description": "The file extension or preprocessor to use for style files, or `none` to skip generating the style file. Disclaimer: This option is only valid when `--standalone` is set to `true`.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less", "none"] - }, - "skipTests": { - "type": "boolean", - "description": "Do not create `spec.ts` test files for the new component. Disclaimer: This option is only valid when `--standalone` is set to `true`.", - "default": false - }, - "selector": { - "type": "string", - "format": "html-selector", - "description": "The HTML selector to use for this component. Disclaimer: This option is only valid when `--standalone` is set to `true`." - }, - "skipSelector": { - "type": "boolean", - "default": false, - "description": "Specifies if the component should have a selector or not. Disclaimer: This option is only valid when `--standalone` is set to `true`." - }, - "flat": { - "type": "boolean", - "default": false, - "description": "Ensure the generated standalone component is not placed in a subdirectory. Disclaimer: This option is only valid when `--standalone` is set to `true`." - } - }, - "additionalProperties": false, - "required": ["name"], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Library\" %}\n\nCreates the `my-ui-lib` library with an `ui` tag:\n\n```bash\nnx g @nrwl/angular:library my-ui-lib --tags=ui\n```\n\n{% /tab %}\n\n{% tab label=\"Nested Folder & Import\"%}\nCreates the `my-lib` library in the `nested` directory and sets the import path to `@myorg/nested/my-lib`:\n\n```bash\nnx g @nrwl/angular:library --directory=nested --importPath=@myorg/nested/my-lib my-lib\n```\n\n{% /tab %}\n\n{% tab label=\"Standalone component\"%}\nCreates the `my-standalone-lib` library with a standalone component as an entry point instead of an ng-module. The component can be used via the `myorg-standalone-component` selector.\n\n```bash\nnx g @nrwl/angular:library --standalone --selector=myorg-standalone-component my-standalone-lib\n```\n\n{% /tab %}\n", - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Creates an Angular library.", - "implementation": "/packages/angular/src/generators/library/library.ts", - "hidden": false, - "path": "/packages/angular/src/generators/library/schema.json" - }, - { - "name": "library-secondary-entry-point", - "factory": "./src/generators/library-secondary-entry-point/library-secondary-entry-point", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularLibrarySecondaryEntryPoint", - "title": "Creates a secondary entry point for a library", - "description": "Creates a secondary entry point for an Angular publishable library.", - "type": "object", - "cli": "nx", - "properties": { - "name": { - "type": "string", - "description": "The name of the secondary entry point.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the secondary entry point?", - "pattern": "^[a-zA-Z].*$" - }, - "library": { - "type": "string", - "description": "The name of the library to create the secondary entry point for.", - "x-prompt": "What library would you like to create the secondary entry point for?", - "pattern": "^[a-zA-Z].*$", - "x-dropdown": "projects" - }, - "skipModule": { - "type": "boolean", - "description": "Skip generating a module for the secondary entry point.", - "default": false - } - }, - "additionalProperties": false, - "required": ["name", "library"], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\nCreate a secondary entrypoint named `button` in the `ui` library.\n\n```bash\nnx g @nrwl/angular:library-secondary-entry-point --library=ui --name=button\n```\n\n{% /tab %}\n\n{% tab label=\"Skip generating module\" %}\nCreate a secondary entrypoint named `button` in the `ui` library but skip creating an NgModule.\n\n```bash\nnx g @nrwl/angular:library-secondary-entry-point --library=ui --name=button --skipModule\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "aliases": ["secondary-entry-point", "entry-point"], - "description": "Creates a secondary entry point for an Angular publishable library.", - "implementation": "/packages/angular/src/generators/library-secondary-entry-point/library-secondary-entry-point.ts", - "hidden": false, - "path": "/packages/angular/src/generators/library-secondary-entry-point/schema.json" - }, - { - "name": "remote", - "factory": "./src/generators/remote/remote", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxMFRemote", - "cli": "nx", - "title": "Nx Module Federation Remote App", - "description": "Create an Angular Remote Module Federation Application.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:remote appName --host=host --port=4201", - "description": "Create an Angular app with configuration in place for Module Federation. If host is provided, attach this remote app to host app's configuration." - } - ], - "properties": { - "name": { - "type": "string", - "description": "The name to give to the remote Angular app.", - "$default": { "$source": "argv", "index": 0 } - }, - "host": { - "type": "string", - "description": "The name of the host app to attach this remote app to.", - "x-dropdown": "projects" - }, - "port": { - "type": "number", - "description": "The port on which this app should be served." - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less"], - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "sass", - "label": "SASS(.sass) [ http://sass-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - } - ] - } - }, - "inlineStyle": { - "description": "Specifies if the style will be in the ts file.", - "type": "boolean", - "default": false, - "alias": "s" - }, - "inlineTemplate": { - "description": "Specifies if the template will be in the ts file.", - "type": "boolean", - "default": false, - "alias": "t" - }, - "viewEncapsulation": { - "description": "Specifies the view encapsulation strategy.", - "enum": ["Emulated", "None", "ShadowDom"], - "type": "string" - }, - "prefix": { - "type": "string", - "format": "html-selector", - "description": "The prefix to apply to generated selectors.", - "alias": "p" - }, - "skipTests": { - "description": "Skip creating spec files.", - "type": "boolean", - "default": false, - "alias": "S" - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "unitTestRunner": { - "type": "string", - "enum": ["karma", "jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["protractor", "cypress", "none"], - "description": "Test runner to use for end to end (E2E) tests.", - "default": "cypress" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting)." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "backendProject": { - "type": "string", - "description": "Backend project that provides data to this application. This sets up `proxy.config.json`." - }, - "strict": { - "type": "boolean", - "description": "Create an application with stricter type checking and build optimization options.", - "default": true - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "addTailwind": { - "type": "boolean", - "description": "Whether to configure Tailwind CSS for the application.", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "standalone": { - "description": "Whether to generate a remote application with standalone components.", - "type": "boolean", - "default": false - }, - "ssr": { - "description": "Whether to configure SSR for the remote application to be consumed by a host application using SSR.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": ["name"], - "presets": [] - }, - "x-type": "application", - "description": "Generate a Remote Angular Module Federation Application.", - "implementation": "/packages/angular/src/generators/remote/remote.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/remote/schema.json" - }, - { - "name": "move", - "factory": "./src/generators/move/move#angularMoveGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularMove", - "cli": "nx", - "title": "Nx Angular Move", - "description": "Move an Angular project to another folder in the workspace.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:move --project my-feature-lib --destination shared/my-feature-lib", - "description": "Move libs/my-feature-lib to libs/shared/my-feature-lib." - } - ], - "properties": { - "projectName": { - "type": "string", - "alias": "project", - "description": "The name of the Angular project to move.", - "x-dropdown": "projects" - }, - "destination": { - "type": "string", - "description": "The folder to move the Angular project into.", - "$default": { "$source": "argv", "index": 0 } - }, - "importPath": { - "type": "string", - "description": "The new import path to use in the `tsconfig.base.json`." - }, - "updateImportPath": { - "type": "boolean", - "description": "Update the import path to reflect the new location.", - "default": true - }, - "skipFormat": { - "type": "boolean", - "aliases": ["skip-format"], - "description": "Skip formatting files.", - "default": false - } - }, - "required": ["projectName", "destination"], - "presets": [] - }, - "aliases": ["mv"], - "description": "Moves an Angular application or library to another folder within the workspace and updates the project configuration.", - "implementation": "/packages/angular/src/generators/move/move#angularMoveGenerator.ts", - "hidden": false, - "path": "/packages/angular/src/generators/move/schema.json" - }, - { - "name": "convert-to-with-mf", - "factory": "./src/generators/convert-to-with-mf/convert-to-with-mf", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "ConvertToWithMFGenerator", - "cli": "nx", - "title": "Convert to withModuleFederation Generator Options Schema", - "type": "object", - "description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n{% callout type=\"warning\" title=\"Overrides\" %}This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!{% /callout %}.", - "additionalProperties": false, - "examples": [ - { - "command": "nx g @nrwl/angular:convert-to-with-mf --project mf-app", - "description": "Convert a Module Federation Project using legacy webpack config to use the `withModuleFederation` helper." - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the micro frontend project to migrate.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What micro frontend project would you like to migrate?" - } - }, - "presets": [] - }, - "description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n{% callout type=\"warning\" title=\"Overrides\" %}This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!{% /callout %}", - "implementation": "/packages/angular/src/generators/convert-to-with-mf/convert-to-with-mf.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/convert-to-with-mf/schema.json" - }, - { - "name": "host", - "factory": "./src/generators/host/host", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxMFHost", - "cli": "nx", - "title": "Nx Module Federation Host Application", - "description": "Create an Angular Host Module Federation Application.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:host appName --remotes=remote1", - "description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the remote application to this application's configuration" - } - ], - "properties": { - "name": { - "type": "string", - "description": "The name to give to the host Angular application.", - "$default": { "$source": "argv", "index": 0 } - }, - "remotes": { - "type": "array", - "description": "The names of the remote applications to add to the host." - }, - "dynamic": { - "type": "boolean", - "description": "Should the host application use dynamic federation?", - "default": false - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less"], - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "sass", - "label": "SASS(.sass) [ http://sass-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - } - ] - } - }, - "inlineStyle": { - "description": "Specifies if the style will be in the ts file.", - "type": "boolean", - "default": false, - "alias": "s" - }, - "inlineTemplate": { - "description": "Specifies if the template will be in the ts file.", - "type": "boolean", - "default": false, - "alias": "t" - }, - "viewEncapsulation": { - "description": "Specifies the view encapsulation strategy.", - "enum": ["Emulated", "None", "ShadowDom"], - "type": "string" - }, - "prefix": { - "type": "string", - "format": "html-selector", - "description": "The prefix to apply to generated selectors.", - "alias": "p" - }, - "skipTests": { - "description": "Skip creating spec files.", - "type": "boolean", - "default": false, - "alias": "S" - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "skipPostInstall": { - "type": "boolean", - "default": false, - "description": "Do not add or append `ngcc` to the `postinstall` script in `package.json`." - }, - "unitTestRunner": { - "type": "string", - "enum": ["karma", "jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["protractor", "cypress", "none"], - "description": "Test runner to use for end to end (E2E) tests.", - "default": "cypress" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting)." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "backendProject": { - "type": "string", - "description": "Backend project that provides data to this application. This sets up `proxy.config.json`." - }, - "strict": { - "type": "boolean", - "description": "Create an application with stricter type checking and build optimization options.", - "default": true - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "addTailwind": { - "type": "boolean", - "description": "Whether to configure Tailwind CSS for the application.", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "standalone": { - "type": "boolean", - "description": "Whether to generate a host application that uses standalone components.", - "default": false - }, - "ssr": { - "description": "Whether to configure SSR for the host application", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": ["name"], - "presets": [] - }, - "x-type": "application", - "description": "Generate a Host Angular Module Federation Application.", - "implementation": "/packages/angular/src/generators/host/host.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/host/schema.json" - }, - { - "name": "ng-add", - "factory": "./src/generators/ng-add/ng-add", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularNgAddGenerator", - "title": "Angular plugin initialization", - "cli": "nx", - "description": "Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace. NOTE: Does not work in the `--dry-run` mode.", - "type": "object", - "properties": { - "npmScope": { - "type": "string", - "description": "Npm scope for importing libs. NOTE: only used if running the generator in an Angular CLI workspace." - }, - "defaultBase": { - "type": "string", - "description": "Default base branch for affected. NOTE: only used if running the generator in an Angular CLI workspace." - }, - "skipInstall": { - "type": "boolean", - "description": "Skip installing added packages.", - "default": false - }, - "preserveAngularCliLayout": { - "type": "boolean", - "description": "Preserve the Angular CLI layout instead of moving the app into apps. NOTE: only used if running the generator in an Angular CLI workspace.", - "default": false - }, - "unitTestRunner": { - "type": "string", - "enum": ["karma", "jest", "none"], - "description": "Test runner to use for unit tests. NOTE: only used if running the generator in an Nx workspace.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["protractor", "cypress", "none"], - "description": "Test runner to use for end to end (e2e) tests. NOTE: only used if running the generator in an Nx workspace.", - "default": "cypress" - }, - "skipFormat": { - "description": "Skip formatting files. NOTE: only used if running the generator in an Nx workspace.", - "type": "boolean", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks. NOTE: only used if running the generator in an Nx workspace.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "style": { - "description": "The file extension to be used for style files. NOTE: only used if running the generator in an Nx workspace.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less"] - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`. NOTE: only used if running the generator in an Nx workspace." - }, - "skipPostInstall": { - "type": "boolean", - "default": false, - "description": "Do not add or append `ngcc` to the `postinstall` script in `package.json`. NOTE: only used if running the generator in an Nx workspace." - } - }, - "additionalProperties": false, - "examplesFile": "## Information\n\nThis generator is usually used as part of the process of migrating from an Angular CLI Workspace to Nx Workspaces using `ng add @nrwl/angular`.\n\nYou can read more about [migrating from Angular CLI to Nx here](https://nx.dev/recipes/adopting-nx/migration-angular).\n", - "presets": [] - }, - "description": "Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace.", - "hidden": true, - "implementation": "/packages/angular/src/generators/ng-add/ng-add.ts", - "aliases": [], - "path": "/packages/angular/src/generators/ng-add/schema.json" - }, - { - "name": "ngrx", - "factory": "./src/generators/ngrx/ngrx", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNgrxGenerator", - "title": "Add NgRx support to an application or library.", - "description": "Adds NgRx support to an application or library.", - "cli": "nx", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:ngrx --root --module=apps/my-app/src/app/app.module.ts --facade=false placeholder", - "description": "Add root ngrx configration to the `my-app` application" - }, - { - "command": "nx g @nrwl/angular:ngrx --module=libs/my-lib/src/lib/my-lib.module.ts --facade=true --root=false users", - "description": "Add a `users` state with a facade to the `my-lib` library. It will be tracked under the default `+state` folder in the lib" - } - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the NgRx feature state, such as `products` or `users`. Recommended to use the plural form of the name.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the NgRx feature state? An example would be `users`." - }, - "module": { - "type": "string", - "description": "The path to the `NgModule` where the feature state will be registered. The host directory will create/use the new state directory.", - "x-prompt": "What is the path to the module where this NgRx state should be registered?" - }, - "directory": { - "type": "string", - "default": "+state", - "description": "The name of the folder used to contain/group the generated NgRx files." - }, - "root": { - "type": "boolean", - "default": false, - "description": "Setup root or feature state management with NgRx.", - "x-prompt": "Is this the root state of the application?" - }, - "facade": { - "type": "boolean", - "default": false, - "description": "Create a Facade class for the the feature.", - "x-prompt": "Would you like to use a Facade with your NgRx state?" - }, - "skipImport": { - "type": "boolean", - "default": false, - "description": "Generate NgRx feature files without registering the feature in the NgModule." - }, - "minimal": { - "type": "boolean", - "default": true, - "description": "Only register the root state management setup or feature state." - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not update the `package.json` with NgRx dependencies." - }, - "barrels": { - "type": "boolean", - "default": false, - "description": "Use barrels to re-export actions, state and selectors." - } - }, - "additionalProperties": false, - "required": ["module", "name"], - "presets": [] - }, - "description": "Adds NgRx support to an application or library.", - "implementation": "/packages/angular/src/generators/ngrx/ngrx.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/ngrx/schema.json" - }, - { - "name": "scam-to-standalone", - "factory": "./src/generators/scam-to-standalone/scam-to-standalone", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorAngularScamToStandalone", - "cli": "nx", - "title": "Convert an Inline SCAM to Standalone Component", - "description": "Convert an Inline SCAM to a Standalone Component.", - "type": "object", - "properties": { - "component": { - "type": "string", - "description": "The path to the SCAM component file, relative to the root of the project containing the SCAM.", - "$default": { "$source": "argv", "index": 0 } - }, - "project": { - "type": "string", - "description": "The project containing the SCAM.", - "x-prompt": "What project contains the SCAM?", - "x-dropdown": "projects" - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting the workspace after the generator completes." - } - }, - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\nThis generator allows you to convert an Inline SCAM to a Standalone Component. It's important that the SCAM you wish to convert has it's NgModule within the same file for the generator to be able to correctly convert the component to Standalone.\n\n```bash\n\nnx g @nrwl/angular:scam-to-standalone --component=libs/mylib/src/lib/myscam/myscam.component.ts --project=mylib\n\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Convert an existing Single Component Angular Module (SCAM) to a Standalone Component.", - "implementation": "/packages/angular/src/generators/scam-to-standalone/scam-to-standalone.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/scam-to-standalone/schema.json" - }, - { - "name": "scam", - "factory": "./src/generators/scam/scam", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "SCAMGenerator", - "cli": "nx", - "title": "SCAM Generator Options Schema", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:scam --project=my-lib my-sample", - "description": "Generate a `MySampleComponent` component in the `my-lib` library." - } - ], - "description": "Creates a new, generic Angular component definition in the given or default project.", - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "format": "path", - "description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.", - "visible": false - }, - "project": { - "type": "string", - "description": "The name of the project.", - "x-dropdown": "projects" - }, - "name": { - "type": "string", - "description": "The name of the component.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the component?" - }, - "displayBlock": { - "description": "Specifies if the style will contain `:host { display: block; }`.", - "type": "boolean", - "default": false, - "alias": "b" - }, - "inlineStyle": { - "description": "Include styles inline in the `component.ts` file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the `component.ts` file.", - "type": "boolean", - "default": false, - "alias": "s" - }, - "inlineTemplate": { - "description": "Include template inline in the `component.ts` file. By default, an external template file is created and referenced in the `component.ts` file.", - "type": "boolean", - "default": false, - "alias": "t" - }, - "viewEncapsulation": { - "description": "The view encapsulation strategy to use in the new component.", - "enum": ["Emulated", "None", "ShadowDom"], - "type": "string", - "alias": "v" - }, - "changeDetection": { - "description": "The change detection strategy to use in the new component.", - "enum": ["Default", "OnPush"], - "type": "string", - "default": "Default", - "alias": "c" - }, - "style": { - "description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.", - "type": "string", - "default": "css", - "enum": ["css", "scss", "sass", "less", "none"] - }, - "skipTests": { - "type": "boolean", - "description": "Do not create `spec.ts` test files for the new component.", - "default": false - }, - "inlineScam": { - "type": "boolean", - "description": "Create the `NgModule` in the same file as the component.", - "default": true - }, - "flat": { - "type": "boolean", - "description": "Create the new files at the top level of the current project.", - "default": false - }, - "selector": { - "type": "string", - "format": "html-selector", - "description": "The `HTML` selector to use for this component." - }, - "skipSelector": { - "type": "boolean", - "default": false, - "description": "Specifies if the component should have a selector or not." - }, - "type": { - "type": "string", - "description": "Adds a developer-defined type to the filename, in the format `name.type.ts`.", - "default": "component" - }, - "prefix": { - "type": "string", - "description": "The prefix to apply to the generated component selector.", - "alias": "p", - "oneOf": [ - { "maxLength": 0 }, - { "minLength": 1, "format": "html-selector" } - ] - }, - "export": { - "type": "boolean", - "description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.", - "default": true - } - }, - "required": ["name"], - "presets": [] - }, - "description": "Generate a component with an accompanying Single Component Angular Module (SCAM).", - "implementation": "/packages/angular/src/generators/scam/scam.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/scam/schema.json" - }, - { - "name": "scam-directive", - "factory": "./src/generators/scam-directive/scam-directive", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "SCAMDirectiveGenerator", - "cli": "nx", - "title": "SCAM Directive Generator Options Schema", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:scam-directive --project=my-lib --flat=false my-sample", - "description": "Generate a `MySampleDirective` directive in a `my-sample` folder in the `my-lib` library" - } - ], - "description": "Creates a new, generic Angular directive definition in the given or default project.", - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "format": "path", - "description": "The path at which to create the directive file, relative to the current workspace. Default is a folder with the same name as the directive in the project root.", - "visible": false - }, - "project": { - "type": "string", - "description": "The name of the project.", - "x-dropdown": "projects" - }, - "name": { - "type": "string", - "description": "The name of the directive.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the directive?" - }, - "skipTests": { - "type": "boolean", - "description": "Do not create `spec.ts` test files for the new directive.", - "default": false - }, - "inlineScam": { - "type": "boolean", - "description": "Create the `NgModule` in the same file as the Directive.", - "default": true - }, - "flat": { - "type": "boolean", - "description": "Create the new files at the top level of the current project.", - "default": true - }, - "selector": { - "type": "string", - "format": "html-selector", - "description": "The `HTML` selector to use for this directive." - }, - "prefix": { - "type": "string", - "description": "The prefix to apply to the generated directive selector.", - "alias": "p", - "oneOf": [ - { "maxLength": 0 }, - { "minLength": 1, "format": "html-selector" } - ] - }, - "export": { - "type": "boolean", - "description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.", - "default": true - } - }, - "required": ["name"], - "presets": [] - }, - "description": "Generate a directive with an accompanying Single Component Angular Module (SCAM).", - "implementation": "/packages/angular/src/generators/scam-directive/scam-directive.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/scam-directive/schema.json" - }, - { - "name": "scam-pipe", - "factory": "./src/generators/scam-pipe/scam-pipe", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "SCAMPipeGenerator", - "cli": "nx", - "title": "SCAM Pipe Generator Options Schema", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/angular:scam-pipe --project=my-lib --flat=false my-transformation", - "description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project" - } - ], - "description": "Creates a new, generic Angular pipe definition in the given or default project.", - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "format": "path", - "description": "The path at which to create the pipe file, relative to the current workspace. Default is a folder with the same name as the pipe in the project root.", - "visible": false - }, - "project": { - "type": "string", - "description": "The name of the project.", - "x-dropdown": "projects" - }, - "name": { - "type": "string", - "description": "The name of the pipe.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the pipe?" - }, - "skipTests": { - "type": "boolean", - "description": "Do not create `spec.ts` test files for the new pipe.", - "default": false - }, - "inlineScam": { - "type": "boolean", - "description": "Create the NgModule in the same file as the Pipe.", - "default": true - }, - "flat": { - "type": "boolean", - "description": "Create the new files at the top level of the current project.", - "default": true - }, - "export": { - "type": "boolean", - "description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.", - "default": true - } - }, - "required": ["name"], - "presets": [] - }, - "description": "Generate a pipe with an accompanying Single Component Angular Module (SCAM).", - "implementation": "/packages/angular/src/generators/scam-pipe/scam-pipe.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/scam-pipe/schema.json" - }, - { - "name": "setup-mf", - "factory": "./src/generators/setup-mf/setup-mf", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorAngularMFSetup", - "cli": "nx", - "title": "Generate Module Federation Setup for Angular App", - "description": "Create Module Federation configuration files for given Angular Application.", - "type": "object", - "properties": { - "appName": { - "type": "string", - "description": "The name of the application to generate the Module Federation configuration for.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What app would you like to generate a Module Federation configuration for?", - "x-dropdown": "projects" - }, - "mfType": { - "type": "string", - "enum": ["host", "remote"], - "description": "Type of application to generate the Module Federation configuration for.", - "default": "remote" - }, - "federationType": { - "type": "string", - "enum": ["static", "dynamic"], - "description": "Use either Static or Dynamic Module Federation pattern for the application.", - "default": "static" - }, - "port": { - "type": "number", - "description": "The port at which the remote application should be served." - }, - "remotes": { - "type": "array", - "description": "A list of remote application names that the host application should consume." - }, - "host": { - "type": "string", - "description": "The name of the host application that the remote application will be consumed by." - }, - "routing": { - "type": "boolean", - "description": "Generate a routing setup to allow a host application to route to the remote application." - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting the workspace after the generator completes." - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "skipE2E": { - "type": "boolean", - "default": false, - "description": "Do not set up E2E related config." - }, - "e2eProjectName": { - "type": "string", - "description": "The project name of the associated E2E project for the application. This is only required for Cypress E2E projects that do not follow the naming convention `-e2e`." - }, - "prefix": { - "type": "string", - "description": "The prefix to use for any generated component." - }, - "standalone": { - "type": "boolean", - "description": "Whether the application is a standalone application.", - "default": false - } - }, - "required": ["appName", "mfType"], - "additionalProperties": false, - "examplesFile": "## Examples\n\nThe `setup-mf` generator is used to add Module Federation support to existing applications.\n\n{% tabs %}\n\n{% tab label=\"Convert to Host\" %}\nTo convert an existing application to a host application, run the following\n\n```bash\nnx g setup-mf myapp --mfType=host --routing=true\n```\n\n{% /tab %}\n\n{% tab label=\"Convert to Remote\" %}\nTo convert an existing application to a remote application, run the following\n\n```bash\nnx g setup-mf myapp --mfType=remote --routing=true\n```\n\n{% /tab %}\n\n{% tab label=\"Convert to Remote and attach to a host application\" %}\nTo convert an existing application to a remote application and attach it to an existing host application name `myhostapp`, run the following\n\n```bash\nnx g setup-mf myapp --mfType=remote --routing=true --host=myhostapp\n```\n\n{% /tab %}\n\n{% tab label=\"Convert to Host and attach to existing remote applications\" %}\nTo convert an existing application to a host application and attaching existing remote applications named `remote1` and `remote2`, run the following\n\n```bash\nnx g setup-mf myapp --mfType=host --routing=true --remotes=remote1,remote2\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Generate a Module Federation configuration for a given Angular application.", - "implementation": "/packages/angular/src/generators/setup-mf/setup-mf.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/setup-mf/schema.json" - }, - { - "name": "setup-ssr", - "factory": "./src/generators/setup-ssr/setup-ssr", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorAngularUniversalSetup", - "cli": "nx", - "title": "Generate Angular Universal (SSR) setup for an Angular App", - "description": "Create the additional configuration required to enable SSR via Angular Universal for an Angular application.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the application to generate the Angular Universal configuration for.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What app would you like to generate an Angular Universal configuration for?", - "x-dropdown": "projects" - }, - "appId": { - "type": "string", - "format": "html-selector", - "description": "The `appId` to use with `withServerTransition`.", - "default": "serverApp" - }, - "main": { - "type": "string", - "format": "path", - "description": "The name of the main entry-point file.", - "default": "main.server.ts" - }, - "serverFileName": { - "type": "string", - "default": "server.ts", - "description": "The name of the Express server file." - }, - "serverPort": { - "type": "number", - "default": 4000, - "description": "The port for the Express server." - }, - "rootModuleFileName": { - "type": "string", - "format": "path", - "description": "The name of the root module file", - "default": "app.server.module.ts" - }, - "rootModuleClassName": { - "type": "string", - "description": "The name of the root module class.", - "default": "AppServerModule" - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting the workspace after the generator completes." - } - }, - "required": ["project"], - "additionalProperties": false, - "presets": [] - }, - "description": "Generate Angular Universal (SSR) setup for an Angular application.", - "implementation": "/packages/angular/src/generators/setup-ssr/setup-ssr.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/setup-ssr/schema.json" - }, - { - "name": "setup-tailwind", - "factory": "./src/generators/setup-tailwind/setup-tailwind", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularTailwindSetupGenerator", - "cli": "nx", - "title": "Configures Tailwind CSS for an application or a buildable/publishable library.", - "description": "Adds the Tailwind CSS configuration files for a given Angular project and installs, if needed, the packages required for Tailwind CSS to work.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project to add the Tailwind CSS setup for.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What project would you like to add the Tailwind CSS setup?" - }, - "buildTarget": { - "type": "string", - "description": "The name of the target used to build the project. This option only applies to buildable/publishable libraries.", - "default": "build" - }, - "skipFormat": { - "type": "boolean", - "description": "Skips formatting the workspace after the generator completes." - }, - "stylesEntryPoint": { - "type": "string", - "description": "Path to the styles entry point relative to the workspace root. If not provided the generator will do its best to find it and it will error if it can't. This option only applies to applications." - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - } - }, - "additionalProperties": false, - "required": ["project"], - "examplesFile": "## Examples\n\nThe `setup-tailwind` generator can be used to add [Tailwind](https://tailwindcss.com) configuration to apps and publishable libraries.\n\n{% tabs %}\n\n{% tab label=\"Standard Setup\" %}\n\nTo generate a standard Tailwind setup, just run the following command.\n\n```bash\nnx g @nrwl/angular:setup-tailwind myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Specifying the Styles Entrypoint\" %}\n\nTo specify the styles file that should be used as the entrypoint for Tailwind, simply pass the `--stylesEntryPoint` flag, relative to workspace root.\n\n```bash\nnx g @nrwl/angular:setup-tailwind myapp --stylesEntryPoint=apps/myapp/src/styles.css\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Configures Tailwind CSS for an application or a buildable/publishable library.", - "implementation": "/packages/angular/src/generators/setup-tailwind/setup-tailwind.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/setup-tailwind/schema.json" - }, - { - "name": "stories", - "factory": "./src/generators/stories/stories", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularStorybookStoriesGenerator", - "title": "Create Storybook stories/specs", - "description": "Creates Storybook stories/specs for all Angular components declared in a project.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "type": "string", - "aliases": ["project", "projectName"], - "description": "Project for which to generate stories.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What's the name of the project for which you want to generate stories?", - "x-dropdown": "projects" - }, - "generateCypressSpecs": { - "type": "boolean", - "description": "Specifies whether to automatically generate `*.spec.ts` files in the Cypress e2e app generated by the `cypress-configure` generator.", - "x-prompt": "Do you want to generate Cypress specs as well?" - }, - "cypressProject": { - "type": "string", - "description": "The Cypress project to generate the stories under. This is inferred from `name` by default." - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "ignorePaths": { - "type": "array", - "description": "Paths to ignore when looking for components.", - "items": { "type": "string", "description": "Path to ignore." }, - "examples": [ - "apps/my-app/src/not-stories/**", - "**/**/src/**/not-stories/**", - "libs/my-lib/**/*.something.ts", - "**/**/src/**/*.other.*", - "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" - ] - } - }, - "additionalProperties": false, - "required": ["name"], - "examplesFile": "This generator will generate stories for all your components in your project.\n\n```bash\nnx g @nrwl/angular:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/storybook/overview-angular#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/angular:stories ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n", - "presets": [] - }, - "description": "Creates stories/specs for all components declared in a project.", - "implementation": "/packages/angular/src/generators/stories/stories.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/stories/schema.json" - }, - { - "name": "storybook-configuration", - "factory": "./src/generators/storybook-configuration/storybook-configuration", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularStorybookConfigurationGenerator", - "title": "Adds Storybook configuration to a project.", - "description": "Adds Storybook configuration to a project to be able to use and create stories.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "type": "string", - "aliases": ["project", "projectName"], - "description": "Project for which to generate Storybook configuration.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "For which project do you want to generate Storybook configuration?", - "x-dropdown": "projects" - }, - "configureCypress": { - "type": "boolean", - "description": "Specifies whether to configure Cypress or not.", - "x-prompt": "Configure a Cypress e2e app to run against the storybook instance?", - "default": true - }, - "generateStories": { - "type": "boolean", - "description": "Specifies whether to automatically generate `*.stories.ts` files for components declared in this project or not.", - "x-prompt": "Automatically generate *.stories.ts files for components declared in this project?", - "default": true - }, - "generateCypressSpecs": { - "type": "boolean", - "description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.", - "x-prompt": "Automatically generate test files in the generated Cypress e2e app?", - "default": true - }, - "cypressDirectory": { - "type": "string", - "description": "A directory where the Cypress project will be placed. Placed at the root by default." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "tsConfiguration": { - "type": "boolean", - "description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "ignorePaths": { - "type": "array", - "description": "Paths to ignore when looking for components.", - "items": { "type": "string", "description": "Path to ignore." }, - "examples": [ - "apps/my-app/src/not-stories/**", - "**/**/src/**/not-stories/**", - "libs/my-lib/**/*.something.ts", - "**/**/src/**/*.other.*", - "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" - ] - }, - "configureTestRunner": { - "type": "boolean", - "description": "Add a Storybook Test-Runner target." - } - }, - "additionalProperties": false, - "required": ["name"], - "examplesFile": "This generator will set up Storybook for your Angular project.\n\n```bash\nnx g @nrwl/angular:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/storybook/overview-angular#generate-storybook-configuration-for-an-angular-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `configureCypress`. If you choose `yes`, a Cypress e2e app will be created (or configured) to run against the project's Storybook instance. You can read more about this in the [Storybook for Angular - Cypress section](/storybook/overview-angular#cypress-tests-for-stories).\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n- Whether you want to `configureTestRunner`. If you choose `yes`, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner).\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration using TypeScript\n\n```bash\nnx g @nrwl/angular:storybook-configuration ui --tsConfiguration=true\n```\n\nThis will generate a Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/angular:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n", - "presets": [] - }, - "description": "Adds Storybook configuration to a project.", - "implementation": "/packages/angular/src/generators/storybook-configuration/storybook-configuration.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/storybook-configuration/schema.json" - }, - { - "name": "cypress-component-configuration", - "factory": "./src/generators/cypress-component-configuration/cypress-component-configuration", - "schema": { - "$schema": "https://json-schema.org/schema", - "$id": "NxAngularCypressComponentConfigurationGenerator", - "type": "object", - "cli": "nx", - "title": "Add Cypress component testing", - "description": "Add a Cypress component testing configuration to an existing project. Cypress v10.7.0 or higher is required.", - "properties": { - "project": { - "type": "string", - "description": "The name of the project to add cypress component testing configuration to", - "x-dropdown": "projects", - "x-prompt": "What project should we add Cypress component testing to?" - }, - "generateTests": { - "type": "boolean", - "description": "Generate default component tests for existing components in the project", - "x-prompt": "Automatically generate tests for components declared in this project?", - "default": false - }, - "buildTarget": { - "type": "string", - "description": "A build target used to configure Cypress component testing in the format of `project:target[:configuration]`. The build target should be an angular app. If not provided we will try to infer it from your projects usage.", - "pattern": "^[^:\\s]+:[^:\\s]+(:\\S+)?$" - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files", - "default": false - } - }, - "required": ["project"], - "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nAngular component testing with Nx requires **Cypress version 10.7.0** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you want to test components via Storybook with Cypress, then check out the [storybook-configuration generator docs](/packages/angular/generators/storybook-configuration)\n{% /callout %}\n\nThis generator is designed to get your Angular project up and running with Cypress Component Testing.\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project\n```\n\nRunning this generator, adds the required files to the specified project with a preconfigured `cypress.config.ts` designed for Nx workspaces.\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';\n\nexport default defineConfig({\n component: nxComponentTestingPreset(__filename),\n});\n```\n\nHere is an example on how to add custom options to the configuration\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';\n\nexport default defineConfig({\n component: {\n ...nxComponentTestingPreset(__filename),\n // extra options here\n },\n});\n```\n\n## Specifying a Build Target\n\nComponent testing requires a _build target_ to correctly run the component test dev server. This option can be manually specified with `--build-target=some-angular-app:build`, but Nx will infer this usage from the [project graph](/concepts/mental-model#the-project-graph) if one isn't provided.\n\nFor Angular projects, the build target needs to be using the `@nrwl/angular:webpack-browser` or\n`@angular-devkit/build-angular:browser` executor.\nThe generator will throw an error if a build target can't be found and suggest passing one in manually.\n\nLetting Nx infer the build target by default\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project\n```\n\nManually specifying the build target\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project --build-target:some-angular-app:build --generate-tests\n```\n\n{% callout type=\"note\" title=\"Build Target with Configuration\" %}\nIf you're wanting to use a build target with a specific configuration. i.e. `my-app:build:production`,\nthen manually providing `--build-target=my-app:build:production` is the best way to do that.\n{% /callout %}\n\n## Auto Generating Tests\n\nYou can optionally use the `--generate-tests` flag to generate a test file for each component in your project.\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project --generate-tests\n```\n\n## Running Component Tests\n\nA new `component-test` target will be added to the specified project to run your component tests.\n\n```shell\nnx g component-test my-cool-angular-project\n```\n\nHere is an example of the project configuration that is generated. The `--build-target` option is added as the `devServerTarget` which can be changed as needed.\n\n```json {% fileName=\"project.json\" %}\n{\n \"targets\" {\n \"component-test\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"/cypress.config.ts\",\n \"testingType\": \"component\",\n \"devServerTarget\": \"some-angular-app:build\",\n \"skipServe\": true\n }\n }\n }\n}\n```\n\nNx also supports [React component testing](/packages/angular/generators/cypress-component-configuration).\n", - "presets": [] - }, - "description": "Setup Cypress component testing for a project.", - "implementation": "/packages/angular/src/generators/cypress-component-configuration/cypress-component-configuration.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/cypress-component-configuration/schema.json" - }, - { - "name": "upgrade-module", - "factory": "./src/generators/upgrade-module/upgrade-module", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxUpgradeModuleGenerator", - "title": "Generates UpgradeModule setup.", - "description": "Sets up an Upgrade Module.", - "cli": "nx", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project." - }, - "name": { - "type": "string", - "description": "The name of the main AngularJS module.", - "$default": { "$source": "argv", "index": 0 } - }, - "angularJsImport": { - "type": "string", - "description": "Import expression of the AngularJS application (e.g., `--angularJsImport=some_node_module/my_app`)." - }, - "angularJsCmpSelector": { - "type": "string", - "description": "The selector of an AngularJS component (e.g., `--angularJsCmpSelector=myComponent`)." - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files.", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "description": "Do not add `@angular/upgrade` to `package.json` (e.g., `--skipPackageJson`).", - "default": false - }, - "router": { - "type": "boolean", - "description": "Sets up router synchronization (e.g., `--router`).", - "default": false - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "examplesFile": "## Examples\n\nBelow are some examples of how to generate configuration and setup for using `ngUpgrade`'s `UpgradeModule` for your application.\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\n```bash\nnx g @nrwl/angular:upgrade-module --name=myAngularJsModule --project=myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Setup Router\" %}\n\nAllow a setup that configures routing for `UpgradeModule`.\n\n```bash\nnx g @nrwl/angular:upgrade-module --name=myAngularJsModule --project=myapp --router=true\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Sets up an Upgrade Module.", - "implementation": "/packages/angular/src/generators/upgrade-module/upgrade-module.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/upgrade-module/schema.json" - }, - { - "name": "web-worker", - "factory": "./src/generators/web-worker/web-worker", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "NxAngularWebWorkerGenerator", - "title": "Angular Web Worker Options Schema", - "description": "Creates a new, generic web worker definition in the given or default project.", - "cli": "nx", - "type": "object", - "properties": { - "path": { - "type": "string", - "format": "path", - "description": "The path at which to create the worker file, relative to the current workspace." - }, - "project": { - "type": "string", - "description": "The name of the project.", - "x-dropdown": "projects" - }, - "name": { - "type": "string", - "description": "The name of the worker.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the worker?" - }, - "snippet": { - "type": "boolean", - "default": true, - "description": "Add a worker creation snippet in a sibling file of the same name." - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Simple Usage\" %}\n\nThe basic usage of the `web-worker` generator is defined below. You must provide a name for the web worker and the project to assign it to.\n\n```bash\nnx g @nrwl/angular:web-worker myWebWorker --project=myapp\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Creates a Web Worker.", - "implementation": "/packages/angular/src/generators/web-worker/web-worker.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/web-worker/schema.json" - }, - { - "name": "change-storybook-targets", - "factory": "./src/generators/change-storybook-targets/change-storybook-targets", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxAngularChangeStorybookTargetsGenerator", - "title": "Change Storybook targets", - "description": "Change the Storybook target executors.", - "type": "object", - "cli": "nx", - "properties": { - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": [], - "examplesFile": "This generator will change the `storybook` and `build-storybook` targets in all your Angular projects that are configured to use Storybook. The new target configuration will use the native Storybook builders (`@storybook/angular:build-storybook` and `@storybook/angular:start-storybook`) instead of the Nx Storybook builders (`@nrwl/storybook:build-storybook` and `@nrwl/storybook:storybook`).\n\nThis generator is usually invoked through a migrator, when you are using `nx migrate` to upgrade your workspace to Nx `14.1.8` or later.\n\nIf you are on Nx `14.1.8` or later and you did not use `nx migrate`, you can run this generator manually by running the following command:\n\n```bash\nnx g @nrwl/angular:change-storybook-targets\n```\n\nYou can read more about how this generator works, and why we are changing the Storybook targets, in the [Angular Storybook targets documentation page](/storybook/angular-storybook-targets).\n", - "presets": [] - }, - "description": "Change storybook targets for Angular projects to use @storybook/angular executors", - "implementation": "/packages/angular/src/generators/change-storybook-targets/change-storybook-targets.ts", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/generators/change-storybook-targets/schema.json" - } - ], - "executors": [ - { - "name": "delegate-build", - "implementation": "/packages/angular/src/executors/delegate-build/delegate-build.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Schema for an executor which delegates a build.", - "description": "Delegates the build to a different target while supporting incremental builds.", - "cli": "nx", - "type": "object", - "properties": { - "buildTarget": { - "description": "Build target used for building the application after its dependencies have been built.", - "type": "string" - }, - "outputPath": { - "type": "string", - "description": "The full path for the output directory, relative to the workspace root.", - "x-completion-type": "directory" - }, - "tsConfig": { - "type": "string", - "description": "The full path for the TypeScript configuration file, relative to the workspace root.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "watch": { - "type": "boolean", - "description": "Whether to run a build when any file changes.", - "default": false - } - }, - "additionalProperties": false, - "required": ["buildTarget", "outputPath", "tsConfig"], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\nDelegate the build of the project to a different target.\n\n```json\n{\n \"prod-build\": {\n \"executor\": \"@nrwl/angular:delegate-build\",\n \"options\": {\n \"buildTarget\": \"app:build:production\",\n \"outputPath\": \"dist/apps/app/production\",\n \"tsConfig\": \"apps/app/tsconfig.json\",\n \"watch\": false\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Watch for build changes\" %}\nDelegate the build of the project to a different target.\n\n```json\n{\n \"prod-build\": {\n \"executor\": \"@nrwl/angular:delegate-build\",\n \"options\": {\n \"buildTarget\": \"app:build:production\",\n \"outputPath\": \"dist/apps/app/production\",\n \"tsConfig\": \"apps/app/tsconfig.json\",\n \"watch\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Delegates the build to a different target while supporting incremental builds.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/executors/delegate-build/schema.json" - }, - { - "name": "ng-packagr-lite", - "implementation": "/packages/angular/src/executors/ng-packagr-lite/ng-packagr-lite.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "title": "ng-packagr Target", - "description": "Builds a library with support for incremental builds.\n\nThis executor is meant to be used with buildable libraries in an incremental build scenario. It is similar to the `@nrwl/angular:package` executor but with some key differences:\n- It doesn't run `ngcc` automatically (`ngcc` needs to be run separately beforehand if needed, this can be done in a `postinstall` hook on `package.json`).\n- It only produces ESM2020 bundles.\n- It doesn't generate package exports in the `package.json`.", - "cli": "nx", - "type": "object", - "presets": [ - { - "name": "Buildable Library with Tailwind", - "keys": ["project", "tailwindConfig"] - }, - { - "name": "Updating Project Dependencies for Buildable Library", - "keys": [ - "project", - "updateBuildableProjectDepsInPackageJson", - "buildableProjectDepsInPackageJsonType" - ] - } - ], - "properties": { - "project": { - "type": "string", - "description": "The file path for the ng-packagr configuration file, relative to the workspace root." - }, - "tsConfig": { - "type": "string", - "description": "The full path for the TypeScript configuration file, relative to the workspace root.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "watch": { - "type": "boolean", - "description": "Whether to run a build when any file changes.", - "default": false - }, - "updateBuildableProjectDepsInPackageJson": { - "type": "boolean", - "description": "Whether to update the buildable project dependencies in package.json.", - "default": true - }, - "buildableProjectDepsInPackageJsonType": { - "type": "string", - "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", - "enum": ["dependencies", "peerDependencies"], - "default": "peerDependencies" - }, - "tailwindConfig": { - "type": "string", - "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured." - } - }, - "additionalProperties": false, - "required": ["project"] - }, - "description": "Builds a library with support for incremental builds.\nThis executor is meant to be used with buildable libraries in an incremental build scenario. It is similar to the `@nrwl/angular:package` executor but with some key differences:\n- It doesn't run `ngcc` automatically (`ngcc` needs to be run separately beforehand if needed, this can be done in a `postinstall` hook on `package.json`).\n- It only produces ESM2020 bundles.\n- It doesn't generate package exports in the `package.json`.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/executors/ng-packagr-lite/schema.json" - }, - { - "name": "package", - "implementation": "/packages/angular/src/executors/package/package.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "title": "ng-packagr Target", - "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\n\nThis executor is similar to the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.", - "cli": "nx", - "type": "object", - "presets": [ - { - "name": "Publishable Library with Tailwind", - "keys": ["project", "tailwindConfig"] - }, - { - "name": "Updating Project Dependencies for Publishable Library", - "keys": [ - "project", - "updateBuildableProjectDepsInPackageJson", - "buildableProjectDepsInPackageJsonType" - ] - } - ], - "properties": { - "project": { - "type": "string", - "description": "The file path for the ng-packagr configuration file, relative to the workspace root." - }, - "tsConfig": { - "type": "string", - "description": "The full path for the TypeScript configuration file, relative to the workspace root.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "watch": { - "type": "boolean", - "description": "Whether to run a build when any file changes.", - "default": false - }, - "updateBuildableProjectDepsInPackageJson": { - "type": "boolean", - "description": "Whether to update the buildable project dependencies in package.json.", - "default": true - }, - "buildableProjectDepsInPackageJsonType": { - "type": "string", - "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", - "enum": ["dependencies", "peerDependencies"], - "default": "peerDependencies" - }, - "tailwindConfig": { - "type": "string", - "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured.", - "x-completion-type": "file", - "x-completion-glob": "tailwind.config.js" - } - }, - "additionalProperties": false, - "required": ["project"] - }, - "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\nThis executor is similar to the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/executors/package/schema.json" - }, - { - "name": "file-server", - "implementation": "/packages/angular/src/executors/file-server/file-server.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "File Server", - "description": "Serves a static web application from a folder.", - "type": "object", - "cli": "nx", - "properties": { - "buildTarget": { - "type": "string", - "description": "Target which builds the application." - }, - "parallel": { - "type": "boolean", - "description": "Build the target in parallel.", - "default": true - }, - "maxParallel": { - "type": "number", - "description": "Max number of parallel jobs." - }, - "port": { - "type": "number", - "description": "Port to listen on.", - "default": 4200 - }, - "host": { - "type": "string", - "description": "Host to listen on.", - "default": "localhost" - }, - "ssl": { - "type": "boolean", - "description": "Serve using `HTTPS`.", - "default": false - }, - "sslKey": { - "type": "string", - "description": "SSL key to use for serving `HTTPS`." - }, - "sslCert": { - "type": "string", - "description": "SSL certificate to use for serving `HTTPS`." - }, - "proxyUrl": { - "type": "string", - "description": "URL to proxy unhandled requests to." - }, - "proxyOptions": { - "type": "object", - "description": "Options for the proxy used by `http-server`.", - "default": {}, - "properties": { "secure": { "type": "boolean", "default": false } }, - "additionalProperties": true - }, - "watch": { - "type": "boolean", - "description": "Watch for file changes.", - "default": false - }, - "spa": { - "type": "boolean", - "description": "Redirect 404 errors to index.html (useful for SPA's).", - "default": false - } - }, - "additionalProperties": false, - "required": ["buildTarget"], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Serve static files with http-server\" %}\n\nSet up `http-server` to host static files on a local webserver.\n\n```json\n{\n \"static-serve\": {\n \"executor\": \"@nrwl/angular:file-server\",\n \"options\": {\n \"buildTarget\": \"app:build\",\n \"port\": 4201\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Watch for changes\" %}\n\nTo allow watching for changes, simply add the watch property.\n\n```json\n{\n \"static-serve\": {\n \"executor\": \"@nrwl/angular:file-server\",\n \"options\": {\n \"buildTarget\": \"app:build\",\n \"port\": 4201,\n \"watch\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Serves a static web application from a folder.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/executors/file-server/schema.json" - }, - { - "name": "webpack-browser", - "implementation": "/packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Schema for Webpack Browser", - "description": "The webpack-browser executor is very similar to the standard browser builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building", - "examplesFile": "##### Using a custom webpack configuration\n\nThe executor supports providing a path to a custom webpack configuration. This allows you to customize how your Angular application is built. It currently supports the following types of webpack configurations:\n\n- `object`\n- `Function`\n- `Promise`\n\nThe executor will merge the provided configuration with the webpack configuration that Angular Devkit uses. The merge order is:\n\n- Angular Devkit Configuration\n- Provided Configuration\n\nTo use a custom webpack configuration when building your Angular application, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nrwl/angular:webpack-browser\",\n \"options\": {\n ...\n \"customWebpackConfig\": {\n \"path\": \"apps/appName/webpack.config.js\"\n }\n }\n}\n```\n\n##### Incrementally Building your Application\n\nThe executor supports incrementally building your Angular application by building the workspace libraries it depends on _(that have been marked as buildable)_ and then building your application using the built source of the libraries.\n\nThis can improve build time as the building of the workspace libraries can be cached, meaning they only have to be rebuilt if they have changed.\n\n> Note: There may be some additional overhead in the linking of the built libraries' sources which may reduce the overall improvement in build time. Therefore this approach only benefits large applications and would likely have a negative impact on small and medium applications. \n> You can read more about when to use incremental builds [here](/more-concepts/incremental-builds#when-should-i-use-incremental-builds).\n\nTo allow your Angular application to take advantage of incremental building, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nrwl/angular:webpack-browser\",\n \"options\": {\n ...\n \"buildLibsFromSource\": false\n }\n}\n```\n", - "type": "object", - "presets": [ - { - "name": "Custom Webpack Configuration", - "keys": [ - "outputs", - "outputPath", - "index", - "main", - "polyfills", - "tsConfig", - "assets", - "styles", - "scripts", - "customWebpackConfig" - ] - } - ], - "properties": { - "assets": { - "type": "array", - "description": "List of static application assets.", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "followSymlinks": { - "type": "boolean", - "default": false, - "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched." - }, - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply 'glob'. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "main": { - "type": "string", - "description": "The full path for the main entry point to the app, relative to the current workspace." - }, - "polyfills": { - "description": "Polyfills to be included in the build.", - "oneOf": [ - { - "type": "array", - "description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.", - "items": { "type": "string", "uniqueItems": true }, - "default": [] - }, - { - "type": "string", - "description": "The full path for the polyfills file, relative to the current workspace or a module specifier. Example: 'zone.js'." - } - ] - }, - "tsConfig": { - "type": "string", - "description": "The full path for the TypeScript configuration file, relative to the current workspace." - }, - "scripts": { - "description": "Global scripts to be included in the build.", - "type": "array", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "input": { - "type": "string", - "description": "The file to include.", - "pattern": "\\.[cm]?jsx?$" - }, - "bundleName": { - "type": "string", - "pattern": "^[\\w\\-.]*$", - "description": "The bundle name for this extra entry point." - }, - "inject": { - "type": "boolean", - "description": "If the bundle will be referenced in the HTML file.", - "default": true - } - }, - "additionalProperties": false, - "required": ["input"] - }, - { - "type": "string", - "description": "The file to include.", - "pattern": "\\.[cm]?jsx?$" - } - ] - } - }, - "styles": { - "description": "Global styles to be included in the build.", - "type": "array", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "input": { - "type": "string", - "description": "The file to include.", - "pattern": "\\.(?:css|scss|sass|less|styl)$" - }, - "bundleName": { - "type": "string", - "pattern": "^[\\w\\-.]*$", - "description": "The bundle name for this extra entry point." - }, - "inject": { - "type": "boolean", - "description": "If the bundle will be referenced in the HTML file.", - "default": true - } - }, - "additionalProperties": false, - "required": ["input"] - }, - { - "type": "string", - "description": "The file to include.", - "pattern": "\\.(?:css|scss|sass|less|styl)$" - } - ] - } - }, - "inlineStyleLanguage": { - "description": "The stylesheet language to use for the application's inline component styles.", - "type": "string", - "default": "css", - "enum": ["css", "less", "sass", "scss"] - }, - "stylePreprocessorOptions": { - "description": "Options to pass to style preprocessors.", - "type": "object", - "properties": { - "includePaths": { - "description": "Paths to include. Paths will be resolved to project root.", - "type": "array", - "items": { "type": "string" }, - "default": [] - } - }, - "additionalProperties": false - }, - "optimization": { - "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.", - "x-user-analytics": 16, - "default": true, - "oneOf": [ - { - "type": "object", - "properties": { - "scripts": { - "type": "boolean", - "description": "Enables optimization of the scripts output.", - "default": true - }, - "styles": { - "description": "Enables optimization of the styles output.", - "default": true, - "oneOf": [ - { - "type": "object", - "properties": { - "minify": { - "type": "boolean", - "description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.", - "default": true - }, - "inlineCritical": { - "type": "boolean", - "description": "Extract and inline critical CSS definitions to improve first paint time.", - "default": true - } - }, - "additionalProperties": false - }, - { "type": "boolean" } - ] - }, - "fonts": { - "description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.", - "default": true, - "oneOf": [ - { - "type": "object", - "properties": { - "inline": { - "type": "boolean", - "description": "Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.", - "default": true - } - }, - "additionalProperties": false - }, - { "type": "boolean" } - ] - } - }, - "additionalProperties": false - }, - { "type": "boolean" } - ] - }, - "fileReplacements": { - "description": "Replace compilation source files with other compilation source files in the build.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "src": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "replaceWith": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["src", "replaceWith"] - }, - { - "type": "object", - "properties": { - "replace": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "with": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["replace", "with"] - } - ] - }, - "default": [] - }, - "outputPath": { - "type": "string", - "description": "The full path for the new output directory, relative to the current workspace.\n\nBy default, writes output to a folder named dist/ in the current project." - }, - "resourcesOutputPath": { - "type": "string", - "description": "The path where style resources will be placed, relative to outputPath.", - "default": "" - }, - "aot": { - "type": "boolean", - "description": "Build using Ahead of Time compilation.", - "x-user-analytics": 13, - "default": true - }, - "sourceMap": { - "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.", - "default": false, - "oneOf": [ - { - "type": "object", - "properties": { - "scripts": { - "type": "boolean", - "description": "Output source maps for all scripts.", - "default": true - }, - "styles": { - "type": "boolean", - "description": "Output source maps for all styles.", - "default": true - }, - "hidden": { - "type": "boolean", - "description": "Output source maps used for error reporting tools.", - "default": false - }, - "vendor": { - "type": "boolean", - "description": "Resolve vendor packages source maps.", - "default": false - } - }, - "additionalProperties": false - }, - { "type": "boolean" } - ] - }, - "vendorChunk": { - "type": "boolean", - "description": "Generate a seperate bundle containing only vendor libraries. This option should only used for development.", - "default": false - }, - "commonChunk": { - "type": "boolean", - "description": "Generate a seperate bundle containing code used across multiple bundles.", - "default": true - }, - "baseHref": { - "type": "string", - "description": "Base url for the application being built." - }, - "deployUrl": { - "type": "string", - "description": "URL where files will be deployed.", - "x-deprecated": "Use `baseHref` option, `APP_BASE_HREF` DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url." - }, - "verbose": { - "type": "boolean", - "description": "Adds more details to output logging.", - "default": false - }, - "progress": { - "type": "boolean", - "description": "Log progress to the console while building.", - "default": true - }, - "i18nMissingTranslation": { - "type": "string", - "description": "How to handle missing translations for i18n.", - "enum": ["warning", "error", "ignore"], - "default": "warning" - }, - "i18nDuplicateTranslation": { - "type": "string", - "description": "How to handle duplicate translations for i18n.", - "enum": ["warning", "error", "ignore"], - "default": "warning" - }, - "localize": { - "description": "Translate the bundles in one or more locales.", - "oneOf": [ - { "type": "boolean", "description": "Translate all locales." }, - { - "type": "array", - "description": "List of locales ID's to translate.", - "minItems": 1, - "items": { - "type": "string", - "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$" - } - } - ] - }, - "watch": { - "type": "boolean", - "description": "Run build when files change.", - "default": false - }, - "outputHashing": { - "type": "string", - "description": "Define the output filename cache-busting hashing mode.", - "default": "none", - "enum": ["none", "all", "media", "bundles"] - }, - "poll": { - "type": "number", - "description": "Enable and define the file watching poll time period in milliseconds." - }, - "deleteOutputPath": { - "type": "boolean", - "description": "Delete the output path before building.", - "default": true - }, - "preserveSymlinks": { - "type": "boolean", - "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set." - }, - "extractLicenses": { - "type": "boolean", - "description": "Extract all licenses in a separate file.", - "default": true - }, - "buildOptimizer": { - "type": "boolean", - "description": "Enables advanced build optimizations when using the 'aot' option.", - "default": true - }, - "namedChunks": { - "type": "boolean", - "description": "Use file name for lazy loaded chunks.", - "default": false - }, - "subresourceIntegrity": { - "type": "boolean", - "description": "Enables the use of subresource integrity validation.", - "default": false - }, - "serviceWorker": { - "type": "boolean", - "description": "Generates a service worker config for production builds.", - "default": false - }, - "ngswConfigPath": { - "type": "string", - "description": "Path to ngsw-config.json." - }, - "index": { - "description": "Configures the generation of the application's HTML index.", - "oneOf": [ - { - "type": "string", - "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path." - }, - { - "type": "object", - "description": "", - "properties": { - "input": { - "type": "string", - "minLength": 1, - "description": "The path of a file to use for the application's generated HTML index." - }, - "output": { - "type": "string", - "minLength": 1, - "default": "index.html", - "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path." - } - }, - "required": ["input"] - } - ] - }, - "statsJson": { - "type": "boolean", - "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.", - "default": false - }, - "budgets": { - "description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.", - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of budget.", - "enum": [ - "all", - "allScript", - "any", - "anyScript", - "anyComponentStyle", - "bundle", - "initial" - ] - }, - "name": { - "type": "string", - "description": "The name of the bundle." - }, - "baseline": { - "type": "string", - "description": "The baseline size for comparison." - }, - "maximumWarning": { - "type": "string", - "description": "The maximum threshold for warning relative to the baseline." - }, - "maximumError": { - "type": "string", - "description": "The maximum threshold for error relative to the baseline." - }, - "minimumWarning": { - "type": "string", - "description": "The minimum threshold for warning relative to the baseline." - }, - "minimumError": { - "type": "string", - "description": "The minimum threshold for error relative to the baseline." - }, - "warning": { - "type": "string", - "description": "The threshold for warning relative to the baseline (min & max)." - }, - "error": { - "type": "string", - "description": "The threshold for error relative to the baseline (min & max)." - } - }, - "additionalProperties": false, - "required": ["type"] - }, - "default": [] - }, - "webWorkerTsConfig": { - "type": "string", - "description": "TypeScript configuration for Web Worker modules." - }, - "crossOrigin": { - "type": "string", - "description": "Define the crossorigin attribute setting of elements that provide CORS support.", - "default": "none", - "enum": ["none", "anonymous", "use-credentials"] - }, - "allowedCommonJsDependencies": { - "description": "A list of CommonJS packages that are allowed to be used without a build time warning.", - "type": "array", - "items": { "type": "string" }, - "default": [] - }, - "customWebpackConfig": { - "description": "Options for additional webpack configurations.", - "type": "object", - "properties": { - "path": { - "description": "Path to additional webpack configuration, relative to the workspace root.", - "type": "string" - } - }, - "additionalProperties": false - }, - "buildLibsFromSource": { - "type": "boolean", - "description": "Read buildable libraries from source instead of building them separately.", - "default": true - } - }, - "additionalProperties": false, - "required": ["outputPath", "index", "main", "tsConfig"], - "definitions": { - "assetPattern": { - "oneOf": [ - { - "type": "object", - "properties": { - "followSymlinks": { - "type": "boolean", - "default": false, - "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched." - }, - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply 'glob'. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - }, - "fileReplacement": { - "oneOf": [ - { - "type": "object", - "properties": { - "src": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "replaceWith": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["src", "replaceWith"] - }, - { - "type": "object", - "properties": { - "replace": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "with": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["replace", "with"] - } - ] - }, - "budget": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of budget.", - "enum": [ - "all", - "allScript", - "any", - "anyScript", - "anyComponentStyle", - "bundle", - "initial" - ] - }, - "name": { - "type": "string", - "description": "The name of the bundle." - }, - "baseline": { - "type": "string", - "description": "The baseline size for comparison." - }, - "maximumWarning": { - "type": "string", - "description": "The maximum threshold for warning relative to the baseline." - }, - "maximumError": { - "type": "string", - "description": "The maximum threshold for error relative to the baseline." - }, - "minimumWarning": { - "type": "string", - "description": "The minimum threshold for warning relative to the baseline." - }, - "minimumError": { - "type": "string", - "description": "The minimum threshold for error relative to the baseline." - }, - "warning": { - "type": "string", - "description": "The threshold for warning relative to the baseline (min & max)." - }, - "error": { - "type": "string", - "description": "The threshold for error relative to the baseline (min & max)." - } - }, - "additionalProperties": false, - "required": ["type"] - } - } - }, - "description": "The `webpack-browser` executor is very similar to the standard `browser` builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/builders/webpack-browser/schema.json" - }, - { - "name": "webpack-dev-server", - "implementation": "/packages/angular/src/builders/webpack-dev-server/webpack-dev-server.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Schema for Webpack Dev Server", - "description": "The webpack-dev-server executor is very similar to the standard dev server builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration.", - "examplesFile": "##### Seving an application with a custom webpack configuration\n\nThis executor should be used along with `@nrwl/angular:webpack-browser` to serve an application using a custom webpack configuration.\n\nYour `project.json` file should contain a `build` and `serve` target that matches the following:\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/angular:webpack-browser\",\n \"options\": {\n ...\n \"customWebpackConfig\": {\n \"path\": \"apps/appName/webpack.config.js\"\n }\n }\n},\n\"serve\": {\n \"executor\": \"@nrwl/angular:webpack-dev-server\",\n \"configurations\": {\n \"production\": {\n \"browserTarget\": \"appName:build:production\"\n },\n \"development\": {\n \"browserTarget\": \"appName:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\",\n}\n```\n", - "type": "object", - "presets": [ - { - "name": "Using a Different Port", - "keys": ["browserTarget", "port"] - } - ], - "properties": { - "browserTarget": { - "type": "string", - "description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.", - "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" - }, - "port": { - "type": "number", - "description": "Port to listen on.", - "default": 4200 - }, - "host": { - "type": "string", - "description": "Host to listen on.", - "default": "localhost" - }, - "proxyConfig": { - "type": "string", - "description": "Proxy configuration file. For more information, see https://angular.io/guide/build#proxying-to-a-backend-server." - }, - "ssl": { - "type": "boolean", - "description": "Serve using HTTPS.", - "default": false - }, - "sslKey": { - "type": "string", - "description": "SSL key to use for serving HTTPS." - }, - "sslCert": { - "type": "string", - "description": "SSL certificate to use for serving HTTPS." - }, - "headers": { - "type": "object", - "description": "Custom HTTP headers to be added to all responses.", - "propertyNames": { "pattern": "^[-_A-Za-z0-9]+$" }, - "additionalProperties": { "type": "string" } - }, - "open": { - "type": "boolean", - "description": "Opens the url in default browser.", - "default": false, - "alias": "o" - }, - "verbose": { - "type": "boolean", - "description": "Adds more details to output logging." - }, - "liveReload": { - "type": "boolean", - "description": "Whether to reload the page on change, using live-reload.", - "default": true - }, - "publicHost": { - "type": "string", - "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." - }, - "allowedHosts": { - "type": "array", - "description": "List of hosts that are allowed to access the dev server.", - "default": [], - "items": { "type": "string" } - }, - "servePath": { - "type": "string", - "description": "The pathname where the app will be served." - }, - "disableHostCheck": { - "type": "boolean", - "description": "Don't verify connected clients are part of allowed hosts.", - "default": false - }, - "hmr": { - "type": "boolean", - "description": "Enable hot module replacement.", - "default": false - }, - "watch": { - "type": "boolean", - "description": "Rebuild on change.", - "default": true - }, - "poll": { - "type": "number", - "description": "Enable and define the file watching poll time period in milliseconds." - }, - "buildLibsFromSource": { - "type": "boolean", - "description": "Read buildable libraries from source instead of building them separately. If not set, it will take the value specified in the `browserTarget` options, or it will default to `true` if it's also not set in the `browserTarget` options." - } - }, - "additionalProperties": false, - "required": ["browserTarget"] - }, - "description": "The `webpack-dev-server` executor is very similar to the standard `dev-server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/builders/webpack-dev-server/schema.json" - }, - { - "name": "webpack-server", - "implementation": "/packages/angular/src/builders/webpack-server/webpack-server.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Schema for Webpack Server", - "description": "The webpack-dev-server executor is very similar to the standard server builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration and NgUniversal for SSR.", - "type": "object", - "properties": { - "main": { - "type": "string", - "description": "The full path for the main entry point to the server app, relative to the current workspace." - }, - "tsConfig": { - "type": "string", - "default": "tsconfig.app.json", - "description": "The full path for the TypeScript configuration file, relative to the current workspace." - }, - "inlineStyleLanguage": { - "description": "The stylesheet language to use for the application's inline component styles.", - "type": "string", - "default": "css", - "enum": ["css", "less", "sass", "scss"] - }, - "stylePreprocessorOptions": { - "description": "Options to pass to style preprocessors", - "type": "object", - "properties": { - "includePaths": { - "description": "Paths to include. Paths will be resolved to project root.", - "type": "array", - "items": { "type": "string" }, - "default": [] - } - }, - "additionalProperties": false - }, - "optimization": { - "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.", - "default": true, - "x-user-analytics": "ep.ng_optimization", - "oneOf": [ - { - "type": "object", - "properties": { - "scripts": { - "type": "boolean", - "description": "Enables optimization of the scripts output.", - "default": true - }, - "styles": { - "type": "boolean", - "description": "Enables optimization of the styles output.", - "default": true - } - }, - "additionalProperties": false - }, - { "type": "boolean" } - ] - }, - "fileReplacements": { - "description": "Replace compilation source files with other compilation source files in the build.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "src": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "replaceWith": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["src", "replaceWith"] - }, - { - "type": "object", - "properties": { - "replace": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "with": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["replace", "with"] - } - ] - }, - "default": [] - }, - "outputPath": { - "type": "string", - "description": "The full path for the new output directory, relative to the current workspace.\n\nBy default, writes output to a folder named dist/ in the current project." - }, - "resourcesOutputPath": { - "type": "string", - "description": "The path where style resources will be placed, relative to outputPath." - }, - "sourceMap": { - "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.", - "default": false, - "oneOf": [ - { - "type": "object", - "properties": { - "scripts": { - "type": "boolean", - "description": "Output source maps for all scripts.", - "default": true - }, - "styles": { - "type": "boolean", - "description": "Output source maps for all styles.", - "default": true - }, - "hidden": { - "type": "boolean", - "description": "Output source maps used for error reporting tools.", - "default": false - }, - "vendor": { - "type": "boolean", - "description": "Resolve vendor packages source maps.", - "default": false - } - }, - "additionalProperties": false - }, - { "type": "boolean" } - ] - }, - "deployUrl": { - "type": "string", - "description": "URL where files will be deployed.", - "x-deprecated": "Use \"baseHref\" browser builder option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url." - }, - "verbose": { - "type": "boolean", - "description": "Adds more details to output logging.", - "default": false - }, - "progress": { - "type": "boolean", - "description": "Log progress to the console while building.", - "default": true - }, - "i18nMissingTranslation": { - "type": "string", - "description": "How to handle missing translations for i18n.", - "enum": ["warning", "error", "ignore"], - "default": "warning" - }, - "i18nDuplicateTranslation": { - "type": "string", - "description": "How to handle duplicate translations for i18n.", - "enum": ["warning", "error", "ignore"], - "default": "warning" - }, - "localize": { - "description": "Translate the bundles in one or more locales.", - "oneOf": [ - { "type": "boolean", "description": "Translate all locales." }, - { - "type": "array", - "description": "List of locales ID's to translate.", - "minItems": 1, - "items": { - "type": "string", - "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$" - } - } - ] - }, - "outputHashing": { - "type": "string", - "description": "Define the output filename cache-busting hashing mode.", - "default": "none", - "enum": ["none", "all", "media", "bundles"] - }, - "deleteOutputPath": { - "type": "boolean", - "description": "Delete the output path before building.", - "default": true - }, - "preserveSymlinks": { - "type": "boolean", - "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set." - }, - "extractLicenses": { - "type": "boolean", - "description": "Extract all licenses in a separate file, in the case of production builds only.", - "default": true - }, - "namedChunks": { - "type": "boolean", - "description": "Use file name for lazy loaded chunks.", - "default": false - }, - "externalDependencies": { - "description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.", - "type": "array", - "items": { "type": "string" }, - "default": [] - }, - "bundleDependencies": { - "description": "Which external dependencies to bundle into the bundle. By default, all of node_modules will be bundled.", - "default": true, - "oneOf": [ - { "type": "boolean" }, - { "type": "string", "enum": ["none", "all"] } - ] - }, - "statsJson": { - "type": "boolean", - "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.", - "default": false - }, - "watch": { - "type": "boolean", - "description": "Run build when files change.", - "default": false - }, - "poll": { - "type": "number", - "description": "Enable and define the file watching poll time period in milliseconds." - }, - "customWebpackConfig": { - "description": "Options for additional webpack configurations.", - "type": "object", - "properties": { - "path": { - "description": "Path to additional webpack configuration, relative to the workspace root.", - "type": "string" - } - }, - "additionalProperties": false - }, - "buildLibsFromSource": { - "type": "boolean", - "description": "Read buildable libraries from source instead of building them separately.", - "default": true - } - }, - "additionalProperties": false, - "required": ["outputPath", "main", "tsConfig"], - "definitions": { - "fileReplacement": { - "oneOf": [ - { - "type": "object", - "properties": { - "src": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "replaceWith": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["src", "replaceWith"] - }, - { - "type": "object", - "properties": { - "replace": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - }, - "with": { - "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" - } - }, - "additionalProperties": false, - "required": ["replace", "with"] - } - ] - } - }, - "presets": [] - }, - "description": "The `webpack-server` executor is very similar to the standard `server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration and NgUniversal for SSR.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/builders/webpack-server/schema.json" - }, - { - "name": "module-federation-dev-server", - "implementation": "/packages/angular/src/builders/module-federation-dev-server/module-federation-dev-server.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Schema for Module Federation Dev Server", - "description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host.", - "type": "object", - "presets": [ - { - "name": "Using a Different Port", - "keys": ["browserTarget", "port"] - } - ], - "properties": { - "browserTarget": { - "type": "string", - "description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.", - "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" - }, - "port": { - "type": "number", - "description": "Port to listen on.", - "default": 4200 - }, - "host": { - "type": "string", - "description": "Host to listen on.", - "default": "localhost" - }, - "proxyConfig": { - "type": "string", - "description": "Proxy configuration file. For more information, see https://angular.io/guide/build#proxying-to-a-backend-server." - }, - "ssl": { - "type": "boolean", - "description": "Serve using HTTPS.", - "default": false - }, - "sslKey": { - "type": "string", - "description": "SSL key to use for serving HTTPS." - }, - "sslCert": { - "type": "string", - "description": "SSL certificate to use for serving HTTPS." - }, - "headers": { - "type": "object", - "description": "Custom HTTP headers to be added to all responses.", - "propertyNames": { "pattern": "^[-_A-Za-z0-9]+$" }, - "additionalProperties": { "type": "string" } - }, - "open": { - "type": "boolean", - "description": "Opens the url in default browser.", - "default": false, - "alias": "o" - }, - "verbose": { - "type": "boolean", - "description": "Adds more details to output logging." - }, - "liveReload": { - "type": "boolean", - "description": "Whether to reload the page on change, using live-reload.", - "default": true - }, - "publicHost": { - "type": "string", - "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." - }, - "allowedHosts": { - "type": "array", - "description": "List of hosts that are allowed to access the dev server.", - "default": [], - "items": { "type": "string" } - }, - "servePath": { - "type": "string", - "description": "The pathname where the app will be served." - }, - "disableHostCheck": { - "type": "boolean", - "description": "Don't verify connected clients are part of allowed hosts.", - "default": false - }, - "hmr": { - "type": "boolean", - "description": "Enable hot module replacement.", - "default": false - }, - "watch": { - "type": "boolean", - "description": "Rebuild on change.", - "default": true - }, - "poll": { - "type": "number", - "description": "Enable and define the file watching poll time period in milliseconds." - }, - "devRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to run in development mode (i.e. using serve target)." - }, - "skipRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." - } - }, - "additionalProperties": false, - "required": ["browserTarget"], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\nThe Module Federation Dev Server will serve a host application and find the remote applications associated with the host and serve them statically also. \nSee an example set up of it below:\n\n```json\n{\n \"serve\": {\n \"executor\": \"@nrwl/angular:module-federation-dev-server\",\n \"configurations\": {\n \"production\": {\n \"browserTarget\": \"host:build:production\"\n },\n \"development\": {\n \"browserTarget\": \"host:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"port\": 4200,\n \"publicHost\": \"http://localhost:4200\"\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Serve host with remotes that can be live reloaded\" %}\nThe Module Federation Dev Server will serve a host application and find the remote applications associated with the host and serve a set selection with live reloading enabled also. \nSee an example set up of it below:\n\n```json\n{\n \"serve-with-hmr-remotes\": {\n \"executor\": \"@nrwl/angular:module-federation-dev-server\",\n \"configurations\": {\n \"production\": {\n \"browserTarget\": \"host:build:production\"\n },\n \"development\": {\n \"browserTarget\": \"host:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"port\": 4200,\n \"publicHost\": \"http://localhost:4200\",\n \"devRemotes\": [\"remote1\", \"remote2\"]\n }\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n" - }, - "description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/builders/module-federation-dev-server/schema.json" - }, - { - "name": "module-federation-dev-ssr", - "implementation": "/packages/angular/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.ts", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Module Federation SSR Dev Server Target", - "description": "SSR Dev Server target options for Module Federation host applications.", - "type": "object", - "properties": { - "browserTarget": { - "type": "string", - "description": "Browser target to build.", - "pattern": ".+:.+(:.+)?" - }, - "serverTarget": { - "type": "string", - "description": "Server target to build.", - "pattern": ".+:.+(:.+)?" - }, - "host": { - "type": "string", - "description": "Host to listen on.", - "default": "localhost" - }, - "port": { - "type": "number", - "default": 4200, - "description": "Port to start the development server at. Default is 4200. Pass 0 to get a dynamically assigned port." - }, - "publicHost": { - "type": "string", - "description": "The URL that the browser client should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." - }, - "open": { - "type": "boolean", - "description": "Opens the url in default browser.", - "default": false, - "alias": "o" - }, - "progress": { - "type": "boolean", - "description": "Log progress to the console while building." - }, - "inspect": { - "type": "boolean", - "description": "Launch the development server in inspector mode and listen on address and port '127.0.0.1:9229'.", - "default": false - }, - "ssl": { - "type": "boolean", - "description": "Serve using HTTPS.", - "default": false - }, - "sslKey": { - "type": "string", - "description": "SSL key to use for serving HTTPS." - }, - "sslCert": { - "type": "string", - "description": "SSL certificate to use for serving HTTPS." - }, - "proxyConfig": { - "type": "string", - "description": "Proxy configuration file." - }, - "devRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to run in development mode (i.e. using serve target)." - }, - "skipRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." - }, - "verbose": { - "type": "boolean", - "description": "Adds more details to output logging." - } - }, - "additionalProperties": false, - "required": ["browserTarget", "serverTarget"], - "presets": [] - }, - "description": "The module-federation-dev-ssr executor is reserved exclusively for use with host Module Federation applications that use SSR. It allows the user to specify which remote applications should be served with the host.", - "aliases": [], - "hidden": false, - "path": "/packages/angular/src/builders/module-federation-dev-ssr/schema.json" - } - ] -} diff --git a/docs/generated/packages/angular/documents/angular-nx-version-matrix.md b/docs/generated/packages/angular/documents/angular-nx-version-matrix.md new file mode 100644 index 0000000000000..bedf1794b2fc2 --- /dev/null +++ b/docs/generated/packages/angular/documents/angular-nx-version-matrix.md @@ -0,0 +1,20 @@ +# Nx and Angular Version Compatibility Matrix + +Below is a reference table that matches versions of Angular to the version of Nx that is compatible with it. The table shows the version of Angular, the recommended version of Nx to use and the range of Nx versions that support the version of Angular. + +We provide a recommended version, and it is usually the latest minor version of Nx in the range provided because there will have been bug fixes added since the first release in the range. + +| Angular Version | **Nx Version _(recommended)_** | Nx Version _(range)_ | +| --------------- | ------------------------------ | -------------------- | +| ~15.0.0 | **latest** | 15.2.0 <= latest | +| ~14.2.0 | **15.1.1** | 14.6.0 <= 15.1.1 | +| ~14.1.0 | **14.5.10** | 14.5.0 <= 14.5.10 | +| ~14.0.0 | **14.4.3** | 14.2.1 <= 14.4.3 | +| ^13.0.0 | **14.1.9** | 13.2.0 <= 14.1.9 | +| ^12.0.0 | **13.1.4** | 12.3.0 <= 13.1.4 | +| ^11.0.0 | **12.2.0** | 11.0.0 <= 12.2.0 | +| ^10.0.0 | **10.4.15** | 9.7.0 <= 10.4.15 | +| ^9.0.0 | **9.6.0** | 8.12.4 <= 9.6.0 | +| ^8.0.0 | **8.12.2** | 8.7.0 <= 8.12.2 | + +If you would like to see how the supported versions of Node and Typescript for the version of Angular you are using, [Lars Gyrup Brink Nielsen](https://twitter.com/LayZeeDK) has a very good resource for that [here](https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3). diff --git a/docs/generated/packages/angular/documents/overview.md b/docs/generated/packages/angular/documents/overview.md new file mode 100644 index 0000000000000..f58a26add3e99 --- /dev/null +++ b/docs/generated/packages/angular/documents/overview.md @@ -0,0 +1,88 @@ +The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: + +- Integration with libraries such as Storybook, Jest, Cypress, Karma, and Protractor. +- Generators to help scaffold code quickly, including: + - Micro Frontends + - Libraries, both internal to your codebase and publishable to npm + - Upgrading AngularJS applications + - Single Component Application Modules (SCAMs) +- NgRx helpers. +- Utilities for automatic workspace refactoring. + +{% callout type="note" title="Currently using the Angular CLI?" %} +You can easily and mostly **automatically migrate from an Angular CLI** project to Nx! Learn more [here](/recipes/adopting-nx/migration-angular). +{% /callout %} + +## Setting up the Angular plugin + +Adding the Angular plugin to an existing Nx workspace can be done with the following: + +```shell +yarn add -D @nrwl/angular +``` + +```shell +npm install -D @nrwl/angular +``` + +## Using the Angular Plugin + +### Generating an application + +It's straightforward to generate an Angular application: + +```shell +nx g @nrwl/angular:app appName +``` + +By default, the application will be generated with: + +- ESLint as the linter. +- Jest as the unit test runner. +- Cypress as the E2E test runner. + +We can then serve, build, test, lint, and run e2e tests on the application with the following commands: + +```shell +nx serve appName +nx build appName +nx test appName +nx lint appName +nx e2e appName +``` + +### Generating a library + +Generating an Angular library is very similar to generating an application: + +```shell +nx g @nrwl/angular:lib libName +``` + +By default, the library will be generated with: + +- ESLint as the linter. +- Jest as the unit test runner. + +We can then test and lint the library with the following commands: + +```shell +nx test libName +nx lint libName +``` + +Read more about: + +- [Creating Libraries](/more-concepts/creating-libraries) +- [Library Types](/more-concepts/library-types) +- [Buildable and Publishable Libraries](/more-concepts/buildable-and-publishable-libraries) + +## More Documentation + +- [Angular Nx Tutorial](/angular-tutorial/1-code-generation) +- [Migrating from the Angular CLI](recipe/migration-angular) +- [Setup Module Federation with Angular and Nx](/recipes/module-federation/faster-builds) +- [Using NgRx](/recipes/other/misc-ngrx) +- [Using Data Persistence operators](/recipes/other/misc-data-persistence) +- [Upgrading an AngularJS application to Angular](/recipes/adopting-nx/migration-angularjs) +- [Using Tailwind CSS with Angular projects](/recipes/other/using-tailwind-css-with-angular-projects) diff --git a/docs/generated/packages/angular/executors/delegate-build.json b/docs/generated/packages/angular/executors/delegate-build.json new file mode 100644 index 0000000000000..f15df70011d57 --- /dev/null +++ b/docs/generated/packages/angular/executors/delegate-build.json @@ -0,0 +1,44 @@ +{ + "name": "delegate-build", + "implementation": "/packages/angular/src/executors/delegate-build/delegate-build.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Schema for an executor which delegates a build.", + "description": "Delegates the build to a different target while supporting incremental builds.", + "cli": "nx", + "type": "object", + "properties": { + "buildTarget": { + "description": "Build target used for building the application after its dependencies have been built.", + "type": "string" + }, + "outputPath": { + "type": "string", + "description": "The full path for the output directory, relative to the workspace root.", + "x-completion-type": "directory" + }, + "tsConfig": { + "type": "string", + "description": "The full path for the TypeScript configuration file, relative to the workspace root.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "watch": { + "type": "boolean", + "description": "Whether to run a build when any file changes.", + "default": false + } + }, + "additionalProperties": false, + "required": ["buildTarget", "outputPath", "tsConfig"], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\nDelegate the build of the project to a different target.\n\n```json\n{\n \"prod-build\": {\n \"executor\": \"@nrwl/angular:delegate-build\",\n \"options\": {\n \"buildTarget\": \"app:build:production\",\n \"outputPath\": \"dist/apps/app/production\",\n \"tsConfig\": \"apps/app/tsconfig.json\",\n \"watch\": false\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Watch for build changes\" %}\nDelegate the build of the project to a different target.\n\n```json\n{\n \"prod-build\": {\n \"executor\": \"@nrwl/angular:delegate-build\",\n \"options\": {\n \"buildTarget\": \"app:build:production\",\n \"outputPath\": \"dist/apps/app/production\",\n \"tsConfig\": \"apps/app/tsconfig.json\",\n \"watch\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Delegates the build to a different target while supporting incremental builds.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/executors/delegate-build/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/file-server.json b/docs/generated/packages/angular/executors/file-server.json new file mode 100644 index 0000000000000..ce93c4a17c572 --- /dev/null +++ b/docs/generated/packages/angular/executors/file-server.json @@ -0,0 +1,80 @@ +{ + "name": "file-server", + "implementation": "/packages/angular/src/executors/file-server/file-server.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "File Server", + "description": "Serves a static web application from a folder.", + "type": "object", + "cli": "nx", + "properties": { + "buildTarget": { + "type": "string", + "description": "Target which builds the application." + }, + "parallel": { + "type": "boolean", + "description": "Build the target in parallel.", + "default": true + }, + "maxParallel": { + "type": "number", + "description": "Max number of parallel jobs." + }, + "port": { + "type": "number", + "description": "Port to listen on.", + "default": 4200 + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + }, + "ssl": { + "type": "boolean", + "description": "Serve using `HTTPS`.", + "default": false + }, + "sslKey": { + "type": "string", + "description": "SSL key to use for serving `HTTPS`." + }, + "sslCert": { + "type": "string", + "description": "SSL certificate to use for serving `HTTPS`." + }, + "proxyUrl": { + "type": "string", + "description": "URL to proxy unhandled requests to." + }, + "proxyOptions": { + "type": "object", + "description": "Options for the proxy used by `http-server`.", + "default": {}, + "properties": { "secure": { "type": "boolean", "default": false } }, + "additionalProperties": true + }, + "watch": { + "type": "boolean", + "description": "Watch for file changes.", + "default": false + }, + "spa": { + "type": "boolean", + "description": "Redirect 404 errors to index.html (useful for SPA's).", + "default": false + } + }, + "additionalProperties": false, + "required": ["buildTarget"], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Serve static files with http-server\" %}\n\nSet up `http-server` to host static files on a local webserver.\n\n```json\n{\n \"static-serve\": {\n \"executor\": \"@nrwl/angular:file-server\",\n \"options\": {\n \"buildTarget\": \"app:build\",\n \"port\": 4201\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Watch for changes\" %}\n\nTo allow watching for changes, simply add the watch property.\n\n```json\n{\n \"static-serve\": {\n \"executor\": \"@nrwl/angular:file-server\",\n \"options\": {\n \"buildTarget\": \"app:build\",\n \"port\": 4201,\n \"watch\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Serves a static web application from a folder.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/executors/file-server/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/module-federation-dev-server.json b/docs/generated/packages/angular/executors/module-federation-dev-server.json new file mode 100644 index 0000000000000..02d810ff6f57f --- /dev/null +++ b/docs/generated/packages/angular/executors/module-federation-dev-server.json @@ -0,0 +1,121 @@ +{ + "name": "module-federation-dev-server", + "implementation": "/packages/angular/src/builders/module-federation-dev-server/module-federation-dev-server.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Schema for Module Federation Dev Server", + "description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host.", + "type": "object", + "presets": [ + { "name": "Using a Different Port", "keys": ["browserTarget", "port"] } + ], + "properties": { + "browserTarget": { + "type": "string", + "description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.", + "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" + }, + "port": { + "type": "number", + "description": "Port to listen on.", + "default": 4200 + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + }, + "proxyConfig": { + "type": "string", + "description": "Proxy configuration file. For more information, see https://angular.io/guide/build#proxying-to-a-backend-server." + }, + "ssl": { + "type": "boolean", + "description": "Serve using HTTPS.", + "default": false + }, + "sslKey": { + "type": "string", + "description": "SSL key to use for serving HTTPS." + }, + "sslCert": { + "type": "string", + "description": "SSL certificate to use for serving HTTPS." + }, + "headers": { + "type": "object", + "description": "Custom HTTP headers to be added to all responses.", + "propertyNames": { "pattern": "^[-_A-Za-z0-9]+$" }, + "additionalProperties": { "type": "string" } + }, + "open": { + "type": "boolean", + "description": "Opens the url in default browser.", + "default": false, + "alias": "o" + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging." + }, + "liveReload": { + "type": "boolean", + "description": "Whether to reload the page on change, using live-reload.", + "default": true + }, + "publicHost": { + "type": "string", + "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." + }, + "allowedHosts": { + "type": "array", + "description": "List of hosts that are allowed to access the dev server.", + "default": [], + "items": { "type": "string" } + }, + "servePath": { + "type": "string", + "description": "The pathname where the app will be served." + }, + "disableHostCheck": { + "type": "boolean", + "description": "Don't verify connected clients are part of allowed hosts.", + "default": false + }, + "hmr": { + "type": "boolean", + "description": "Enable hot module replacement.", + "default": false + }, + "watch": { + "type": "boolean", + "description": "Rebuild on change.", + "default": true + }, + "poll": { + "type": "number", + "description": "Enable and define the file watching poll time period in milliseconds." + }, + "devRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to run in development mode (i.e. using serve target)." + }, + "skipRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." + } + }, + "additionalProperties": false, + "required": ["browserTarget"], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\nThe Module Federation Dev Server will serve a host application and find the remote applications associated with the host and serve them statically also. \nSee an example set up of it below:\n\n```json\n{\n \"serve\": {\n \"executor\": \"@nrwl/angular:module-federation-dev-server\",\n \"configurations\": {\n \"production\": {\n \"browserTarget\": \"host:build:production\"\n },\n \"development\": {\n \"browserTarget\": \"host:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"port\": 4200,\n \"publicHost\": \"http://localhost:4200\"\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Serve host with remotes that can be live reloaded\" %}\nThe Module Federation Dev Server will serve a host application and find the remote applications associated with the host and serve a set selection with live reloading enabled also. \nSee an example set up of it below:\n\n```json\n{\n \"serve-with-hmr-remotes\": {\n \"executor\": \"@nrwl/angular:module-federation-dev-server\",\n \"configurations\": {\n \"production\": {\n \"browserTarget\": \"host:build:production\"\n },\n \"development\": {\n \"browserTarget\": \"host:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"port\": 4200,\n \"publicHost\": \"http://localhost:4200\",\n \"devRemotes\": [\"remote1\", \"remote2\"]\n }\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n" + }, + "description": "The module-federation-dev-server executor is reserved exclusively for use with host Module Federation applications. It allows the user to specify which remote applications should be served with the host.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/builders/module-federation-dev-server/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/module-federation-dev-ssr.json b/docs/generated/packages/angular/executors/module-federation-dev-ssr.json new file mode 100644 index 0000000000000..eeae7fc679b20 --- /dev/null +++ b/docs/generated/packages/angular/executors/module-federation-dev-ssr.json @@ -0,0 +1,90 @@ +{ + "name": "module-federation-dev-ssr", + "implementation": "/packages/angular/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.ts", + "schema": { + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Module Federation SSR Dev Server Target", + "description": "SSR Dev Server target options for Module Federation host applications.", + "type": "object", + "properties": { + "browserTarget": { + "type": "string", + "description": "Browser target to build.", + "pattern": ".+:.+(:.+)?" + }, + "serverTarget": { + "type": "string", + "description": "Server target to build.", + "pattern": ".+:.+(:.+)?" + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + }, + "port": { + "type": "number", + "default": 4200, + "description": "Port to start the development server at. Default is 4200. Pass 0 to get a dynamically assigned port." + }, + "publicHost": { + "type": "string", + "description": "The URL that the browser client should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." + }, + "open": { + "type": "boolean", + "description": "Opens the url in default browser.", + "default": false, + "alias": "o" + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building." + }, + "inspect": { + "type": "boolean", + "description": "Launch the development server in inspector mode and listen on address and port '127.0.0.1:9229'.", + "default": false + }, + "ssl": { + "type": "boolean", + "description": "Serve using HTTPS.", + "default": false + }, + "sslKey": { + "type": "string", + "description": "SSL key to use for serving HTTPS." + }, + "sslCert": { + "type": "string", + "description": "SSL certificate to use for serving HTTPS." + }, + "proxyConfig": { + "type": "string", + "description": "Proxy configuration file." + }, + "devRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to run in development mode (i.e. using serve target)." + }, + "skipRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging." + } + }, + "additionalProperties": false, + "required": ["browserTarget", "serverTarget"], + "presets": [] + }, + "description": "The module-federation-dev-ssr executor is reserved exclusively for use with host Module Federation applications that use SSR. It allows the user to specify which remote applications should be served with the host.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/builders/module-federation-dev-ssr/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/ng-packagr-lite.json b/docs/generated/packages/angular/executors/ng-packagr-lite.json new file mode 100644 index 0000000000000..0b4d3602d8c4e --- /dev/null +++ b/docs/generated/packages/angular/executors/ng-packagr-lite.json @@ -0,0 +1,66 @@ +{ + "name": "ng-packagr-lite", + "implementation": "/packages/angular/src/executors/ng-packagr-lite/ng-packagr-lite.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "title": "ng-packagr Target", + "description": "Builds a library with support for incremental builds.\n\nThis executor is meant to be used with buildable libraries in an incremental build scenario. It is similar to the `@nrwl/angular:package` executor but with some key differences:\n- It doesn't run `ngcc` automatically (`ngcc` needs to be run separately beforehand if needed, this can be done in a `postinstall` hook on `package.json`).\n- It only produces ESM2020 bundles.\n- It doesn't generate package exports in the `package.json`.", + "cli": "nx", + "type": "object", + "presets": [ + { + "name": "Buildable Library with Tailwind", + "keys": ["project", "tailwindConfig"] + }, + { + "name": "Updating Project Dependencies for Buildable Library", + "keys": [ + "project", + "updateBuildableProjectDepsInPackageJson", + "buildableProjectDepsInPackageJsonType" + ] + } + ], + "properties": { + "project": { + "type": "string", + "description": "The file path for the ng-packagr configuration file, relative to the workspace root." + }, + "tsConfig": { + "type": "string", + "description": "The full path for the TypeScript configuration file, relative to the workspace root.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "watch": { + "type": "boolean", + "description": "Whether to run a build when any file changes.", + "default": false + }, + "updateBuildableProjectDepsInPackageJson": { + "type": "boolean", + "description": "Whether to update the buildable project dependencies in package.json.", + "default": true + }, + "buildableProjectDepsInPackageJsonType": { + "type": "string", + "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", + "enum": ["dependencies", "peerDependencies"], + "default": "peerDependencies" + }, + "tailwindConfig": { + "type": "string", + "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured." + } + }, + "additionalProperties": false, + "required": ["project"] + }, + "description": "Builds a library with support for incremental builds.\nThis executor is meant to be used with buildable libraries in an incremental build scenario. It is similar to the `@nrwl/angular:package` executor but with some key differences:\n- It doesn't run `ngcc` automatically (`ngcc` needs to be run separately beforehand if needed, this can be done in a `postinstall` hook on `package.json`).\n- It only produces ESM2020 bundles.\n- It doesn't generate package exports in the `package.json`.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/executors/ng-packagr-lite/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/package.json b/docs/generated/packages/angular/executors/package.json new file mode 100644 index 0000000000000..f01785dce1ea4 --- /dev/null +++ b/docs/generated/packages/angular/executors/package.json @@ -0,0 +1,76 @@ +{ + "name": "package", + "implementation": "/packages/angular/src/executors/package/package.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "title": "ng-packagr Target", + "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\n\nThis executor is similar to the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.", + "cli": "nx", + "type": "object", + "presets": [ + { + "name": "Publishable Library with Tailwind", + "keys": [ + "project", + "tailwindConfig" + ] + }, + { + "name": "Updating Project Dependencies for Publishable Library", + "keys": [ + "project", + "updateBuildableProjectDepsInPackageJson", + "buildableProjectDepsInPackageJsonType" + ] + } + ], + "properties": { + "project": { + "type": "string", + "description": "The file path for the ng-packagr configuration file, relative to the workspace root." + }, + "tsConfig": { + "type": "string", + "description": "The full path for the TypeScript configuration file, relative to the workspace root.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "watch": { + "type": "boolean", + "description": "Whether to run a build when any file changes.", + "default": false + }, + "updateBuildableProjectDepsInPackageJson": { + "type": "boolean", + "description": "Whether to update the buildable project dependencies in package.json.", + "default": true + }, + "buildableProjectDepsInPackageJsonType": { + "type": "string", + "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", + "enum": [ + "dependencies", + "peerDependencies" + ], + "default": "peerDependencies" + }, + "tailwindConfig": { + "type": "string", + "description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured.", + "x-completion-type": "file", + "x-completion-glob": "tailwind.config.js" + } + }, + "additionalProperties": false, + "required": [ + "project" + ] + }, + "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\nThis executor is similar to the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/executors/package/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/webpack-browser.json b/docs/generated/packages/angular/executors/webpack-browser.json new file mode 100644 index 0000000000000..ebd544539fef1 --- /dev/null +++ b/docs/generated/packages/angular/executors/webpack-browser.json @@ -0,0 +1,691 @@ +{ + "name": "webpack-browser", + "implementation": "/packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Schema for Webpack Browser", + "description": "The webpack-browser executor is very similar to the standard browser builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building", + "examplesFile": "##### Using a custom webpack configuration\n\nThe executor supports providing a path to a custom webpack configuration. This allows you to customize how your Angular application is built. It currently supports the following types of webpack configurations:\n\n- `object`\n- `Function`\n- `Promise`\n\nThe executor will merge the provided configuration with the webpack configuration that Angular Devkit uses. The merge order is:\n\n- Angular Devkit Configuration\n- Provided Configuration\n\nTo use a custom webpack configuration when building your Angular application, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nrwl/angular:webpack-browser\",\n \"options\": {\n ...\n \"customWebpackConfig\": {\n \"path\": \"apps/appName/webpack.config.js\"\n }\n }\n}\n```\n\n##### Incrementally Building your Application\n\nThe executor supports incrementally building your Angular application by building the workspace libraries it depends on _(that have been marked as buildable)_ and then building your application using the built source of the libraries.\n\nThis can improve build time as the building of the workspace libraries can be cached, meaning they only have to be rebuilt if they have changed.\n\n> Note: There may be some additional overhead in the linking of the built libraries' sources which may reduce the overall improvement in build time. Therefore this approach only benefits large applications and would likely have a negative impact on small and medium applications. \n> You can read more about when to use incremental builds [here](/more-concepts/incremental-builds#when-should-i-use-incremental-builds).\n\nTo allow your Angular application to take advantage of incremental building, change the `build` target in your `project.json` to match the following:\n\n```typescript\n\"build\": {\n \"executor\": \"@nrwl/angular:webpack-browser\",\n \"options\": {\n ...\n \"buildLibsFromSource\": false\n }\n}\n```\n", + "type": "object", + "presets": [ + { + "name": "Custom Webpack Configuration", + "keys": [ + "outputs", + "outputPath", + "index", + "main", + "polyfills", + "tsConfig", + "assets", + "styles", + "scripts", + "customWebpackConfig" + ] + } + ], + "properties": { + "assets": { + "type": "array", + "description": "List of static application assets.", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "followSymlinks": { + "type": "boolean", + "default": false, + "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched." + }, + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply 'glob'. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "main": { + "type": "string", + "description": "The full path for the main entry point to the app, relative to the current workspace." + }, + "polyfills": { + "description": "Polyfills to be included in the build.", + "oneOf": [ + { + "type": "array", + "description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.", + "items": { "type": "string", "uniqueItems": true }, + "default": [] + }, + { + "type": "string", + "description": "The full path for the polyfills file, relative to the current workspace or a module specifier. Example: 'zone.js'." + } + ] + }, + "tsConfig": { + "type": "string", + "description": "The full path for the TypeScript configuration file, relative to the current workspace." + }, + "scripts": { + "description": "Global scripts to be included in the build.", + "type": "array", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include.", + "pattern": "\\.[cm]?jsx?$" + }, + "bundleName": { + "type": "string", + "pattern": "^[\\w\\-.]*$", + "description": "The bundle name for this extra entry point." + }, + "inject": { + "type": "boolean", + "description": "If the bundle will be referenced in the HTML file.", + "default": true + } + }, + "additionalProperties": false, + "required": ["input"] + }, + { + "type": "string", + "description": "The file to include.", + "pattern": "\\.[cm]?jsx?$" + } + ] + } + }, + "styles": { + "description": "Global styles to be included in the build.", + "type": "array", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include.", + "pattern": "\\.(?:css|scss|sass|less|styl)$" + }, + "bundleName": { + "type": "string", + "pattern": "^[\\w\\-.]*$", + "description": "The bundle name for this extra entry point." + }, + "inject": { + "type": "boolean", + "description": "If the bundle will be referenced in the HTML file.", + "default": true + } + }, + "additionalProperties": false, + "required": ["input"] + }, + { + "type": "string", + "description": "The file to include.", + "pattern": "\\.(?:css|scss|sass|less|styl)$" + } + ] + } + }, + "inlineStyleLanguage": { + "description": "The stylesheet language to use for the application's inline component styles.", + "type": "string", + "default": "css", + "enum": ["css", "less", "sass", "scss"] + }, + "stylePreprocessorOptions": { + "description": "Options to pass to style preprocessors.", + "type": "object", + "properties": { + "includePaths": { + "description": "Paths to include. Paths will be resolved to project root.", + "type": "array", + "items": { "type": "string" }, + "default": [] + } + }, + "additionalProperties": false + }, + "optimization": { + "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.", + "x-user-analytics": 16, + "default": true, + "oneOf": [ + { + "type": "object", + "properties": { + "scripts": { + "type": "boolean", + "description": "Enables optimization of the scripts output.", + "default": true + }, + "styles": { + "description": "Enables optimization of the styles output.", + "default": true, + "oneOf": [ + { + "type": "object", + "properties": { + "minify": { + "type": "boolean", + "description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.", + "default": true + }, + "inlineCritical": { + "type": "boolean", + "description": "Extract and inline critical CSS definitions to improve first paint time.", + "default": true + } + }, + "additionalProperties": false + }, + { "type": "boolean" } + ] + }, + "fonts": { + "description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.", + "default": true, + "oneOf": [ + { + "type": "object", + "properties": { + "inline": { + "type": "boolean", + "description": "Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.", + "default": true + } + }, + "additionalProperties": false + }, + { "type": "boolean" } + ] + } + }, + "additionalProperties": false + }, + { "type": "boolean" } + ] + }, + "fileReplacements": { + "description": "Replace compilation source files with other compilation source files in the build.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "src": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "replaceWith": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["src", "replaceWith"] + }, + { + "type": "object", + "properties": { + "replace": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "with": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["replace", "with"] + } + ] + }, + "default": [] + }, + "outputPath": { + "type": "string", + "description": "The full path for the new output directory, relative to the current workspace.\n\nBy default, writes output to a folder named dist/ in the current project." + }, + "resourcesOutputPath": { + "type": "string", + "description": "The path where style resources will be placed, relative to outputPath.", + "default": "" + }, + "aot": { + "type": "boolean", + "description": "Build using Ahead of Time compilation.", + "x-user-analytics": 13, + "default": true + }, + "sourceMap": { + "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.", + "default": false, + "oneOf": [ + { + "type": "object", + "properties": { + "scripts": { + "type": "boolean", + "description": "Output source maps for all scripts.", + "default": true + }, + "styles": { + "type": "boolean", + "description": "Output source maps for all styles.", + "default": true + }, + "hidden": { + "type": "boolean", + "description": "Output source maps used for error reporting tools.", + "default": false + }, + "vendor": { + "type": "boolean", + "description": "Resolve vendor packages source maps.", + "default": false + } + }, + "additionalProperties": false + }, + { "type": "boolean" } + ] + }, + "vendorChunk": { + "type": "boolean", + "description": "Generate a seperate bundle containing only vendor libraries. This option should only used for development.", + "default": false + }, + "commonChunk": { + "type": "boolean", + "description": "Generate a seperate bundle containing code used across multiple bundles.", + "default": true + }, + "baseHref": { + "type": "string", + "description": "Base url for the application being built." + }, + "deployUrl": { + "type": "string", + "description": "URL where files will be deployed.", + "x-deprecated": "Use `baseHref` option, `APP_BASE_HREF` DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url." + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging.", + "default": false + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building.", + "default": true + }, + "i18nMissingTranslation": { + "type": "string", + "description": "How to handle missing translations for i18n.", + "enum": ["warning", "error", "ignore"], + "default": "warning" + }, + "i18nDuplicateTranslation": { + "type": "string", + "description": "How to handle duplicate translations for i18n.", + "enum": ["warning", "error", "ignore"], + "default": "warning" + }, + "localize": { + "description": "Translate the bundles in one or more locales.", + "oneOf": [ + { "type": "boolean", "description": "Translate all locales." }, + { + "type": "array", + "description": "List of locales ID's to translate.", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$" + } + } + ] + }, + "watch": { + "type": "boolean", + "description": "Run build when files change.", + "default": false + }, + "outputHashing": { + "type": "string", + "description": "Define the output filename cache-busting hashing mode.", + "default": "none", + "enum": ["none", "all", "media", "bundles"] + }, + "poll": { + "type": "number", + "description": "Enable and define the file watching poll time period in milliseconds." + }, + "deleteOutputPath": { + "type": "boolean", + "description": "Delete the output path before building.", + "default": true + }, + "preserveSymlinks": { + "type": "boolean", + "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set." + }, + "extractLicenses": { + "type": "boolean", + "description": "Extract all licenses in a separate file.", + "default": true + }, + "buildOptimizer": { + "type": "boolean", + "description": "Enables advanced build optimizations when using the 'aot' option.", + "default": true + }, + "namedChunks": { + "type": "boolean", + "description": "Use file name for lazy loaded chunks.", + "default": false + }, + "subresourceIntegrity": { + "type": "boolean", + "description": "Enables the use of subresource integrity validation.", + "default": false + }, + "serviceWorker": { + "type": "boolean", + "description": "Generates a service worker config for production builds.", + "default": false + }, + "ngswConfigPath": { + "type": "string", + "description": "Path to ngsw-config.json." + }, + "index": { + "description": "Configures the generation of the application's HTML index.", + "oneOf": [ + { + "type": "string", + "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path." + }, + { + "type": "object", + "description": "", + "properties": { + "input": { + "type": "string", + "minLength": 1, + "description": "The path of a file to use for the application's generated HTML index." + }, + "output": { + "type": "string", + "minLength": 1, + "default": "index.html", + "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path." + } + }, + "required": ["input"] + } + ] + }, + "statsJson": { + "type": "boolean", + "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.", + "default": false + }, + "budgets": { + "description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.", + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of budget.", + "enum": [ + "all", + "allScript", + "any", + "anyScript", + "anyComponentStyle", + "bundle", + "initial" + ] + }, + "name": { + "type": "string", + "description": "The name of the bundle." + }, + "baseline": { + "type": "string", + "description": "The baseline size for comparison." + }, + "maximumWarning": { + "type": "string", + "description": "The maximum threshold for warning relative to the baseline." + }, + "maximumError": { + "type": "string", + "description": "The maximum threshold for error relative to the baseline." + }, + "minimumWarning": { + "type": "string", + "description": "The minimum threshold for warning relative to the baseline." + }, + "minimumError": { + "type": "string", + "description": "The minimum threshold for error relative to the baseline." + }, + "warning": { + "type": "string", + "description": "The threshold for warning relative to the baseline (min & max)." + }, + "error": { + "type": "string", + "description": "The threshold for error relative to the baseline (min & max)." + } + }, + "additionalProperties": false, + "required": ["type"] + }, + "default": [] + }, + "webWorkerTsConfig": { + "type": "string", + "description": "TypeScript configuration for Web Worker modules." + }, + "crossOrigin": { + "type": "string", + "description": "Define the crossorigin attribute setting of elements that provide CORS support.", + "default": "none", + "enum": ["none", "anonymous", "use-credentials"] + }, + "allowedCommonJsDependencies": { + "description": "A list of CommonJS packages that are allowed to be used without a build time warning.", + "type": "array", + "items": { "type": "string" }, + "default": [] + }, + "customWebpackConfig": { + "description": "Options for additional webpack configurations.", + "type": "object", + "properties": { + "path": { + "description": "Path to additional webpack configuration, relative to the workspace root.", + "type": "string" + } + }, + "additionalProperties": false + }, + "buildLibsFromSource": { + "type": "boolean", + "description": "Read buildable libraries from source instead of building them separately.", + "default": true + } + }, + "additionalProperties": false, + "required": ["outputPath", "index", "main", "tsConfig"], + "definitions": { + "assetPattern": { + "oneOf": [ + { + "type": "object", + "properties": { + "followSymlinks": { + "type": "boolean", + "default": false, + "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched." + }, + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply 'glob'. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + }, + "fileReplacement": { + "oneOf": [ + { + "type": "object", + "properties": { + "src": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "replaceWith": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["src", "replaceWith"] + }, + { + "type": "object", + "properties": { + "replace": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "with": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["replace", "with"] + } + ] + }, + "budget": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of budget.", + "enum": [ + "all", + "allScript", + "any", + "anyScript", + "anyComponentStyle", + "bundle", + "initial" + ] + }, + "name": { + "type": "string", + "description": "The name of the bundle." + }, + "baseline": { + "type": "string", + "description": "The baseline size for comparison." + }, + "maximumWarning": { + "type": "string", + "description": "The maximum threshold for warning relative to the baseline." + }, + "maximumError": { + "type": "string", + "description": "The maximum threshold for error relative to the baseline." + }, + "minimumWarning": { + "type": "string", + "description": "The minimum threshold for warning relative to the baseline." + }, + "minimumError": { + "type": "string", + "description": "The minimum threshold for error relative to the baseline." + }, + "warning": { + "type": "string", + "description": "The threshold for warning relative to the baseline (min & max)." + }, + "error": { + "type": "string", + "description": "The threshold for error relative to the baseline (min & max)." + } + }, + "additionalProperties": false, + "required": ["type"] + } + } + }, + "description": "The `webpack-browser` executor is very similar to the standard `browser` builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/builders/webpack-browser/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/webpack-dev-server.json b/docs/generated/packages/angular/executors/webpack-dev-server.json new file mode 100644 index 0000000000000..05c80b831c35f --- /dev/null +++ b/docs/generated/packages/angular/executors/webpack-dev-server.json @@ -0,0 +1,115 @@ +{ + "name": "webpack-dev-server", + "implementation": "/packages/angular/src/builders/webpack-dev-server/webpack-dev-server.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Schema for Webpack Dev Server", + "description": "The webpack-dev-server executor is very similar to the standard dev server builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration.", + "examplesFile": "##### Seving an application with a custom webpack configuration\n\nThis executor should be used along with `@nrwl/angular:webpack-browser` to serve an application using a custom webpack configuration.\n\nYour `project.json` file should contain a `build` and `serve` target that matches the following:\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/angular:webpack-browser\",\n \"options\": {\n ...\n \"customWebpackConfig\": {\n \"path\": \"apps/appName/webpack.config.js\"\n }\n }\n},\n\"serve\": {\n \"executor\": \"@nrwl/angular:webpack-dev-server\",\n \"configurations\": {\n \"production\": {\n \"browserTarget\": \"appName:build:production\"\n },\n \"development\": {\n \"browserTarget\": \"appName:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\",\n}\n```\n", + "type": "object", + "presets": [ + { "name": "Using a Different Port", "keys": ["browserTarget", "port"] } + ], + "properties": { + "browserTarget": { + "type": "string", + "description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.", + "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" + }, + "port": { + "type": "number", + "description": "Port to listen on.", + "default": 4200 + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + }, + "proxyConfig": { + "type": "string", + "description": "Proxy configuration file. For more information, see https://angular.io/guide/build#proxying-to-a-backend-server." + }, + "ssl": { + "type": "boolean", + "description": "Serve using HTTPS.", + "default": false + }, + "sslKey": { + "type": "string", + "description": "SSL key to use for serving HTTPS." + }, + "sslCert": { + "type": "string", + "description": "SSL certificate to use for serving HTTPS." + }, + "headers": { + "type": "object", + "description": "Custom HTTP headers to be added to all responses.", + "propertyNames": { "pattern": "^[-_A-Za-z0-9]+$" }, + "additionalProperties": { "type": "string" } + }, + "open": { + "type": "boolean", + "description": "Opens the url in default browser.", + "default": false, + "alias": "o" + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging." + }, + "liveReload": { + "type": "boolean", + "description": "Whether to reload the page on change, using live-reload.", + "default": true + }, + "publicHost": { + "type": "string", + "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." + }, + "allowedHosts": { + "type": "array", + "description": "List of hosts that are allowed to access the dev server.", + "default": [], + "items": { "type": "string" } + }, + "servePath": { + "type": "string", + "description": "The pathname where the app will be served." + }, + "disableHostCheck": { + "type": "boolean", + "description": "Don't verify connected clients are part of allowed hosts.", + "default": false + }, + "hmr": { + "type": "boolean", + "description": "Enable hot module replacement.", + "default": false + }, + "watch": { + "type": "boolean", + "description": "Rebuild on change.", + "default": true + }, + "poll": { + "type": "number", + "description": "Enable and define the file watching poll time period in milliseconds." + }, + "buildLibsFromSource": { + "type": "boolean", + "description": "Read buildable libraries from source instead of building them separately. If not set, it will take the value specified in the `browserTarget` options, or it will default to `true` if it's also not set in the `browserTarget` options." + } + }, + "additionalProperties": false, + "required": ["browserTarget"] + }, + "description": "The `webpack-dev-server` executor is very similar to the standard `dev-server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/builders/webpack-dev-server/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/executors/webpack-server.json b/docs/generated/packages/angular/executors/webpack-server.json new file mode 100644 index 0000000000000..99990eb97dbe3 --- /dev/null +++ b/docs/generated/packages/angular/executors/webpack-server.json @@ -0,0 +1,301 @@ +{ + "name": "webpack-server", + "implementation": "/packages/angular/src/builders/webpack-server/webpack-server.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Schema for Webpack Server", + "description": "The webpack-dev-server executor is very similar to the standard server builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration and NgUniversal for SSR.", + "type": "object", + "properties": { + "main": { + "type": "string", + "description": "The full path for the main entry point to the server app, relative to the current workspace." + }, + "tsConfig": { + "type": "string", + "default": "tsconfig.app.json", + "description": "The full path for the TypeScript configuration file, relative to the current workspace." + }, + "inlineStyleLanguage": { + "description": "The stylesheet language to use for the application's inline component styles.", + "type": "string", + "default": "css", + "enum": ["css", "less", "sass", "scss"] + }, + "stylePreprocessorOptions": { + "description": "Options to pass to style preprocessors", + "type": "object", + "properties": { + "includePaths": { + "description": "Paths to include. Paths will be resolved to project root.", + "type": "array", + "items": { "type": "string" }, + "default": [] + } + }, + "additionalProperties": false + }, + "optimization": { + "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.", + "default": true, + "x-user-analytics": "ep.ng_optimization", + "oneOf": [ + { + "type": "object", + "properties": { + "scripts": { + "type": "boolean", + "description": "Enables optimization of the scripts output.", + "default": true + }, + "styles": { + "type": "boolean", + "description": "Enables optimization of the styles output.", + "default": true + } + }, + "additionalProperties": false + }, + { "type": "boolean" } + ] + }, + "fileReplacements": { + "description": "Replace compilation source files with other compilation source files in the build.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "src": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "replaceWith": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["src", "replaceWith"] + }, + { + "type": "object", + "properties": { + "replace": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "with": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["replace", "with"] + } + ] + }, + "default": [] + }, + "outputPath": { + "type": "string", + "description": "The full path for the new output directory, relative to the current workspace.\n\nBy default, writes output to a folder named dist/ in the current project." + }, + "resourcesOutputPath": { + "type": "string", + "description": "The path where style resources will be placed, relative to outputPath." + }, + "sourceMap": { + "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.", + "default": false, + "oneOf": [ + { + "type": "object", + "properties": { + "scripts": { + "type": "boolean", + "description": "Output source maps for all scripts.", + "default": true + }, + "styles": { + "type": "boolean", + "description": "Output source maps for all styles.", + "default": true + }, + "hidden": { + "type": "boolean", + "description": "Output source maps used for error reporting tools.", + "default": false + }, + "vendor": { + "type": "boolean", + "description": "Resolve vendor packages source maps.", + "default": false + } + }, + "additionalProperties": false + }, + { "type": "boolean" } + ] + }, + "deployUrl": { + "type": "string", + "description": "URL where files will be deployed.", + "x-deprecated": "Use \"baseHref\" browser builder option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url." + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging.", + "default": false + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building.", + "default": true + }, + "i18nMissingTranslation": { + "type": "string", + "description": "How to handle missing translations for i18n.", + "enum": ["warning", "error", "ignore"], + "default": "warning" + }, + "i18nDuplicateTranslation": { + "type": "string", + "description": "How to handle duplicate translations for i18n.", + "enum": ["warning", "error", "ignore"], + "default": "warning" + }, + "localize": { + "description": "Translate the bundles in one or more locales.", + "oneOf": [ + { "type": "boolean", "description": "Translate all locales." }, + { + "type": "array", + "description": "List of locales ID's to translate.", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$" + } + } + ] + }, + "outputHashing": { + "type": "string", + "description": "Define the output filename cache-busting hashing mode.", + "default": "none", + "enum": ["none", "all", "media", "bundles"] + }, + "deleteOutputPath": { + "type": "boolean", + "description": "Delete the output path before building.", + "default": true + }, + "preserveSymlinks": { + "type": "boolean", + "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set." + }, + "extractLicenses": { + "type": "boolean", + "description": "Extract all licenses in a separate file, in the case of production builds only.", + "default": true + }, + "namedChunks": { + "type": "boolean", + "description": "Use file name for lazy loaded chunks.", + "default": false + }, + "externalDependencies": { + "description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.", + "type": "array", + "items": { "type": "string" }, + "default": [] + }, + "bundleDependencies": { + "description": "Which external dependencies to bundle into the bundle. By default, all of node_modules will be bundled.", + "default": true, + "oneOf": [ + { "type": "boolean" }, + { "type": "string", "enum": ["none", "all"] } + ] + }, + "statsJson": { + "type": "boolean", + "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.", + "default": false + }, + "watch": { + "type": "boolean", + "description": "Run build when files change.", + "default": false + }, + "poll": { + "type": "number", + "description": "Enable and define the file watching poll time period in milliseconds." + }, + "customWebpackConfig": { + "description": "Options for additional webpack configurations.", + "type": "object", + "properties": { + "path": { + "description": "Path to additional webpack configuration, relative to the workspace root.", + "type": "string" + } + }, + "additionalProperties": false + }, + "buildLibsFromSource": { + "type": "boolean", + "description": "Read buildable libraries from source instead of building them separately.", + "default": true + } + }, + "additionalProperties": false, + "required": ["outputPath", "main", "tsConfig"], + "definitions": { + "fileReplacement": { + "oneOf": [ + { + "type": "object", + "properties": { + "src": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "replaceWith": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["src", "replaceWith"] + }, + { + "type": "object", + "properties": { + "replace": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + }, + "with": { + "type": "string", + "pattern": "\\.(([cm]?j|t)sx?|json)$" + } + }, + "additionalProperties": false, + "required": ["replace", "with"] + } + ] + } + }, + "presets": [] + }, + "description": "The `webpack-server` executor is very similar to the standard `server` builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration and NgUniversal for SSR.", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/builders/webpack-server/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/angular/generators/add-linting.json b/docs/generated/packages/angular/generators/add-linting.json new file mode 100644 index 0000000000000..affe18c44238d --- /dev/null +++ b/docs/generated/packages/angular/generators/add-linting.json @@ -0,0 +1,57 @@ +{ + "name": "add-linting", + "factory": "./src/generators/add-linting/add-linting", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularAddLintingGenerator", + "title": "Add linting to an Angular project.", + "description": "Adds linting configuration to an Angular project.", + "cli": "nx", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:add-linting --prefix=cool --projectName=cool-lib --projectRoot=libs/cool-lib", + "description": "Adds ESLint with Angular-specific rules for an existing project named `cool-lib` with the [prefix](https://angular.io/guide/styleguide#style-02-07) `cool`" + } + ], + "properties": { + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors." + }, + "projectName": { + "type": "string", + "description": "The name of the project." + }, + "projectRoot": { + "type": "string", + "description": "The path to the root of the selected project." + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files.", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + } + }, + "additionalProperties": false, + "required": ["prefix", "projectName", "projectRoot"], + "presets": [] + }, + "description": "Adds linting configuration to an Angular project.", + "hidden": true, + "implementation": "/packages/angular/src/generators/add-linting/add-linting.ts", + "aliases": [], + "path": "/packages/angular/src/generators/add-linting/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/application.json b/docs/generated/packages/angular/generators/application.json new file mode 100644 index 0000000000000..71c0d63488ca4 --- /dev/null +++ b/docs/generated/packages/angular/generators/application.json @@ -0,0 +1,171 @@ +{ + "name": "application", + "factory": "./src/generators/application/application", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorNxApp", + "title": "Creates an Angular application.", + "description": "Creates an Angular application.", + "type": "object", + "cli": "nx", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the application?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less"], + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "sass", + "label": "SASS(.sass) [ http://sass-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + } + ] + } + }, + "routing": { + "type": "boolean", + "description": "Generate a routing module.", + "default": false, + "x-prompt": "Would you like to configure routing for this application?" + }, + "inlineStyle": { + "description": "Specifies if the style will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "s" + }, + "inlineTemplate": { + "description": "Specifies if the template will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "t" + }, + "viewEncapsulation": { + "description": "Specifies the view encapsulation strategy.", + "enum": ["Emulated", "None", "ShadowDom"], + "type": "string" + }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors.", + "alias": "p" + }, + "skipTests": { + "description": "Skip creating spec files.", + "type": "boolean", + "default": false, + "alias": "S" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "unitTestRunner": { + "type": "string", + "enum": ["karma", "jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["protractor", "cypress", "none"], + "description": "Test runner to use for end to end (E2E) tests. The `protractor` option is deprecated and it will be removed in v15.", + "default": "cypress" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting)." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "backendProject": { + "type": "string", + "description": "Backend project that provides data to this application. This sets up `proxy.config.json`." + }, + "strict": { + "type": "boolean", + "description": "Create an application with stricter type checking and build optimization options.", + "default": true + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "port": { + "type": "number", + "description": "The port at which the remote application should be served." + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "addTailwind": { + "type": "boolean", + "description": "Whether to configure Tailwind CSS for the application.", + "default": false + }, + "skipDefaultProject": { + "description": "Skip setting the project as the default project. When `false` (the default), the project is set as the default project only if there is no default project already set.", + "type": "boolean", + "default": false + }, + "standalone": { + "description": "Generate an application that is setup to use standalone components.", + "type": "boolean", + "default": false + }, + "rootProject": { + "description": "Create an application at the root of the workspace.", + "type": "boolean", + "default": false, + "hidden": true + } + }, + "additionalProperties": false, + "required": ["name"], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/angular:application my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory and style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n```bash\nnx g @nrwl/angular:app my-app --directory=my-dir --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Components application\" %}\n\nCreate an application with Single File Components (inline styles and inline templates):\n\n```bash\nnx g @nrwl/angular:app my-app --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Standalone Components application\" %}\n\nCreate an application that is setup to use standalone components:\n\n```bash\nnx g @nrwl/angular:app my-app --standalone\n```\n\n{% /tab %}\n\n{% tab label=\"Set custom prefix and tags\" %}\n\nSet the prefix to apply to generated selectors and add tags to the application (used for linting).\n\n```bash\nnx g @nrwl/angular:app my-app --prefix=admin --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Creates an Angular application.", + "implementation": "/packages/angular/src/generators/application/application.ts", + "hidden": false, + "path": "/packages/angular/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/change-storybook-targets.json b/docs/generated/packages/angular/generators/change-storybook-targets.json new file mode 100644 index 0000000000000..a7a12e9829102 --- /dev/null +++ b/docs/generated/packages/angular/generators/change-storybook-targets.json @@ -0,0 +1,29 @@ +{ + "name": "change-storybook-targets", + "factory": "./src/generators/change-storybook-targets/change-storybook-targets", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularChangeStorybookTargetsGenerator", + "title": "Change Storybook targets", + "description": "Change the Storybook target executors.", + "type": "object", + "cli": "nx", + "properties": { + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": [], + "examplesFile": "This generator will change the `storybook` and `build-storybook` targets in all your Angular projects that are configured to use Storybook. The new target configuration will use the native Storybook builders (`@storybook/angular:build-storybook` and `@storybook/angular:start-storybook`) instead of the Nx Storybook builders (`@nrwl/storybook:build-storybook` and `@nrwl/storybook:storybook`).\n\nThis generator is usually invoked through a migrator, when you are using `nx migrate` to upgrade your workspace to Nx `14.1.8` or later.\n\nIf you are on Nx `14.1.8` or later and you did not use `nx migrate`, you can run this generator manually by running the following command:\n\n```bash\nnx g @nrwl/angular:change-storybook-targets\n```\n\nYou can read more about how this generator works, and why we are changing the Storybook targets, in the [Angular Storybook targets documentation page](/packages/storybook/documents/angular-storybook-targets).\n", + "presets": [] + }, + "description": "Change storybook targets for Angular projects to use @storybook/angular executors", + "implementation": "/packages/angular/src/generators/change-storybook-targets/change-storybook-targets.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/change-storybook-targets/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/component-cypress-spec.json b/docs/generated/packages/angular/generators/component-cypress-spec.json new file mode 100644 index 0000000000000..e17bff1c8a1c5 --- /dev/null +++ b/docs/generated/packages/angular/generators/component-cypress-spec.json @@ -0,0 +1,67 @@ +{ + "name": "component-cypress-spec", + "factory": "./src/generators/component-cypress-spec/component-cypress-spec", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularComponentCypressSpecGenerator", + "type": "object", + "cli": "nx", + "description": "Creates a Cypress spec for a UI component that has a story.", + "properties": { + "projectName": { + "type": "string", + "description": "The name of the project.", + "examples": ["ui-samples"] + }, + "projectPath": { + "type": "string", + "description": "Path to the project.", + "examples": ["libs/ui-samples"] + }, + "componentName": { + "type": "string", + "description": "Class name of the component.", + "examples": ["AwesomeComponent"] + }, + "componentPath": { + "type": "string", + "description": "Relative path to the component file from the project root.", + "examples": ["awesome"] + }, + "componentFileName": { + "type": "string", + "description": "Component file name without the `.ts` extension.", + "examples": ["awesome.component"] + }, + "cypressProject": { + "type": "string", + "description": "The Cypress project to generate the stories under. By default, inferred from `projectName`." + }, + "specDirectory": { + "type": "string", + "description": "Directory where to place the generated spec file. By default matches the value of the `componentPath` option." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "projectName", + "projectPath", + "componentName", + "componentPath", + "componentFileName" + ], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\nCreate a cypress spec for a component that is set up with Storybook.\n\n```bash\nnx g @nrwl/angular:component-cypress-spec --componentName=MyButtonComponent --componentPath=libs/ui/src/lib/button/button.component.ts --componentFileName=button.component --projectName=ui --projectPath=libs/ui\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Creates a Cypress spec for a UI component that has a story.", + "hidden": true, + "implementation": "/packages/angular/src/generators/component-cypress-spec/component-cypress-spec.ts", + "aliases": [], + "path": "/packages/angular/src/generators/component-cypress-spec/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/component-story.json b/docs/generated/packages/angular/generators/component-story.json new file mode 100644 index 0000000000000..2c683f2bb1dd6 --- /dev/null +++ b/docs/generated/packages/angular/generators/component-story.json @@ -0,0 +1,52 @@ +{ + "name": "component-story", + "factory": "./src/generators/component-story/component-story", + "schema": { + "$schema": "https://json-schema.org/schema", + "$id": "NxAngularComponentStoryGenerator", + "type": "object", + "cli": "nx", + "description": "Creates a `stories.ts` file for an Angular component.", + "properties": { + "projectPath": { + "type": "string", + "description": "Path to the project.", + "examples": ["libs/ui-samples"] + }, + "componentName": { + "type": "string", + "description": "Class name of the component.", + "examples": ["AwesomeComponent"] + }, + "componentPath": { + "type": "string", + "description": "Relative path to the component file from the project root.", + "examples": ["awesome"] + }, + "componentFileName": { + "type": "string", + "description": "Component file name without the `.ts` extension.", + "examples": ["awesome.component"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "projectPath", + "componentName", + "componentPath", + "componentFileName" + ], + "presets": [] + }, + "description": "Creates a stories.ts file for a component.", + "hidden": true, + "implementation": "/packages/angular/src/generators/component-story/component-story.ts", + "aliases": [], + "path": "/packages/angular/src/generators/component-story/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/component-test.json b/docs/generated/packages/angular/generators/component-test.json new file mode 100644 index 0000000000000..294478866b425 --- /dev/null +++ b/docs/generated/packages/angular/generators/component-test.json @@ -0,0 +1,57 @@ +{ + "name": "component-test", + "factory": "./src/generators/component-test/component-test", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularComponentTestGenerator", + "type": "object", + "cli": "nx", + "description": "Create a `*.cy.ts` file for Cypress component testing for an Angular component.", + "properties": { + "project": { + "type": "string", + "description": "The name of the project where the component is located.", + "x-dropdown": "projects", + "x-prompt": "What project is the component located in?" + }, + "componentName": { + "type": "string", + "description": "Class name of the component to create a test for.", + "examples": ["MyFancyButtonComponent"], + "x-prompt": "What is the class name of the component to create a test for?" + }, + "componentDir": { + "type": "string", + "description": "Relative path to the folder that contains the component from the project root.", + "examples": ["src/lib/my-fancy-button"], + "x-prompt": "What is the path to the component directory from the project root?" + }, + "componentFileName": { + "type": "string", + "description": "File name that contains the component without the `.ts` extension.", + "examples": ["my-fancy-button.component"], + "x-prompt": "What is the file name that contains the component?" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "project", + "componentName", + "componentDir", + "componentFileName" + ], + "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nAngular component testing with Nx requires **Cypress version 10.7.0** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you're wanting to create Cypress tests for a Storybook story, then check out the [component-cypress-spec generator docs](/packages/angular/generators/component-cypress-spec)\n\nIf you're wanting to create Storybook stories for a component, then check out the [stories generator docs](/packages/angular/generators/stories) or [component-story generator docs](/packages/angular/generators/component-cypress-spec)\n{% /callout %}\n\nThis generator is used to create a Cypress component test file for a given Angular component.\n\n```shell\nnx g @nrwl/angular:component-test --project=my-cool-angular-project --componentName=CoolBtnComponent --componentDir=src/cool-btn --componentFileName=cool-btn.component\n```\n\nTest file are generated with the `.cy.ts` suffix. this is to prevent colliding with any existing `.spec.` files contained in the project.\n\nIt's currently expected the generated `.cy.ts` file will live side by side with the component. It is also assumed the project is already setup for component testing. If it isn't, then you can run the [cypress-component-project generator](/packages/angular/generators/cypress-component-configuration) to set up the project for component testing.\n", + "presets": [] + }, + "description": "Creates a cypress component test file for a component.", + "implementation": "/packages/angular/src/generators/component-test/component-test.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/component-test/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/component.json b/docs/generated/packages/angular/generators/component.json new file mode 100644 index 0000000000000..c6ac4b0b15c79 --- /dev/null +++ b/docs/generated/packages/angular/generators/component.json @@ -0,0 +1,123 @@ +{ + "name": "component", + "factory": "./src/generators/component/component", + "schema": { + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "SchematicsAngularComponent", + "title": "Angular Component Schema", + "cli": "nx", + "type": "object", + "description": "Creates a new, generic Angular component definition in the given or default project.", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "format": "path", + "description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.", + "visible": false + }, + "project": { + "type": "string", + "description": "The name of the project.", + "x-dropdown": "projects" + }, + "name": { + "type": "string", + "description": "The name of the component.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the component?" + }, + "displayBlock": { + "description": "Specifies if the style will contain `:host { display: block; }`.", + "type": "boolean", + "default": false, + "alias": "b" + }, + "inlineStyle": { + "description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.", + "type": "boolean", + "default": false, + "alias": "s" + }, + "inlineTemplate": { + "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.", + "type": "boolean", + "default": false, + "alias": "t" + }, + "standalone": { + "description": "Whether the generated component is standalone.", + "type": "boolean", + "default": false + }, + "viewEncapsulation": { + "description": "The view encapsulation strategy to use in the new component.", + "enum": ["Emulated", "None", "ShadowDom"], + "type": "string", + "alias": "v" + }, + "changeDetection": { + "description": "The change detection strategy to use in the new component.", + "enum": ["Default", "OnPush"], + "type": "string", + "default": "Default", + "alias": "c" + }, + "module": { + "type": "string", + "description": "The filename or path to the NgModule that will declare this component.", + "alias": "m" + }, + "style": { + "description": "The file extension or preprocessor to use for style files, or `none` to skip generating the style file.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less", "none"] + }, + "skipTests": { + "type": "boolean", + "description": "Do not create `spec.ts` test files for the new component.", + "default": false + }, + "flat": { + "type": "boolean", + "description": "Create the new files at the top level of the current project.", + "default": false + }, + "skipImport": { + "type": "boolean", + "description": "Do not import this component into the owning NgModule.", + "default": false + }, + "selector": { + "type": "string", + "format": "html-selector", + "description": "The HTML selector to use for this component." + }, + "skipSelector": { + "type": "boolean", + "default": false, + "description": "Specifies if the component should have a selector or not." + }, + "type": { + "type": "string", + "description": "Adds a developer-defined type to the filename, in the format `name.type.ts`.", + "default": "component" + }, + "export": { + "type": "boolean", + "description": "Specifies if the component should be exported in the declaring `NgModule`. Additionally, if the project is a library, the component will be exported from the project's entry point (normally `index.ts`) if the module it belongs to is also exported or if the component is standalone.", + "default": false + } + }, + "required": ["name"], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nCreate a component named `my-component`:\n\n```bash\nnx g @nrwl/angular:component my-component\n```\n\n{% /tab %}\n\n{% tab label=\"Standalone Component\" %}\n\nCreate a standalone component named `my-component`:\n\n```bash\nnx g @nrwl/angular:component my-component --standalone\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nrwl/angular:component my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nrwl/angular:component my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n", + "presets": [] + }, + "aliases": ["c"], + "description": "Generate an Angular Component.", + "implementation": "/packages/angular/src/generators/component/component.ts", + "hidden": false, + "path": "/packages/angular/src/generators/component/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/convert-to-with-mf.json b/docs/generated/packages/angular/generators/convert-to-with-mf.json new file mode 100644 index 0000000000000..d1aab12317da5 --- /dev/null +++ b/docs/generated/packages/angular/generators/convert-to-with-mf.json @@ -0,0 +1,34 @@ +{ + "name": "convert-to-with-mf", + "factory": "./src/generators/convert-to-with-mf/convert-to-with-mf", + "schema": { + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "ConvertToWithMFGenerator", + "cli": "nx", + "title": "Convert to withModuleFederation Generator Options Schema", + "type": "object", + "description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n{% callout type=\"warning\" title=\"Overrides\" %}This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!{% /callout %}.", + "additionalProperties": false, + "examples": [ + { + "command": "nx g @nrwl/angular:convert-to-with-mf --project mf-app", + "description": "Convert a Module Federation Project using legacy webpack config to use the `withModuleFederation` helper." + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the micro frontend project to migrate.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What micro frontend project would you like to migrate?" + } + }, + "presets": [] + }, + "description": "Converts an old micro frontend configuration to use the new withModuleFederation helper. It will run successfully if the following conditions are met: \n - Is either a host or remote application \n - Shared npm package configurations have not been modified \n - Name used to identify the Micro Frontend application matches the project name \n\n{% callout type=\"warning\" title=\"Overrides\" %}This generator will overwrite your webpack config. If you have additional custom configuration in your config file, it will be lost!{% /callout %}", + "implementation": "/packages/angular/src/generators/convert-to-with-mf/convert-to-with-mf.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/convert-to-with-mf/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/convert-tslint-to-eslint.json b/docs/generated/packages/angular/generators/convert-tslint-to-eslint.json new file mode 100644 index 0000000000000..d30c53b5ef6f3 --- /dev/null +++ b/docs/generated/packages/angular/generators/convert-tslint-to-eslint.json @@ -0,0 +1,60 @@ +{ + "name": "convert-tslint-to-eslint", + "factory": "./src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularConvertTSLintToESLintGenerator", + "cli": "nx", + "title": "Convert an Angular project from TSLint to ESLint", + "description": "Convert an Angular project from TSLint to ESLint. NOTE: Does not work in `--dry-run mode`.", + "examples": [ + { + "command": "nx g convert-tslint-to-eslint myapp", + "description": "The following will first configure the project, `myapp`, the same way a _new_ project is configured i.e. It will use Nx's new recommended ESLint config. By default, this also adds the existing TSLint configuration on top of the default ESLint config from Nx to continue checking what it checks today. This is done by migrating TSLint rules to their equivalent ESLint rules to the best of its abilities. Some TSLint rules may not have ESLint equivalents and will be reported during the conversion" + }, + { + "command": "nx g convert-tslint-to-eslint myapp --ignoreExistingTslintConfig=true", + "description": "If your TSLint config isn't extremely important to you, ignoring it makes this process more deterministic. Unlike the prior example, this will discard the existing TSLint configuration, meaning that the project will only have the Nx's latest recommended ESLint configuration which may be good enough for some workspaces" + }, + { + "command": "nx g convert-tslint-to-eslint myapp --removeTSLintIfNoMoreTSLintTargets=false", + "description": "By default, this process removes the TSLint related dependencies and configuration once no more projects use TSLint. This can be disabled with the following flag to keep TSLint related dependencies and configuration in the repo" + } + ], + "type": "object", + "properties": { + "project": { + "description": "The name of the Angular project to convert. Please note, if the project is an Angular app with an associated Cypress e2e project, it will also attempt to convert that.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "Which Angular project would you like to convert from TSLint to ESLint?" + }, + "ignoreExistingTslintConfig": { + "type": "boolean", + "description": "If true, it will not use existing TSLint config as a reference, it will just reset the project with the latest recommended ESLint config.", + "default": false, + "x-prompt": "Would you like to ignore the existing TSLint config? Recommended if the TSLint config has not been altered much as it makes the new ESLint config cleaner." + }, + "removeTSLintIfNoMoreTSLintTargets": { + "type": "boolean", + "description": "If this conversion leaves no more TSLint usage in the workspace, it will remove TSLint and related dependencies and configuration.", + "default": true, + "x-prompt": "Would you like to remove TSLint and its related config if there are no TSLint projects remaining after this conversion?" + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files.", + "default": false + } + }, + "additionalProperties": false, + "required": ["project"], + "presets": [] + }, + "description": "Converts a project from TSLint to ESLint.", + "implementation": "/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/convert-tslint-to-eslint/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/cypress-component-configuration.json b/docs/generated/packages/angular/generators/cypress-component-configuration.json new file mode 100644 index 0000000000000..e75ebe326b06c --- /dev/null +++ b/docs/generated/packages/angular/generators/cypress-component-configuration.json @@ -0,0 +1,45 @@ +{ + "name": "cypress-component-configuration", + "factory": "./src/generators/cypress-component-configuration/cypress-component-configuration", + "schema": { + "$schema": "https://json-schema.org/schema", + "$id": "NxAngularCypressComponentConfigurationGenerator", + "type": "object", + "cli": "nx", + "title": "Add Cypress component testing", + "description": "Add a Cypress component testing configuration to an existing project. Cypress v10.7.0 or higher is required.", + "properties": { + "project": { + "type": "string", + "description": "The name of the project to add cypress component testing configuration to", + "x-dropdown": "projects", + "x-prompt": "What project should we add Cypress component testing to?" + }, + "generateTests": { + "type": "boolean", + "description": "Generate default component tests for existing components in the project", + "x-prompt": "Automatically generate tests for components declared in this project?", + "default": false + }, + "buildTarget": { + "type": "string", + "description": "A build target used to configure Cypress component testing in the format of `project:target[:configuration]`. The build target should be an angular app. If not provided we will try to infer it from your projects usage.", + "pattern": "^[^:\\s]+:[^:\\s]+(:\\S+)?$" + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files", + "default": false + } + }, + "required": ["project"], + "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nAngular component testing with Nx requires **Cypress version 10.7.0** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you want to test components via Storybook with Cypress, then check out the [storybook-configuration generator docs](/packages/angular/generators/storybook-configuration)\n{% /callout %}\n\nThis generator is designed to get your Angular project up and running with Cypress Component Testing.\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project\n```\n\nRunning this generator, adds the required files to the specified project with a preconfigured `cypress.config.ts` designed for Nx workspaces.\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';\n\nexport default defineConfig({\n component: nxComponentTestingPreset(__filename),\n});\n```\n\nHere is an example on how to add custom options to the configuration\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';\n\nexport default defineConfig({\n component: {\n ...nxComponentTestingPreset(__filename),\n // extra options here\n },\n});\n```\n\n## Specifying a Build Target\n\nComponent testing requires a _build target_ to correctly run the component test dev server. This option can be manually specified with `--build-target=some-angular-app:build`, but Nx will infer this usage from the [project graph](/concepts/mental-model#the-project-graph) if one isn't provided.\n\nFor Angular projects, the build target needs to be using the `@nrwl/angular:webpack-browser` or\n`@angular-devkit/build-angular:browser` executor.\nThe generator will throw an error if a build target can't be found and suggest passing one in manually.\n\nLetting Nx infer the build target by default\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project\n```\n\nManually specifying the build target\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project --build-target:some-angular-app:build --generate-tests\n```\n\n{% callout type=\"note\" title=\"Build Target with Configuration\" %}\nIf you're wanting to use a build target with a specific configuration. i.e. `my-app:build:production`,\nthen manually providing `--build-target=my-app:build:production` is the best way to do that.\n{% /callout %}\n\n## Auto Generating Tests\n\nYou can optionally use the `--generate-tests` flag to generate a test file for each component in your project.\n\n```shell\nnx g @nrwl/angular:cypress-component-configuration --project=my-cool-angular-project --generate-tests\n```\n\n## Running Component Tests\n\nA new `component-test` target will be added to the specified project to run your component tests.\n\n```shell\nnx g component-test my-cool-angular-project\n```\n\nHere is an example of the project configuration that is generated. The `--build-target` option is added as the `devServerTarget` which can be changed as needed.\n\n```json {% fileName=\"project.json\" %}\n{\n \"targets\" {\n \"component-test\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"/cypress.config.ts\",\n \"testingType\": \"component\",\n \"devServerTarget\": \"some-angular-app:build\",\n \"skipServe\": true\n }\n }\n }\n}\n```\n\nNx also supports [React component testing](/packages/angular/generators/cypress-component-configuration).\n", + "presets": [] + }, + "description": "Setup Cypress component testing for a project.", + "implementation": "/packages/angular/src/generators/cypress-component-configuration/cypress-component-configuration.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/cypress-component-configuration/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/downgrade-module.json b/docs/generated/packages/angular/generators/downgrade-module.json new file mode 100644 index 0000000000000..17132c7b91882 --- /dev/null +++ b/docs/generated/packages/angular/generators/downgrade-module.json @@ -0,0 +1,47 @@ +{ + "name": "downgrade-module", + "factory": "./src/generators/downgrade-module/downgrade-module", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxDowngradeModuleGenerator", + "title": "Generates downgradeModule setup.", + "description": "Sets up a Downgrade Module for using AngularJS and Angular.", + "cli": "nx", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project." + }, + "name": { + "type": "string", + "description": "The name of the main AngularJS module.", + "$default": { "$source": "argv", "index": 0 } + }, + "angularJsImport": { + "type": "string", + "description": "Import expression of the AngularJS application (e.g., `--angularJsImport=some_node_module/my_app`)." + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files.", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "description": "Do not add `@angular/upgrade` to `package.json` (e.g., `--skipPackageJson`).", + "default": false + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "examplesFile": "## Examples\n\nBelow are some examples of how to generate configuration and setup for using `ngUpgrade`'s `DowngradeModule` for your application.\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\n```bash\nnx g @nrwl/angular:downgrade-module --name=myAngularJsModule --project=myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Setup Router\" %}\n\nAllow a setup that configures routing for `DowngradeModule`.\n\n```bash\nnx g @nrwl/angular:downgrade-module --name=myAngularJsModule --project=myapp --router=true\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Sets up a Downgrade Module.", + "implementation": "/packages/angular/src/generators/downgrade-module/downgrade-module.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/downgrade-module/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/host.json b/docs/generated/packages/angular/generators/host.json new file mode 100644 index 0000000000000..7d886213c96ab --- /dev/null +++ b/docs/generated/packages/angular/generators/host.json @@ -0,0 +1,172 @@ +{ + "name": "host", + "factory": "./src/generators/host/host", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxMFHost", + "cli": "nx", + "title": "Nx Module Federation Host Application", + "description": "Create an Angular Host Module Federation Application.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:host appName --remotes=remote1", + "description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the remote application to this application's configuration" + } + ], + "properties": { + "name": { + "type": "string", + "description": "The name to give to the host Angular application.", + "$default": { "$source": "argv", "index": 0 } + }, + "remotes": { + "type": "array", + "description": "The names of the remote applications to add to the host." + }, + "dynamic": { + "type": "boolean", + "description": "Should the host application use dynamic federation?", + "default": false + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less"], + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "sass", + "label": "SASS(.sass) [ http://sass-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + } + ] + } + }, + "inlineStyle": { + "description": "Specifies if the style will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "s" + }, + "inlineTemplate": { + "description": "Specifies if the template will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "t" + }, + "viewEncapsulation": { + "description": "Specifies the view encapsulation strategy.", + "enum": ["Emulated", "None", "ShadowDom"], + "type": "string" + }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors.", + "alias": "p" + }, + "skipTests": { + "description": "Skip creating spec files.", + "type": "boolean", + "default": false, + "alias": "S" + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "skipPostInstall": { + "type": "boolean", + "default": false, + "description": "Do not add or append `ngcc` to the `postinstall` script in `package.json`." + }, + "unitTestRunner": { + "type": "string", + "enum": ["karma", "jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["protractor", "cypress", "none"], + "description": "Test runner to use for end to end (E2E) tests.", + "default": "cypress" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting)." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "backendProject": { + "type": "string", + "description": "Backend project that provides data to this application. This sets up `proxy.config.json`." + }, + "strict": { + "type": "boolean", + "description": "Create an application with stricter type checking and build optimization options.", + "default": true + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "addTailwind": { + "type": "boolean", + "description": "Whether to configure Tailwind CSS for the application.", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "standalone": { + "type": "boolean", + "description": "Whether to generate a host application that uses standalone components.", + "default": false + }, + "ssr": { + "description": "Whether to configure SSR for the host application", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": ["name"], + "presets": [] + }, + "x-type": "application", + "description": "Generate a Host Angular Module Federation Application.", + "implementation": "/packages/angular/src/generators/host/host.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/host/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/init.json b/docs/generated/packages/angular/generators/init.json new file mode 100644 index 0000000000000..7e839c77ff4c5 --- /dev/null +++ b/docs/generated/packages/angular/generators/init.json @@ -0,0 +1,86 @@ +{ + "name": "init", + "factory": "./src/generators/init/init", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "SchematicsAngularModuleInit", + "cli": "nx", + "title": "Init Angular Plugin", + "description": "Initializes the `@nrwl/angular` plugin. NOTE: Does not work in the `--dry-run` mode.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:init --style=scss", + "description": "Installs angular dependencies and initializes the `@nrwl/angular` plugin with the `scss` stylesheet format." + } + ], + "properties": { + "unitTestRunner": { + "type": "string", + "enum": ["karma", "jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["protractor", "cypress", "none"], + "description": "Test runner to use for end to end (e2e) tests.", + "default": "cypress" + }, + "skipInstall": { + "type": "boolean", + "description": "Skip installing after adding `@nrwl/workspace`.", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less"], + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "sass", + "label": "SASS(.sass) [ http://sass-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + } + ] + } + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + } + }, + "additionalProperties": false, + "presets": [] + }, + "description": "Initializes the `@nrwl/angular` plugin.", + "hidden": true, + "implementation": "/packages/angular/src/generators/init/init.ts", + "aliases": [], + "path": "/packages/angular/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/karma-project.json b/docs/generated/packages/angular/generators/karma-project.json new file mode 100644 index 0000000000000..23915155ba199 --- /dev/null +++ b/docs/generated/packages/angular/generators/karma-project.json @@ -0,0 +1,39 @@ +{ + "name": "karma-project", + "factory": "./src/generators/karma-project/karma-project", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxKarmaProjectGenerator", + "title": "Create Karma Configuration for a project", + "description": "Add Karma configuration to an angular project.", + "cli": "nx", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "x-dropdown": "projects" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "description": "Skip updating package.json.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": ["project"], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\nTo add karma to project, run the following command.\n\n```bash\nnx g @nrwl/angular:karma-project --project=myapp\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Adds Karma configuration to a project.", + "implementation": "/packages/angular/src/generators/karma-project/karma-project.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/karma-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/karma.json b/docs/generated/packages/angular/generators/karma.json new file mode 100644 index 0000000000000..b86082a91e03f --- /dev/null +++ b/docs/generated/packages/angular/generators/karma.json @@ -0,0 +1,34 @@ +{ + "name": "karma", + "factory": "./src/generators/karma/karma", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularKarmaGenerator", + "title": "Add Karma Configuration to the workspace.", + "description": "Add Karma configuration to an Nx workspace.", + "cli": "nx", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:karma", + "description": "Add a base karma configuration to the workspace." + } + ], + "properties": { + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + } + }, + "additionalProperties": false, + "required": [], + "presets": [] + }, + "description": "Adds Karma configuration to a workspace.", + "implementation": "/packages/angular/src/generators/karma/karma.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/karma/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/library-secondary-entry-point.json b/docs/generated/packages/angular/generators/library-secondary-entry-point.json new file mode 100644 index 0000000000000..297a729628e97 --- /dev/null +++ b/docs/generated/packages/angular/generators/library-secondary-entry-point.json @@ -0,0 +1,43 @@ +{ + "name": "library-secondary-entry-point", + "factory": "./src/generators/library-secondary-entry-point/library-secondary-entry-point", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularLibrarySecondaryEntryPoint", + "title": "Creates a secondary entry point for a library", + "description": "Creates a secondary entry point for an Angular publishable library.", + "type": "object", + "cli": "nx", + "properties": { + "name": { + "type": "string", + "description": "The name of the secondary entry point.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the secondary entry point?", + "pattern": "^[a-zA-Z].*$" + }, + "library": { + "type": "string", + "description": "The name of the library to create the secondary entry point for.", + "x-prompt": "What library would you like to create the secondary entry point for?", + "pattern": "^[a-zA-Z].*$", + "x-dropdown": "projects" + }, + "skipModule": { + "type": "boolean", + "description": "Skip generating a module for the secondary entry point.", + "default": false + } + }, + "additionalProperties": false, + "required": ["name", "library"], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\nCreate a secondary entrypoint named `button` in the `ui` library.\n\n```bash\nnx g @nrwl/angular:library-secondary-entry-point --library=ui --name=button\n```\n\n{% /tab %}\n\n{% tab label=\"Skip generating module\" %}\nCreate a secondary entrypoint named `button` in the `ui` library but skip creating an NgModule.\n\n```bash\nnx g @nrwl/angular:library-secondary-entry-point --library=ui --name=button --skipModule\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "aliases": ["secondary-entry-point", "entry-point"], + "description": "Creates a secondary entry point for an Angular publishable library.", + "implementation": "/packages/angular/src/generators/library-secondary-entry-point/library-secondary-entry-point.ts", + "hidden": false, + "path": "/packages/angular/src/generators/library-secondary-entry-point/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/library.json b/docs/generated/packages/angular/generators/library.json new file mode 100644 index 0000000000000..4f15844124e17 --- /dev/null +++ b/docs/generated/packages/angular/generators/library.json @@ -0,0 +1,208 @@ +{ + "name": "library", + "factory": "./src/generators/library/library", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorAngularLibrary", + "title": "Create a library", + "description": "Creates an Angular library.", + "type": "object", + "cli": "nx", + "properties": { + "name": { + "type": "string", + "description": "The name of the library.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "type": "string", + "description": "A directory where the library is placed." + }, + "publishable": { + "type": "boolean", + "default": false, + "description": "Generate a publishable library." + }, + "buildable": { + "type": "boolean", + "default": false, + "description": "Generate a buildable library." + }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors.", + "alias": "p" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "simpleModuleName": { + "description": "Keep the module name simple (when using `--directory`).", + "type": "boolean", + "default": false, + "x-deprecated": "Use `simpleName` instead. It will be removed in v16." + }, + "simpleName": { + "description": "Don't include the directory in the name of the module or standalone component entry of the library.", + "type": "boolean", + "default": false + }, + "addModuleSpec": { + "description": "Add a module spec file.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update `tsconfig.json` for development experience." + }, + "routing": { + "type": "boolean", + "default": false, + "description": "Add router configuration. See `lazy` for more information." + }, + "lazy": { + "type": "boolean", + "default": false, + "description": "Add `RouterModule.forChild` when set to true, and a simple array of routes when set to false." + }, + "parent": { + "type": "string", + "description": "Path to the parent route configuration using `loadChildren` or `children`, depending on what `lazy` is set to." + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting)." + }, + "unitTestRunner": { + "type": "string", + "enum": ["karma", "jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like `@myorg/my-awesome-lib`. Must be a valid npm name." + }, + "strict": { + "type": "boolean", + "description": "Create a library with stricter type checking and build optimization options.", + "default": true + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "compilationMode": { + "description": "Specifies the compilation mode to use. If not specified, it will default to `partial` for publishable libraries and to `full` for buildable libraries. The `full` value can not be used for publishable libraries.", + "type": "string", + "enum": ["full", "partial"] + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "addTailwind": { + "type": "boolean", + "description": "Whether to configure Tailwind CSS for the application. It can only be used with buildable and publishable libraries. Non-buildable libraries will use the application's Tailwind configuration.", + "default": false + }, + "skipModule": { + "type": "boolean", + "description": "Whether to skip the creation of a default module when generating the library.", + "default": false + }, + "standalone": { + "type": "boolean", + "description": "Generate a library that uses a standalone component instead of a module as the entry point.", + "default": false + }, + "displayBlock": { + "description": "Specifies if the component generated style will contain `:host { display: block; }`. Disclaimer: This option is only valid when `--standalone` is set to `true`.", + "type": "boolean", + "default": false, + "alias": "b" + }, + "inlineStyle": { + "description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file. Disclaimer: This option is only valid when `--standalone` is set to `true`.", + "type": "boolean", + "default": false, + "alias": "s" + }, + "inlineTemplate": { + "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file. Disclaimer: This option is only valid when `--standalone` is set to `true`.", + "type": "boolean", + "default": false, + "alias": "t" + }, + "viewEncapsulation": { + "description": "The view encapsulation strategy to use in the new component. Disclaimer: This option is only valid when `--standalone` is set to `true`.", + "enum": ["Emulated", "None", "ShadowDom"], + "type": "string", + "alias": "v" + }, + "changeDetection": { + "description": "The change detection strategy to use in the new component. Disclaimer: This option is only valid when `--standalone` is set to `true`.", + "enum": ["Default", "OnPush"], + "type": "string", + "default": "Default", + "alias": "c" + }, + "style": { + "description": "The file extension or preprocessor to use for style files, or `none` to skip generating the style file. Disclaimer: This option is only valid when `--standalone` is set to `true`.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less", "none"] + }, + "skipTests": { + "type": "boolean", + "description": "Do not create `spec.ts` test files for the new component. Disclaimer: This option is only valid when `--standalone` is set to `true`.", + "default": false + }, + "selector": { + "type": "string", + "format": "html-selector", + "description": "The HTML selector to use for this component. Disclaimer: This option is only valid when `--standalone` is set to `true`." + }, + "skipSelector": { + "type": "boolean", + "default": false, + "description": "Specifies if the component should have a selector or not. Disclaimer: This option is only valid when `--standalone` is set to `true`." + }, + "flat": { + "type": "boolean", + "default": false, + "description": "Ensure the generated standalone component is not placed in a subdirectory. Disclaimer: This option is only valid when `--standalone` is set to `true`." + } + }, + "additionalProperties": false, + "required": ["name"], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Library\" %}\n\nCreates the `my-ui-lib` library with an `ui` tag:\n\n```bash\nnx g @nrwl/angular:library my-ui-lib --tags=ui\n```\n\n{% /tab %}\n\n{% tab label=\"Nested Folder & Import\"%}\nCreates the `my-lib` library in the `nested` directory and sets the import path to `@myorg/nested/my-lib`:\n\n```bash\nnx g @nrwl/angular:library --directory=nested --importPath=@myorg/nested/my-lib my-lib\n```\n\n{% /tab %}\n\n{% tab label=\"Standalone component\"%}\nCreates the `my-standalone-lib` library with a standalone component as an entry point instead of an ng-module. The component can be used via the `myorg-standalone-component` selector.\n\n```bash\nnx g @nrwl/angular:library --standalone --selector=myorg-standalone-component my-standalone-lib\n```\n\n{% /tab %}\n", + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Creates an Angular library.", + "implementation": "/packages/angular/src/generators/library/library.ts", + "hidden": false, + "path": "/packages/angular/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/move.json b/docs/generated/packages/angular/generators/move.json new file mode 100644 index 0000000000000..fb648023d445f --- /dev/null +++ b/docs/generated/packages/angular/generators/move.json @@ -0,0 +1,54 @@ +{ + "name": "move", + "factory": "./src/generators/move/move#angularMoveGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularMove", + "cli": "nx", + "title": "Nx Angular Move", + "description": "Move an Angular project to another folder in the workspace.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:move --project my-feature-lib --destination shared/my-feature-lib", + "description": "Move libs/my-feature-lib to libs/shared/my-feature-lib." + } + ], + "properties": { + "projectName": { + "type": "string", + "alias": "project", + "description": "The name of the Angular project to move.", + "x-dropdown": "projects" + }, + "destination": { + "type": "string", + "description": "The folder to move the Angular project into.", + "$default": { "$source": "argv", "index": 0 } + }, + "importPath": { + "type": "string", + "description": "The new import path to use in the `tsconfig.base.json`." + }, + "updateImportPath": { + "type": "boolean", + "description": "Update the import path to reflect the new location.", + "default": true + }, + "skipFormat": { + "type": "boolean", + "aliases": ["skip-format"], + "description": "Skip formatting files.", + "default": false + } + }, + "required": ["projectName", "destination"], + "presets": [] + }, + "aliases": ["mv"], + "description": "Moves an Angular application or library to another folder within the workspace and updates the project configuration.", + "implementation": "/packages/angular/src/generators/move/move#angularMoveGenerator.ts", + "hidden": false, + "path": "/packages/angular/src/generators/move/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/ng-add.json b/docs/generated/packages/angular/generators/ng-add.json new file mode 100644 index 0000000000000..9e574a36cd64c --- /dev/null +++ b/docs/generated/packages/angular/generators/ng-add.json @@ -0,0 +1,80 @@ +{ + "name": "ng-add", + "factory": "./src/generators/ng-add/ng-add", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularNgAddGenerator", + "title": "Angular plugin initialization", + "cli": "nx", + "description": "Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace. NOTE: Does not work in the `--dry-run` mode.", + "type": "object", + "properties": { + "npmScope": { + "type": "string", + "description": "Npm scope for importing libs. NOTE: only used if running the generator in an Angular CLI workspace." + }, + "defaultBase": { + "type": "string", + "description": "Default base branch for affected. NOTE: only used if running the generator in an Angular CLI workspace." + }, + "skipInstall": { + "type": "boolean", + "description": "Skip installing added packages.", + "default": false + }, + "preserveAngularCliLayout": { + "type": "boolean", + "description": "Preserve the Angular CLI layout instead of moving the app into apps. NOTE: only used if running the generator in an Angular CLI workspace.", + "default": false + }, + "unitTestRunner": { + "type": "string", + "enum": ["karma", "jest", "none"], + "description": "Test runner to use for unit tests. NOTE: only used if running the generator in an Nx workspace.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["protractor", "cypress", "none"], + "description": "Test runner to use for end to end (e2e) tests. NOTE: only used if running the generator in an Nx workspace.", + "default": "cypress" + }, + "skipFormat": { + "description": "Skip formatting files. NOTE: only used if running the generator in an Nx workspace.", + "type": "boolean", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks. NOTE: only used if running the generator in an Nx workspace.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "style": { + "description": "The file extension to be used for style files. NOTE: only used if running the generator in an Nx workspace.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less"] + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`. NOTE: only used if running the generator in an Nx workspace." + }, + "skipPostInstall": { + "type": "boolean", + "default": false, + "description": "Do not add or append `ngcc` to the `postinstall` script in `package.json`. NOTE: only used if running the generator in an Nx workspace." + } + }, + "additionalProperties": false, + "examplesFile": "## Information\n\nThis generator is usually used as part of the process of migrating from an Angular CLI Workspace to Nx Workspaces using `ng add @nrwl/angular`.\n\nYou can read more about [migrating from Angular CLI to Nx here](https://nx.dev/recipes/adopting-nx/migration-angular).\n", + "presets": [] + }, + "description": "Migrates an Angular CLI workspace to Nx or adds the Angular plugin to an Nx workspace.", + "hidden": true, + "implementation": "/packages/angular/src/generators/ng-add/ng-add.ts", + "aliases": [], + "path": "/packages/angular/src/generators/ng-add/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/ngrx.json b/docs/generated/packages/angular/generators/ngrx.json new file mode 100644 index 0000000000000..3c7d7d713ce22 --- /dev/null +++ b/docs/generated/packages/angular/generators/ngrx.json @@ -0,0 +1,86 @@ +{ + "name": "ngrx", + "factory": "./src/generators/ngrx/ngrx", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNgrxGenerator", + "title": "Add NgRx support to an application or library.", + "description": "Adds NgRx support to an application or library.", + "cli": "nx", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:ngrx --root --module=apps/my-app/src/app/app.module.ts --facade=false placeholder", + "description": "Add root ngrx configration to the `my-app` application" + }, + { + "command": "nx g @nrwl/angular:ngrx --module=libs/my-lib/src/lib/my-lib.module.ts --facade=true --root=false users", + "description": "Add a `users` state with a facade to the `my-lib` library. It will be tracked under the default `+state` folder in the lib" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the NgRx feature state, such as `products` or `users`. Recommended to use the plural form of the name.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the NgRx feature state? An example would be `users`." + }, + "module": { + "type": "string", + "description": "The path to the `NgModule` where the feature state will be registered. The host directory will create/use the new state directory.", + "x-prompt": "What is the path to the module where this NgRx state should be registered?" + }, + "directory": { + "type": "string", + "default": "+state", + "description": "The name of the folder used to contain/group the generated NgRx files." + }, + "root": { + "type": "boolean", + "default": false, + "description": "Setup root or feature state management with NgRx.", + "x-prompt": "Is this the root state of the application?" + }, + "facade": { + "type": "boolean", + "default": false, + "description": "Create a Facade class for the the feature.", + "x-prompt": "Would you like to use a Facade with your NgRx state?" + }, + "skipImport": { + "type": "boolean", + "default": false, + "description": "Generate NgRx feature files without registering the feature in the NgModule." + }, + "minimal": { + "type": "boolean", + "default": true, + "description": "Only register the root state management setup or feature state." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not update the `package.json` with NgRx dependencies." + }, + "barrels": { + "type": "boolean", + "default": false, + "description": "Use barrels to re-export actions, state and selectors." + } + }, + "additionalProperties": false, + "required": ["module", "name"], + "presets": [] + }, + "description": "Adds NgRx support to an application or library.", + "implementation": "/packages/angular/src/generators/ngrx/ngrx.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/ngrx/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/remote.json b/docs/generated/packages/angular/generators/remote.json new file mode 100644 index 0000000000000..6c380d60ab508 --- /dev/null +++ b/docs/generated/packages/angular/generators/remote.json @@ -0,0 +1,167 @@ +{ + "name": "remote", + "factory": "./src/generators/remote/remote", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxMFRemote", + "cli": "nx", + "title": "Nx Module Federation Remote App", + "description": "Create an Angular Remote Module Federation Application.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:remote appName --host=host --port=4201", + "description": "Create an Angular app with configuration in place for Module Federation. If host is provided, attach this remote app to host app's configuration." + } + ], + "properties": { + "name": { + "type": "string", + "description": "The name to give to the remote Angular app.", + "$default": { "$source": "argv", "index": 0 } + }, + "host": { + "type": "string", + "description": "The name of the host app to attach this remote app to.", + "x-dropdown": "projects" + }, + "port": { + "type": "number", + "description": "The port on which this app should be served." + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less"], + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "sass", + "label": "SASS(.sass) [ http://sass-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + } + ] + } + }, + "inlineStyle": { + "description": "Specifies if the style will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "s" + }, + "inlineTemplate": { + "description": "Specifies if the template will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "t" + }, + "viewEncapsulation": { + "description": "Specifies the view encapsulation strategy.", + "enum": ["Emulated", "None", "ShadowDom"], + "type": "string" + }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors.", + "alias": "p" + }, + "skipTests": { + "description": "Skip creating spec files.", + "type": "boolean", + "default": false, + "alias": "S" + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "unitTestRunner": { + "type": "string", + "enum": ["karma", "jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["protractor", "cypress", "none"], + "description": "Test runner to use for end to end (E2E) tests.", + "default": "cypress" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting)." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "backendProject": { + "type": "string", + "description": "Backend project that provides data to this application. This sets up `proxy.config.json`." + }, + "strict": { + "type": "boolean", + "description": "Create an application with stricter type checking and build optimization options.", + "default": true + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "addTailwind": { + "type": "boolean", + "description": "Whether to configure Tailwind CSS for the application.", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "standalone": { + "description": "Whether to generate a remote application with standalone components.", + "type": "boolean", + "default": false + }, + "ssr": { + "description": "Whether to configure SSR for the remote application to be consumed by a host application using SSR.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": ["name"], + "presets": [] + }, + "x-type": "application", + "description": "Generate a Remote Angular Module Federation Application.", + "implementation": "/packages/angular/src/generators/remote/remote.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/remote/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/scam-directive.json b/docs/generated/packages/angular/generators/scam-directive.json new file mode 100644 index 0000000000000..0c22252b80e00 --- /dev/null +++ b/docs/generated/packages/angular/generators/scam-directive.json @@ -0,0 +1,80 @@ +{ + "name": "scam-directive", + "factory": "./src/generators/scam-directive/scam-directive", + "schema": { + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "SCAMDirectiveGenerator", + "cli": "nx", + "title": "SCAM Directive Generator Options Schema", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:scam-directive --project=my-lib --flat=false my-sample", + "description": "Generate a `MySampleDirective` directive in a `my-sample` folder in the `my-lib` library" + } + ], + "description": "Creates a new, generic Angular directive definition in the given or default project.", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "format": "path", + "description": "The path at which to create the directive file, relative to the current workspace. Default is a folder with the same name as the directive in the project root.", + "visible": false + }, + "project": { + "type": "string", + "description": "The name of the project.", + "x-dropdown": "projects" + }, + "name": { + "type": "string", + "description": "The name of the directive.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the directive?" + }, + "skipTests": { + "type": "boolean", + "description": "Do not create `spec.ts` test files for the new directive.", + "default": false + }, + "inlineScam": { + "type": "boolean", + "description": "Create the `NgModule` in the same file as the Directive.", + "default": true + }, + "flat": { + "type": "boolean", + "description": "Create the new files at the top level of the current project.", + "default": true + }, + "selector": { + "type": "string", + "format": "html-selector", + "description": "The `HTML` selector to use for this directive." + }, + "prefix": { + "type": "string", + "description": "The prefix to apply to the generated directive selector.", + "alias": "p", + "oneOf": [ + { "maxLength": 0 }, + { "minLength": 1, "format": "html-selector" } + ] + }, + "export": { + "type": "boolean", + "description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.", + "default": true + } + }, + "required": ["name"], + "presets": [] + }, + "description": "Generate a directive with an accompanying Single Component Angular Module (SCAM).", + "implementation": "/packages/angular/src/generators/scam-directive/scam-directive.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/scam-directive/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/scam-pipe.json b/docs/generated/packages/angular/generators/scam-pipe.json new file mode 100644 index 0000000000000..e1bf33e8c5d7b --- /dev/null +++ b/docs/generated/packages/angular/generators/scam-pipe.json @@ -0,0 +1,66 @@ +{ + "name": "scam-pipe", + "factory": "./src/generators/scam-pipe/scam-pipe", + "schema": { + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "SCAMPipeGenerator", + "cli": "nx", + "title": "SCAM Pipe Generator Options Schema", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:scam-pipe --project=my-lib --flat=false my-transformation", + "description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project" + } + ], + "description": "Creates a new, generic Angular pipe definition in the given or default project.", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "format": "path", + "description": "The path at which to create the pipe file, relative to the current workspace. Default is a folder with the same name as the pipe in the project root.", + "visible": false + }, + "project": { + "type": "string", + "description": "The name of the project.", + "x-dropdown": "projects" + }, + "name": { + "type": "string", + "description": "The name of the pipe.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the pipe?" + }, + "skipTests": { + "type": "boolean", + "description": "Do not create `spec.ts` test files for the new pipe.", + "default": false + }, + "inlineScam": { + "type": "boolean", + "description": "Create the NgModule in the same file as the Pipe.", + "default": true + }, + "flat": { + "type": "boolean", + "description": "Create the new files at the top level of the current project.", + "default": true + }, + "export": { + "type": "boolean", + "description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.", + "default": true + } + }, + "required": ["name"], + "presets": [] + }, + "description": "Generate a pipe with an accompanying Single Component Angular Module (SCAM).", + "implementation": "/packages/angular/src/generators/scam-pipe/scam-pipe.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/scam-pipe/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/scam-to-standalone.json b/docs/generated/packages/angular/generators/scam-to-standalone.json new file mode 100644 index 0000000000000..29d8c5e80bf39 --- /dev/null +++ b/docs/generated/packages/angular/generators/scam-to-standalone.json @@ -0,0 +1,37 @@ +{ + "name": "scam-to-standalone", + "factory": "./src/generators/scam-to-standalone/scam-to-standalone", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorAngularScamToStandalone", + "cli": "nx", + "title": "Convert an Inline SCAM to Standalone Component", + "description": "Convert an Inline SCAM to a Standalone Component.", + "type": "object", + "properties": { + "component": { + "type": "string", + "description": "The path to the SCAM component file, relative to the root of the project containing the SCAM.", + "$default": { "$source": "argv", "index": 0 } + }, + "project": { + "type": "string", + "description": "The project containing the SCAM.", + "x-prompt": "What project contains the SCAM?", + "x-dropdown": "projects" + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting the workspace after the generator completes." + } + }, + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\nThis generator allows you to convert an Inline SCAM to a Standalone Component. It's important that the SCAM you wish to convert has it's NgModule within the same file for the generator to be able to correctly convert the component to Standalone.\n\n```bash\n\nnx g @nrwl/angular:scam-to-standalone --component=libs/mylib/src/lib/myscam/myscam.component.ts --project=mylib\n\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Convert an existing Single Component Angular Module (SCAM) to a Standalone Component.", + "implementation": "/packages/angular/src/generators/scam-to-standalone/scam-to-standalone.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/scam-to-standalone/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/scam.json b/docs/generated/packages/angular/generators/scam.json new file mode 100644 index 0000000000000..461fcb79793f2 --- /dev/null +++ b/docs/generated/packages/angular/generators/scam.json @@ -0,0 +1,127 @@ +{ + "name": "scam", + "factory": "./src/generators/scam/scam", + "schema": { + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "SCAMGenerator", + "cli": "nx", + "title": "SCAM Generator Options Schema", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/angular:scam --project=my-lib my-sample", + "description": "Generate a `MySampleComponent` component in the `my-lib` library." + } + ], + "description": "Creates a new, generic Angular component definition in the given or default project.", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "format": "path", + "description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.", + "visible": false + }, + "project": { + "type": "string", + "description": "The name of the project.", + "x-dropdown": "projects" + }, + "name": { + "type": "string", + "description": "The name of the component.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the component?" + }, + "displayBlock": { + "description": "Specifies if the style will contain `:host { display: block; }`.", + "type": "boolean", + "default": false, + "alias": "b" + }, + "inlineStyle": { + "description": "Include styles inline in the `component.ts` file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the `component.ts` file.", + "type": "boolean", + "default": false, + "alias": "s" + }, + "inlineTemplate": { + "description": "Include template inline in the `component.ts` file. By default, an external template file is created and referenced in the `component.ts` file.", + "type": "boolean", + "default": false, + "alias": "t" + }, + "viewEncapsulation": { + "description": "The view encapsulation strategy to use in the new component.", + "enum": ["Emulated", "None", "ShadowDom"], + "type": "string", + "alias": "v" + }, + "changeDetection": { + "description": "The change detection strategy to use in the new component.", + "enum": ["Default", "OnPush"], + "type": "string", + "default": "Default", + "alias": "c" + }, + "style": { + "description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.", + "type": "string", + "default": "css", + "enum": ["css", "scss", "sass", "less", "none"] + }, + "skipTests": { + "type": "boolean", + "description": "Do not create `spec.ts` test files for the new component.", + "default": false + }, + "inlineScam": { + "type": "boolean", + "description": "Create the `NgModule` in the same file as the component.", + "default": true + }, + "flat": { + "type": "boolean", + "description": "Create the new files at the top level of the current project.", + "default": false + }, + "selector": { + "type": "string", + "format": "html-selector", + "description": "The `HTML` selector to use for this component." + }, + "skipSelector": { + "type": "boolean", + "default": false, + "description": "Specifies if the component should have a selector or not." + }, + "type": { + "type": "string", + "description": "Adds a developer-defined type to the filename, in the format `name.type.ts`.", + "default": "component" + }, + "prefix": { + "type": "string", + "description": "The prefix to apply to the generated component selector.", + "alias": "p", + "oneOf": [ + { "maxLength": 0 }, + { "minLength": 1, "format": "html-selector" } + ] + }, + "export": { + "type": "boolean", + "description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.", + "default": true + } + }, + "required": ["name"], + "presets": [] + }, + "description": "Generate a component with an accompanying Single Component Angular Module (SCAM).", + "implementation": "/packages/angular/src/generators/scam/scam.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/scam/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/setup-mf.json b/docs/generated/packages/angular/generators/setup-mf.json new file mode 100644 index 0000000000000..263b943f117d8 --- /dev/null +++ b/docs/generated/packages/angular/generators/setup-mf.json @@ -0,0 +1,86 @@ +{ + "name": "setup-mf", + "factory": "./src/generators/setup-mf/setup-mf", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorAngularMFSetup", + "cli": "nx", + "title": "Generate Module Federation Setup for Angular App", + "description": "Create Module Federation configuration files for given Angular Application.", + "type": "object", + "properties": { + "appName": { + "type": "string", + "description": "The name of the application to generate the Module Federation configuration for.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What app would you like to generate a Module Federation configuration for?", + "x-dropdown": "projects" + }, + "mfType": { + "type": "string", + "enum": ["host", "remote"], + "description": "Type of application to generate the Module Federation configuration for.", + "default": "remote" + }, + "federationType": { + "type": "string", + "enum": ["static", "dynamic"], + "description": "Use either Static or Dynamic Module Federation pattern for the application.", + "default": "static" + }, + "port": { + "type": "number", + "description": "The port at which the remote application should be served." + }, + "remotes": { + "type": "array", + "description": "A list of remote application names that the host application should consume." + }, + "host": { + "type": "string", + "description": "The name of the host application that the remote application will be consumed by." + }, + "routing": { + "type": "boolean", + "description": "Generate a routing setup to allow a host application to route to the remote application." + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting the workspace after the generator completes." + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "skipE2E": { + "type": "boolean", + "default": false, + "description": "Do not set up E2E related config." + }, + "e2eProjectName": { + "type": "string", + "description": "The project name of the associated E2E project for the application. This is only required for Cypress E2E projects that do not follow the naming convention `-e2e`." + }, + "prefix": { + "type": "string", + "description": "The prefix to use for any generated component." + }, + "standalone": { + "type": "boolean", + "description": "Whether the application is a standalone application.", + "default": false + } + }, + "required": ["appName", "mfType"], + "additionalProperties": false, + "examplesFile": "## Examples\n\nThe `setup-mf` generator is used to add Module Federation support to existing applications.\n\n{% tabs %}\n\n{% tab label=\"Convert to Host\" %}\nTo convert an existing application to a host application, run the following\n\n```bash\nnx g setup-mf myapp --mfType=host --routing=true\n```\n\n{% /tab %}\n\n{% tab label=\"Convert to Remote\" %}\nTo convert an existing application to a remote application, run the following\n\n```bash\nnx g setup-mf myapp --mfType=remote --routing=true\n```\n\n{% /tab %}\n\n{% tab label=\"Convert to Remote and attach to a host application\" %}\nTo convert an existing application to a remote application and attach it to an existing host application name `myhostapp`, run the following\n\n```bash\nnx g setup-mf myapp --mfType=remote --routing=true --host=myhostapp\n```\n\n{% /tab %}\n\n{% tab label=\"Convert to Host and attach to existing remote applications\" %}\nTo convert an existing application to a host application and attaching existing remote applications named `remote1` and `remote2`, run the following\n\n```bash\nnx g setup-mf myapp --mfType=host --routing=true --remotes=remote1,remote2\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Generate a Module Federation configuration for a given Angular application.", + "implementation": "/packages/angular/src/generators/setup-mf/setup-mf.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/setup-mf/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/setup-ssr.json b/docs/generated/packages/angular/generators/setup-ssr.json new file mode 100644 index 0000000000000..902c1be422fde --- /dev/null +++ b/docs/generated/packages/angular/generators/setup-ssr.json @@ -0,0 +1,67 @@ +{ + "name": "setup-ssr", + "factory": "./src/generators/setup-ssr/setup-ssr", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorAngularUniversalSetup", + "cli": "nx", + "title": "Generate Angular Universal (SSR) setup for an Angular App", + "description": "Create the additional configuration required to enable SSR via Angular Universal for an Angular application.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the application to generate the Angular Universal configuration for.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What app would you like to generate an Angular Universal configuration for?", + "x-dropdown": "projects" + }, + "appId": { + "type": "string", + "format": "html-selector", + "description": "The `appId` to use with `withServerTransition`.", + "default": "serverApp" + }, + "main": { + "type": "string", + "format": "path", + "description": "The name of the main entry-point file.", + "default": "main.server.ts" + }, + "serverFileName": { + "type": "string", + "default": "server.ts", + "description": "The name of the Express server file." + }, + "serverPort": { + "type": "number", + "default": 4000, + "description": "The port for the Express server." + }, + "rootModuleFileName": { + "type": "string", + "format": "path", + "description": "The name of the root module file", + "default": "app.server.module.ts" + }, + "rootModuleClassName": { + "type": "string", + "description": "The name of the root module class.", + "default": "AppServerModule" + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting the workspace after the generator completes." + } + }, + "required": ["project"], + "additionalProperties": false, + "presets": [] + }, + "description": "Generate Angular Universal (SSR) setup for an Angular application.", + "implementation": "/packages/angular/src/generators/setup-ssr/setup-ssr.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/setup-ssr/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/setup-tailwind.json b/docs/generated/packages/angular/generators/setup-tailwind.json new file mode 100644 index 0000000000000..7cef69960ec73 --- /dev/null +++ b/docs/generated/packages/angular/generators/setup-tailwind.json @@ -0,0 +1,48 @@ +{ + "name": "setup-tailwind", + "factory": "./src/generators/setup-tailwind/setup-tailwind", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularTailwindSetupGenerator", + "cli": "nx", + "title": "Configures Tailwind CSS for an application or a buildable/publishable library.", + "description": "Adds the Tailwind CSS configuration files for a given Angular project and installs, if needed, the packages required for Tailwind CSS to work.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project to add the Tailwind CSS setup for.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What project would you like to add the Tailwind CSS setup?" + }, + "buildTarget": { + "type": "string", + "description": "The name of the target used to build the project. This option only applies to buildable/publishable libraries.", + "default": "build" + }, + "skipFormat": { + "type": "boolean", + "description": "Skips formatting the workspace after the generator completes." + }, + "stylesEntryPoint": { + "type": "string", + "description": "Path to the styles entry point relative to the workspace root. If not provided the generator will do its best to find it and it will error if it can't. This option only applies to applications." + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + } + }, + "additionalProperties": false, + "required": ["project"], + "examplesFile": "## Examples\n\nThe `setup-tailwind` generator can be used to add [Tailwind](https://tailwindcss.com) configuration to apps and publishable libraries.\n\n{% tabs %}\n\n{% tab label=\"Standard Setup\" %}\n\nTo generate a standard Tailwind setup, just run the following command.\n\n```bash\nnx g @nrwl/angular:setup-tailwind myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Specifying the Styles Entrypoint\" %}\n\nTo specify the styles file that should be used as the entrypoint for Tailwind, simply pass the `--stylesEntryPoint` flag, relative to workspace root.\n\n```bash\nnx g @nrwl/angular:setup-tailwind myapp --stylesEntryPoint=apps/myapp/src/styles.css\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Configures Tailwind CSS for an application or a buildable/publishable library.", + "implementation": "/packages/angular/src/generators/setup-tailwind/setup-tailwind.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/setup-tailwind/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/stories.json b/docs/generated/packages/angular/generators/stories.json new file mode 100644 index 0000000000000..74fb25f218473 --- /dev/null +++ b/docs/generated/packages/angular/generators/stories.json @@ -0,0 +1,58 @@ +{ + "name": "stories", + "factory": "./src/generators/stories/stories", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularStorybookStoriesGenerator", + "title": "Create Storybook stories/specs", + "description": "Creates Storybook stories/specs for all Angular components declared in a project.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "type": "string", + "aliases": ["project", "projectName"], + "description": "Project for which to generate stories.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What's the name of the project for which you want to generate stories?", + "x-dropdown": "projects" + }, + "generateCypressSpecs": { + "type": "boolean", + "description": "Specifies whether to automatically generate `*.spec.ts` files in the Cypress e2e app generated by the `cypress-configure` generator.", + "x-prompt": "Do you want to generate Cypress specs as well?" + }, + "cypressProject": { + "type": "string", + "description": "The Cypress project to generate the stories under. This is inferred from `name` by default." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "ignorePaths": { + "type": "array", + "description": "Paths to ignore when looking for components.", + "items": { "type": "string", "description": "Path to ignore." }, + "examples": [ + "apps/my-app/src/not-stories/**", + "**/**/src/**/not-stories/**", + "libs/my-lib/**/*.something.ts", + "**/**/src/**/*.other.*", + "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" + ] + } + }, + "additionalProperties": false, + "required": ["name"], + "examplesFile": "This generator will generate stories for all your components in your project.\n\n```bash\nnx g @nrwl/angular:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/packages/storybook/documents/overview-angular#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/angular:stories ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n", + "presets": [] + }, + "description": "Creates stories/specs for all components declared in a project.", + "implementation": "/packages/angular/src/generators/stories/stories.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/stories/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/storybook-configuration.json b/docs/generated/packages/angular/generators/storybook-configuration.json new file mode 100644 index 0000000000000..d8bed5a5bb2a6 --- /dev/null +++ b/docs/generated/packages/angular/generators/storybook-configuration.json @@ -0,0 +1,86 @@ +{ + "name": "storybook-configuration", + "factory": "./src/generators/storybook-configuration/storybook-configuration", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxAngularStorybookConfigurationGenerator", + "title": "Adds Storybook configuration to a project.", + "description": "Adds Storybook configuration to a project to be able to use and create stories.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "type": "string", + "aliases": ["project", "projectName"], + "description": "Project for which to generate Storybook configuration.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "For which project do you want to generate Storybook configuration?", + "x-dropdown": "projects" + }, + "configureCypress": { + "type": "boolean", + "description": "Specifies whether to configure Cypress or not.", + "x-prompt": "Configure a Cypress e2e app to run against the storybook instance?", + "default": true + }, + "generateStories": { + "type": "boolean", + "description": "Specifies whether to automatically generate `*.stories.ts` files for components declared in this project or not.", + "x-prompt": "Automatically generate *.stories.ts files for components declared in this project?", + "default": true + }, + "generateCypressSpecs": { + "type": "boolean", + "description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.", + "x-prompt": "Automatically generate test files in the generated Cypress e2e app?", + "default": true + }, + "cypressDirectory": { + "type": "string", + "description": "A directory where the Cypress project will be placed. Placed at the root by default." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "tsConfiguration": { + "type": "boolean", + "description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "ignorePaths": { + "type": "array", + "description": "Paths to ignore when looking for components.", + "items": { "type": "string", "description": "Path to ignore." }, + "examples": [ + "apps/my-app/src/not-stories/**", + "**/**/src/**/not-stories/**", + "libs/my-lib/**/*.something.ts", + "**/**/src/**/*.other.*", + "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" + ] + }, + "configureTestRunner": { + "type": "boolean", + "description": "Add a Storybook Test-Runner target." + } + }, + "additionalProperties": false, + "required": ["name"], + "examplesFile": "This generator will set up Storybook for your Angular project.\n\n```bash\nnx g @nrwl/angular:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/packages/storybook/documents/overview-angular#generate-storybook-configuration-for-an-angular-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `configureCypress`. If you choose `yes`, a Cypress e2e app will be created (or configured) to run against the project's Storybook instance. You can read more about this in the [Storybook for Angular - Cypress section](/packages/storybook/documents/overview-angular#cypress-tests-for-stories).\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n- Whether you want to `configureTestRunner`. If you choose `yes`, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner).\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration using TypeScript\n\n```bash\nnx g @nrwl/angular:storybook-configuration ui --tsConfiguration=true\n```\n\nThis will generate a Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/angular:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n", + "presets": [] + }, + "description": "Adds Storybook configuration to a project.", + "implementation": "/packages/angular/src/generators/storybook-configuration/storybook-configuration.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/storybook-configuration/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/upgrade-module.json b/docs/generated/packages/angular/generators/upgrade-module.json new file mode 100644 index 0000000000000..9183be4f0418e --- /dev/null +++ b/docs/generated/packages/angular/generators/upgrade-module.json @@ -0,0 +1,56 @@ +{ + "name": "upgrade-module", + "factory": "./src/generators/upgrade-module/upgrade-module", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxUpgradeModuleGenerator", + "title": "Generates UpgradeModule setup.", + "description": "Sets up an Upgrade Module.", + "cli": "nx", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project." + }, + "name": { + "type": "string", + "description": "The name of the main AngularJS module.", + "$default": { "$source": "argv", "index": 0 } + }, + "angularJsImport": { + "type": "string", + "description": "Import expression of the AngularJS application (e.g., `--angularJsImport=some_node_module/my_app`)." + }, + "angularJsCmpSelector": { + "type": "string", + "description": "The selector of an AngularJS component (e.g., `--angularJsCmpSelector=myComponent`)." + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files.", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "description": "Do not add `@angular/upgrade` to `package.json` (e.g., `--skipPackageJson`).", + "default": false + }, + "router": { + "type": "boolean", + "description": "Sets up router synchronization (e.g., `--router`).", + "default": false + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "examplesFile": "## Examples\n\nBelow are some examples of how to generate configuration and setup for using `ngUpgrade`'s `UpgradeModule` for your application.\n\n{% tabs %}\n\n{% tab label=\"Basic Usage\" %}\n\n```bash\nnx g @nrwl/angular:upgrade-module --name=myAngularJsModule --project=myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Setup Router\" %}\n\nAllow a setup that configures routing for `UpgradeModule`.\n\n```bash\nnx g @nrwl/angular:upgrade-module --name=myAngularJsModule --project=myapp --router=true\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Sets up an Upgrade Module.", + "implementation": "/packages/angular/src/generators/upgrade-module/upgrade-module.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/upgrade-module/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/angular/generators/web-worker.json b/docs/generated/packages/angular/generators/web-worker.json new file mode 100644 index 0000000000000..242245f978030 --- /dev/null +++ b/docs/generated/packages/angular/generators/web-worker.json @@ -0,0 +1,50 @@ +{ + "name": "web-worker", + "factory": "./src/generators/web-worker/web-worker", + "schema": { + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "NxAngularWebWorkerGenerator", + "title": "Angular Web Worker Options Schema", + "description": "Creates a new, generic web worker definition in the given or default project.", + "cli": "nx", + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "path", + "description": "The path at which to create the worker file, relative to the current workspace." + }, + "project": { + "type": "string", + "description": "The name of the project.", + "x-dropdown": "projects" + }, + "name": { + "type": "string", + "description": "The name of the worker.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the worker?" + }, + "snippet": { + "type": "boolean", + "default": true, + "description": "Add a worker creation snippet in a sibling file of the same name." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Simple Usage\" %}\n\nThe basic usage of the `web-worker` generator is defined below. You must provide a name for the web worker and the project to assign it to.\n\n```bash\nnx g @nrwl/angular:web-worker myWebWorker --project=myapp\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Creates a Web Worker.", + "implementation": "/packages/angular/src/generators/web-worker/web-worker.ts", + "aliases": [], + "hidden": false, + "path": "/packages/angular/src/generators/web-worker/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/cra-to-nx.json b/docs/generated/packages/cra-to-nx.json deleted file mode 100644 index 2ba8eb96f570f..0000000000000 --- a/docs/generated/packages/cra-to-nx.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "cra-to-nx", - "packageName": "cra-to-nx", - "description": "This package will turn your React app into an Nx workspace. To use this package, your React app must have been generated and kept the structure of Create-React-App, with files generated either in js/jsx or ts/tsx.", - "root": "/packages/cra-to-nx", - "source": "/packages/cra-to-nx/src", - "documentation": [], - "generators": [], - "executors": [] -} diff --git a/docs/generated/packages/create-nx-plugin.json b/docs/generated/packages/create-nx-plugin.json deleted file mode 100644 index 4f884c5039f39..0000000000000 --- a/docs/generated/packages/create-nx-plugin.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "create-nx-plugin", - "packageName": "create-nx-plugin", - "description": "This package is used to scaffold a brand-new workspace used to develop an Nx plugin, and sets up a pre-configured plugin with the specified name. The new plugin is created with a default generator, executor, and e2e app.", - "root": "/packages/create-nx-plugin", - "source": "/packages/create-nx-plugin/src", - "documentation": [], - "generators": [], - "executors": [] -} diff --git a/docs/generated/packages/create-nx-workspace.json b/docs/generated/packages/create-nx-workspace.json deleted file mode 100644 index 39bd472e25d23..0000000000000 --- a/docs/generated/packages/create-nx-workspace.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "create-nx-workspace", - "packageName": "create-nx-workspace", - "description": "Smart, Fast and Extensible Build System", - "root": "/packages/create-nx-workspace", - "source": "/packages/create-nx-workspace/src", - "documentation": [], - "generators": [], - "executors": [] -} diff --git a/docs/generated/packages/cypress.json b/docs/generated/packages/cypress.json deleted file mode 100644 index 583b38622d5ae..0000000000000 --- a/docs/generated/packages/cypress.json +++ /dev/null @@ -1,353 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "cypress", - "packageName": "@nrwl/cypress", - "description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.", - "root": "/packages/cypress", - "source": "/packages/cypress/src", - "documentation": [ - { - "name": "Overview", - "id": "overview", - "path": "/packages/cypress", - "file": "shared/cypress-plugin", - "content": "Cypress is a test runner built for the modern web. It has a lot of great features:\n\n- Time travel\n- Real-time reloads\n- Automatic waiting\n- Spies, stubs, and clocks\n- Network traffic control\n- Screenshots and videos\n\n## Setting Up Cypress\n\n> Info about [Cypress Component Testing can be found here](/cypress/cypress-component-testing)\n\nIf the `@nrwl/cypress` package is not installed, install the version that matches your `nx` package version.\n\n```shell\nyarn add --dev @nrwl/cypress\n```\n\n```shell\nnpm install --save-dev @nrwl/cypress\n```\n\n## E2E Testing\n\nBy default, when creating a new frontend application, Nx will use Cypress to create the e2e tests project.\n\n```shell\nnx g @nrwl/web:app frontend\n```\n\n### Creating a Cypress E2E project for an existing project\n\nTo generate an E2E project based on an existing project, run the following generator\n\n```shell\nnx g @nrwl/cypress:cypress-project your-app-name-e2e --project=your-app-name\n```\n\nOptionally, you can use the `--baseUrl` option if you don't want cypress plugin to serve `your-app-name`.\n\n```shell\nnx g @nrwl/cypress:cypress-project your-app-name-e2e --baseUrl=http://localhost:4200\n```\n\nReplace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`.\n\n### Testing Applications\n\nRun `nx e2e frontend-e2e` to execute e2e tests with Cypress.\n\nYou can run your e2e test against a production build by using the `production` [configuration](https://nx.dev/recipe/use-executor-configurations#use-executor-configurations)\n\n```shell\nnx e2e frontend-e2e --configuration=production\n```\n\nBy default, Cypress will run in headless mode. You will have the result of all the tests and errors (if any) in your\nterminal. Screenshots and videos will be accessible in `dist/cypress/apps/frontend/screenshots` and `dist/cypress/apps/frontend/videos`.\n\n### Watching for Changes (Headed Mode)\n\nWith, `nx e2e frontend-e2e --watch` Cypress will start in headed mode where you can see your application being tested.\n\nRunning Cypress with `--watch` is a great way to enhance dev workflow - you can build up test files with the application\nrunning and Cypress will re-run those tests as you enhance and add to the suite.\n\n```shell\nnx e2e frontend-e2e --watch\n```\n\n### Specifying a Custom Url to Test\n\nThe `baseUrl` property provides you the ability to test an application hosted on a specific domain.\n\n```shell\nnx e2e frontend-e2e --baseUrl=https://frontend.com\n```\n\n> If no `baseUrl` and no `devServerTarget` are provided, Cypress will expect to have the `baseUrl` property in\n> the cypress config file, or will error.\n\n## Using cypress.config.ts\n\nIf you need to fine tune your Cypress setup, you can do so by modifying `cypress.config.ts` in the project root. For\ninstance,\nyou can easily add your `projectId` to save all the screenshots and videos into your Cypress dashboard. The complete\nconfiguration is documented\non [the official website](https://docs.cypress.io/guides/references/configuration.html#Options).\n\n## Environment Variables\n\nIf you're needing to pass a variable to cypress that you wish to not commit to your repository, i.e. API keys, or dynamic values based on configurations, i.e. API Urls. This is where [Cypress environment variables](https://docs.cypress.io/guides/guides/environment-variables) can be used.\n\nThere are a handful of ways to pass environment variables to Cypress, but the most common is going to be via the [`cypress.env.json` file](https://docs.cypress.io/guides/guides/environment-variables#Option-1-configuration-file), the [env executor option for cypress](https://nx.dev/packages/cypress/executors/cypress#env) or the commandline.\n\nCreate a `cypress.env.json` file in the projects root i.e. `apps/my-cool-app-e2e/cypress.env.json`. Cypress will automatically pick up this file. This method is helpful for configurations that you want to not commit. Just don't forget to add the file to the `.gitignore` and add documentation so people in your repo know what values to popluate in their local copy of the `cypress.env.json` file.\n\nUsing [@nrwl/cypress:cypress](/packages/cypress/executors/cypress) env executor option is a good way to add values you want to define that you don't mine commit to the repository, such as a base API url. You can leverage [target configurations](/reference/project-configuration#targets) to define different values as well.\n\nOptionally, you can pass environment variables via the commandline with the `--env` flag.\n\n{% callout type=\"warning\" title=\"Executor options and --env\" %}\nWhen using the `--env` flag, this will not be merged with any values used in the `env` executor option.\n{% /callout %}\n\n```shell\nnx e2e frontend-e2e --env.API_URL=\"https://api.my-nx-website.com\" --env.API_KEY=\"abc-123\"\n```\n" - }, - { - "name": "Component Testing", - "id": "cypress-component-testing", - "file": "shared/cypress-component-testing", - "content": "# Cypress Component Testing\n\n> Component testing requires Cypress v10 and above.\n> See our [guide for more information](/cypress/v11-migration-guide) to migrate to Cypress v10.\n\nUnlike [E2E testing](/packages/cypress), component testing does not create a new project. Instead, Cypress component testing is added\ndirectly to a project, like [Jest](/packages/jest)\n\n## Add Component Testing to a Project\n\n> Currently only [@nrwl/react](/packages/react/generators/cypress-component-configuration) and [@nrwl/angular](/packages/angular/generators/cypress-component-configuration) plugins support component testing\n\nUse the `cypress-component-configuration` generator from the respective plugin to add component testing to a project.\n\n```shell\nnx g @nrwl/react:cypress-component-configuration --project=your-project\n\nnx g @nrwl/angular:cypress-component-configuration --project=your-project\n```\n\nYou can optionally pass in `--generate-tests` to create component tests for all components within the library.\n\nComponent testing leverages a build target within your workspace as the base for running the tests. The build target is usually an app within the workspace. By default, the generator attempts to find the build target for you based on the project usage, but you can manually specify the build target to use via the `--build-target` option.\n\n```shell\nnx g @nrwl/react:cypress-component-configuration --project=your-project --build-target=my-react-app:build\n\nnx g @nrwl/angular:cypress-component-configuration --project=your-project --build-target=my-ng-app:build\n```\n\nThe build target option can be changed later via updating the `devServerTarget` option in the `component-test` target.\n\n{% callout type=\"warning\" title=\"Executor Options\" %}\nWhen using component testing make sure to set `skipServe: true` in the component test target options, otherwise `@nrwl/cypress` will attempt to run the build first which can slow down your component tests. `skipServe: true` is automatically set when using the `cypress-component-configuration` generator.\n{% /callout %}\n\n## Testing Projects\n\nRun `nx component-test your-lib` to execute the component tests with Cypress.\n\nBy default, Cypress will run in headless mode. You will have the result of all the tests and errors (if any) in your\nterminal. Screenshots and videos will be accessible in `dist/cypress/libs/your-lib/screenshots` and `dist/cypress/libs/your-lib/videos`.\n\n## Watching for Changes (Headed Mode)\n\nWith, `nx component-test your-lib --watch` Cypress will start in headed mode. Where you can see your component being tested.\n\nRunning Cypress with `--watch` is a great way to iterate on your components since cypress will rerun your tests as you make those changes validating the new behavior.\n\n## More Information\n\nYou can read more on component testing in the [Cypress documentation](https://docs.cypress.io/guides/component-testing/writing-your-first-component-test).\n" - }, - { - "name": "v11 Migration Guide", - "id": "v11-migration-guide", - "file": "shared/guides/cypress/cypress-v11-migration", - "content": "# Migrating to Cypress V11\n\nCypress v10 introduce new features, like component testing, along with some breaking changes. Nx can help you migrate from v8 or v9 of Cypress to v10 and then to v11.\n\nBefore continuing, make sure you have all your changes committed and have a clean working tree.\n\nYou can migrate an E2E project to v11 by running the following command:\n\n```shell\nnx g @nrwl/cypress:migrate-to-cypress-11\n```\n\nIn general, these are the steps taken to migrate your project:\n\n1. Migrates your existing `cypress.json` configuration to a new `cypress.config.ts` configuration file.\n - The `pluginsFile` option has been replaced for `setupNodeEvents`. We will import the file and add it to\n the `setupNodeEvents` config option. Double-check your plugins are working correctly.\n2. Rename all test files from `.spec.ts` to `.cy.ts`\n3. Rename the `support/index.ts` to `support/e2e.ts` and update any associated imports\n4. Rename the `integrations` folder to the `e2e` folder\n\n{% callout type=\"caution\" title=\"Root cypress.json\" %}\nKeeping a root `cypress.json` file, will cause issues with [Cypress trying to load the project](https://github.com/nrwl/nx/issues/11512).\nInstead, you can create a [root ts file and import it into each project's cypress config file](https://github.com/nrwl/nx/issues/11512#issuecomment-1213420638) to share values across projects.\n{% /callout %}\n\nWe take the best effort to make this migration seamless, but there can be edge cases we didn't anticipate. So feel free to [open an issue](https://github.com/nrwl/nx/issues/new?assignees=&labels=type%3A+bug&template=1-bug.md) if you come across any problems.\n\nYou can also consult the [official Cypress migration guide](https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0) if you get stuck and want to manually migrate your projects.\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#cypressInitGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxCypressInit", - "cli": "nx", - "title": "Add Cypress Configuration to the workspace", - "description": "Add Cypress Configuration to the workspace.", - "type": "object", - "properties": { - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - } - }, - "presets": [] - }, - "description": "Initialize the `@nrwl/cypress` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/cypress/src/generators/init/init#cypressInitGenerator.ts", - "path": "/packages/cypress/src/generators/init/schema.json" - }, - { - "name": "cypress-project", - "factory": "./src/generators/cypress-project/cypress-project#cypressProjectGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxCypressProjectGeneratorSchema", - "cli": "nx", - "title": "Create Cypress Configuration for the workspace", - "description": "Create Cypress Configuration for the workspace.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the frontend project to test.", - "$default": { "$source": "projectName" } - }, - "baseUrl": { - "type": "string", - "description": "The address (with the port) which your application is running on." - }, - "name": { - "type": "string", - "description": "Name of the E2E Project.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the e2e project?" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "js": { - "description": "Generate JavaScript files rather than TypeScript files.", - "type": "boolean", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside workspace.json.", - "type": "boolean" - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "rootProject": { - "description": "Create a application at the root of the workspace", - "type": "boolean", - "default": false, - "hidden": true - }, - "bundler": { - "description": "The Cypress bundler to use.", - "type": "string", - "enum": ["vite", "webpack", "none"], - "x-prompt": "Which Cypress bundler do you want to use?", - "default": "webpack" - } - }, - "required": ["name"], - "examplesFile": "Adding Cypress to an existing application requires two options. The name of the e2e app to create and what project that e2e app is for.\n\n```bash\nnx g cypress-project --name=my-app-e2e --project=my-app\n```\n\nWhen providing `--project` option, the generator will look for the `serve` target in that given project. This allows the [cypress executor](/packages/cypress/executors/cypress) to spin up the project and start the cypress runner.\n\nIf you prefer to not have the project served automatically, you can provide a `--base-url` argument in place of `--project`\n\n```bash\nnx g cypress-project --name=my-app-e2e --base-url=http://localhost:1234\n```\n\n{% callout type=\"note\" title=\"What about API Projects?\" %}\nYou can also run the `cypress-project` generator against API projects like a [Nest API](/packages/nest/generators/application#@nrwl/nest:application).\nIf there is a URL to visit then you can test it with Cypress!\n{% /callout %}\n\n## Using Cypress with Vite.js\n\nNow, you can generate your Cypress project with Vite.js as the bundler:\n\n```bash\nnx g cypress-project --name=my-app-e2e --project=my-app --bundler=vite\n```\n\nThis generator will pass the `bundler` information (`bundler: 'vite'`) to our `nxE2EPreset`, in your project's `cypress.config.ts` file (eg. `my-app-e2e/cypress.config.ts`).\n\n### Customizing the Vite.js configuration\n\nThe `nxE2EPreset` will then use the `bundler` information to generate the correct settings for your Cypress project to use Vite.js. In the background, the way this works is that it's using a custom Vite preprocessor for your files, that's called on the `file:preprocessor` event. If you want to customize this behaviour, you can do so like this in your project's `cypress.config.ts` file:\n\n```ts\nimport { defineConfig } from 'cypress';\nimport { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';\n\nconst config = nxE2EPreset(__filename, { bundler: 'vite' });\nexport default defineConfig({\n e2e: {\n ...config,\n setupNodeEvents(on, config): {\n config.setupNodeEvents(on);\n // Your settings here\n }\n },\n});\n```\n", - "presets": [] - }, - "description": "Add a Cypress E2E Project.", - "hidden": true, - "implementation": "/packages/cypress/src/generators/cypress-project/cypress-project#cypressProjectGenerator.ts", - "aliases": [], - "path": "/packages/cypress/src/generators/cypress-project/schema.json" - }, - { - "name": "cypress-component-project", - "factory": "./src/generators/cypress-component-project/cypress-component-project#cypressComponentProject", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxCypressComponentProject", - "cli": "nx", - "title": "Set up Cypress component testing for a project", - "description": "Set up Cypress component test for a project.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/cypress:cypress-component-project --project=my-cool-lib ", - "description": "Add cypress component testing to an existing project named my-cool-lib" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project to add cypress component testing to", - "$default": { "$source": "projectName" }, - "x-prompt": "What project should we add Cypress component testing to?" - }, - "bundler": { - "description": "The Cypress bundler to use.", - "type": "string", - "enum": ["vite", "webpack"], - "x-prompt": "Which Cypress bundler do you want to use for the dev-server?", - "default": "webpack" - } - }, - "required": ["project"], - "examplesFile": "This is a framework-agnostic generator for adding component testing to a project.\n\n```bash\nnx g cypress-component-project --project=my-cool-project\n```\n\nRunning this generator, adds the required files to the specified project without any configurations for Cypress. It's best to use the framework specific generator, instead `cypress-component-project` directly\n\n- [React component testing](/packages/react/generators/cypress-component-configuration)\n- [Angular component testing](/packages/angular/generators/cypress-component-configuration)\n\nA new `component-test` target will be added to the specified project.\n\n```bash\nnx g component-test my-cool-project\n```\n\nRead more about [Cypress Component Testing](/cypress/cypress-component-testing)\n", - "presets": [] - }, - "description": "Set up Cypress Component Test for a project", - "hidden": true, - "implementation": "/packages/cypress/src/generators/cypress-component-project/cypress-component-project#cypressComponentProject.ts", - "aliases": [], - "path": "/packages/cypress/src/generators/cypress-component-project/schema.json" - }, - { - "name": "migrate-to-cypress-11", - "factory": "./src/generators/migrate-to-cypress-11/migrate-to-cypress-11#migrateCypressProject", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxCypressMigrateTo11", - "cli": "nx", - "title": "Migrate e2e project to Cypress 11", - "description": "Migrate Cypress e2e project from v8/v9 to Cypress v11.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/cypress:migrate-to-cypress-11", - "description": "Migrate existing cypress projects to Cypress v11" - } - ], - "properties": {}, - "presets": [] - }, - "description": "Migrate existing Cypress e2e projects to Cypress v11", - "implementation": "/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11#migrateCypressProject.ts", - "aliases": [], - "hidden": false, - "path": "/packages/cypress/src/generators/migrate-to-cypress-11/schema.json" - } - ], - "executors": [ - { - "name": "cypress", - "implementation": "/packages/cypress/src/executors/cypress/cypress.impl.ts", - "schema": { - "version": 2, - "title": "Cypress Target", - "description": "Run Cypress for e2e, integration and component testing.", - "type": "object", - "outputCapture": "pipe", - "cli": "nx", - "presets": [ - { - "name": "Starting Dev Server", - "keys": ["cypressConfig", "devServerTarget"] - }, - { "name": "Custom Base Url", "keys": ["cypressConfig", "baseUrl"] }, - { - "name": "Component Testing", - "keys": [ - "cypressConfig", - "devServerTarget", - "testingType", - "skipServe" - ] - } - ], - "properties": { - "cypressConfig": { - "type": "string", - "description": "The path of the Cypress configuration json file.", - "x-completion-type": "file", - "x-completion-glob": "cypress?(*)@(.js|.ts|.json)" - }, - "watch": { - "type": "boolean", - "description": "Recompile and run tests when files change.", - "default": false - }, - "tsConfig": { - "type": "string", - "description": "The path of the Cypress tsconfig configuration json file.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "devServerTarget": { - "type": "string", - "description": "Dev server target to run tests against." - }, - "headed": { - "type": "boolean", - "description": "Displays the browser instead of running headlessly. Set this to `true` if your run depends on a Chrome extension being loaded.", - "default": false - }, - "headless": { - "type": "boolean", - "description": "Hide the browser instead of running headed (default for cypress run).", - "default": false, - "x-deprecated": true - }, - "exit": { - "type": "boolean", - "description": "Whether or not the Cypress Test Runner will stay open after running tests in a spec file.", - "default": true - }, - "key": { - "type": "string", - "description": "The key cypress should use to run tests in parallel/record the run (CI only)." - }, - "record": { - "type": "boolean", - "description": "Whether or not Cypress should record the results of the tests.", - "default": false - }, - "parallel": { - "type": "boolean", - "description": "Whether or not Cypress should run its tests in parallel (CI only).", - "default": false - }, - "baseUrl": { - "type": "string", - "description": "The address (with the port) which your application is running on." - }, - "browser": { - "type": "string", - "description": "The browser to run tests in." - }, - "env": { - "type": "object", - "description": "A key-value Pair of environment variables to pass to Cypress runner." - }, - "spec": { - "type": "string", - "description": "A comma delimited glob string that is provided to the Cypress runner to specify which spec files to run. i.e. `**examples/**,**actions.spec**`." - }, - "copyFiles": { - "type": "string", - "description": "A regex string that is used to choose what additional integration files to copy to the dist folder.", - "x-deprecated": true - }, - "ciBuildId": { - "oneOf": [{ "type": "string" }, { "type": "number" }], - "description": "A unique identifier for a run to enable grouping or parallelization." - }, - "group": { - "type": "string", - "description": "A named group for recorded runs in the Cypress dashboard." - }, - "ignoreTestFiles": { - "type": "string", - "description": "A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses minimatch with the options: `{dot: true, matchBase: true}`. We suggest using https://globster.xyz to test what files would match." - }, - "reporter": { - "type": "string", - "description": "The reporter used during cypress run." - }, - "reporterOptions": { - "type": "string", - "description": "The reporter options used. Supported options depend on the reporter." - }, - "skipServe": { - "type": "boolean", - "description": "Skip dev-server build.", - "default": false - }, - "testingType": { - "type": "string", - "description": "Specify the type of tests to execute.", - "enum": ["component", "e2e"], - "default": "e2e" - }, - "tag": { - "type": "string", - "description": "A comma delimited list to identify a run with.", - "aliases": ["t"] - } - }, - "additionalProperties": true, - "required": ["cypressConfig"], - "examplesFile": "Depending on your testing type, the Cypress executor is configured in different ways. The following are sample configurations that are created via the [cypress-project](/packages/cypress/generators/cypress-project) and [cypress-component-project](/packages/cypress/generators/cypress-component-project) generators.\n\n{% tabs %}\n{% tab label=\"E2E Testing\" %}\n\n```json\n\"targets\": {\n \"e2e\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"apps/app-e2e/cypres.config.ts\",\n \"devServerTarget\": \"my-react-app:serve\",\n \"testingType\": \"e2e\"\n }\n }\n}\n```\n\n{% callout type=\"note\" title=\"API Testing\" %}\nAPI testing with Cypress is the same setup as e2e testing. Just change which `devServerTarget` is used!\n{% /callout %}\n\n### Providing a Base URL\n\nIf `devServerTarget` is provided, the url returned from started the dev server will be passed to cypress as the `baseUrl` option.\n\nDefining a `baseUrl` in the executor options will override the inferred `baseUrl` from the `devServerTarget`.\n\nThe `baseUrl` defined in the Cypress config file is the last value used if no url is found in the `devServerTarget` or executor options.\n\n### Static Serving\n\nWhen running in CI it doesn't make sense to start up a dev server since there aren't changes to watch for.\n\nYou can use [`@nrwl/web:file-server`](/packages/web/executors/file-server) to serve the pre-built static files of your frontend project.\n\nIn some _frontend_ application, add a 'static-serve' target.\n\n```json\n\"serve-static\": {\n \"executor\": \"@nrwl/web:file-server\",\n \"options\":{\n \"buildTarget\": \"frontend:build\"\n }\n}\n```\n\nIn the _e2e_ application add a configuration to change `devServerTarget` to point to the `static-serve` from the _frontend_ application\n\n```json\n\"e2e\": {\n //...\n \"configurations\": {\n \"ci\": {\n \"devServerTarget\": \"frontend:serve-static\"\n }\n }\n}\n```\n\n{% callout type=\"note\" title=\"What about Node projects?\" %}\nThe same can be done for backend node apps with [`@nrwl/js:node` executor](/packages/js/executors/node)\n{% /callout %}\n\n```bash\nnx e2e my-app-e2e --configuration=ci\n```\n\n{% /tab %}\n{% tab label=\"Component Testing\" %}\n\n{% callout type=\"note\" title=\"Cypress Component Testing\" %}\nWhen adding component testing to a project, it's best to use the framework specific generator, instead `cypress-component-project` directly.\n\n- [React component testing](/packages/react/generators/cypress-component-configuration)\n- [Angular component testing](/packages/angular/generators/cypress-component-configuration)\n\n{% /callout %}\n\n```json\n\"targets\": {\n \"component-test\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"apps/app/cypres.config.ts\",\n \"devServerTarget\": \"my-react-app:build\",\n \"testingType\": \"component\",\n \"skipServe\": true\n }\n }\n}\n```\n\nIt's important `skipServe` is set to true. Nx doesn't need to run the `devServerTarget`, Cypress creates its own dev server for component testing.\nInstead, Nx needs to know what build target to create the correct configuration to pass to Cypress, which is why it's still used in component testing.\n\n{% /tab %}\n{% /tabs %}\n\n### Environment Variables\n\nUsing [executor configurations](/recipe/use-executor-configurations#use-executor-configurations) offers flexibility to set environment variables\n\n```json\n\"targets\": {\n \"e2e\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"apps/app-e2e/cypres.config.ts\",\n \"devServerTarget\": \"my-react-app:serve\",\n \"testingType\": \"e2e\"\n },\n \"configurations\": {\n \"qa\": {\n \"env\": {\n \"API_URL\": \"https://api.qa.company.com\"\n }\n },\n \"dev\": {\n \"env\": {\n \"API_URL\": \"http://locahost:3333/api\"\n }\n }\n }\n }\n}\n```\n\nRead more on different ways to use [environment variables for cypress executor](/packages/cypress#environment-variables)\n" - }, - "description": "Run Cypress E2E tests.", - "aliases": [], - "hidden": false, - "path": "/packages/cypress/src/executors/cypress/schema.json" - } - ] -} diff --git a/docs/shared/cypress-component-testing.md b/docs/generated/packages/cypress/documents/cypress-component-testing.md similarity index 96% rename from docs/shared/cypress-component-testing.md rename to docs/generated/packages/cypress/documents/cypress-component-testing.md index 833bbb434e33d..692470f14083d 100644 --- a/docs/shared/cypress-component-testing.md +++ b/docs/generated/packages/cypress/documents/cypress-component-testing.md @@ -1,7 +1,7 @@ # Cypress Component Testing > Component testing requires Cypress v10 and above. -> See our [guide for more information](/cypress/v11-migration-guide) to migrate to Cypress v10. +> See our [guide for more information](/packages/cypress/documents/v11-migration-guide) to migrate to Cypress v10. Unlike [E2E testing](/packages/cypress), component testing does not create a new project. Instead, Cypress component testing is added directly to a project, like [Jest](/packages/jest) diff --git a/docs/generated/packages/cypress/documents/overview.md b/docs/generated/packages/cypress/documents/overview.md new file mode 100644 index 0000000000000..f5555f864a99e --- /dev/null +++ b/docs/generated/packages/cypress/documents/overview.md @@ -0,0 +1,109 @@ +Cypress is a test runner built for the modern web. It has a lot of great features: + +- Time travel +- Real-time reloads +- Automatic waiting +- Spies, stubs, and clocks +- Network traffic control +- Screenshots and videos + +## Setting Up Cypress + +> Info about [Cypress Component Testing can be found here](/packages/cypress/documents/cypress-component-testing) + +If the `@nrwl/cypress` package is not installed, install the version that matches your `nx` package version. + +```shell +yarn add --dev @nrwl/cypress +``` + +```shell +npm install --save-dev @nrwl/cypress +``` + +## E2E Testing + +By default, when creating a new frontend application, Nx will use Cypress to create the e2e tests project. + +```shell +nx g @nrwl/web:app frontend +``` + +### Creating a Cypress E2E project for an existing project + +To generate an E2E project based on an existing project, run the following generator + +```shell +nx g @nrwl/cypress:cypress-project your-app-name-e2e --project=your-app-name +``` + +Optionally, you can use the `--baseUrl` option if you don't want cypress plugin to serve `your-app-name`. + +```shell +nx g @nrwl/cypress:cypress-project your-app-name-e2e --baseUrl=http://localhost:4200 +``` + +Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`. + +### Testing Applications + +Run `nx e2e frontend-e2e` to execute e2e tests with Cypress. + +You can run your e2e test against a production build by using the `production` [configuration](https://nx.dev/recipe/use-executor-configurations#use-executor-configurations) + +```shell +nx e2e frontend-e2e --configuration=production +``` + +By default, Cypress will run in headless mode. You will have the result of all the tests and errors (if any) in your +terminal. Screenshots and videos will be accessible in `dist/cypress/apps/frontend/screenshots` and `dist/cypress/apps/frontend/videos`. + +### Watching for Changes (Headed Mode) + +With, `nx e2e frontend-e2e --watch` Cypress will start in headed mode where you can see your application being tested. + +Running Cypress with `--watch` is a great way to enhance dev workflow - you can build up test files with the application +running and Cypress will re-run those tests as you enhance and add to the suite. + +```shell +nx e2e frontend-e2e --watch +``` + +### Specifying a Custom Url to Test + +The `baseUrl` property provides you the ability to test an application hosted on a specific domain. + +```shell +nx e2e frontend-e2e --baseUrl=https://frontend.com +``` + +> If no `baseUrl` and no `devServerTarget` are provided, Cypress will expect to have the `baseUrl` property in +> the cypress config file, or will error. + +## Using cypress.config.ts + +If you need to fine tune your Cypress setup, you can do so by modifying `cypress.config.ts` in the project root. For +instance, +you can easily add your `projectId` to save all the screenshots and videos into your Cypress dashboard. The complete +configuration is documented +on [the official website](https://docs.cypress.io/guides/references/configuration.html#Options). + +## Environment Variables + +If you're needing to pass a variable to cypress that you wish to not commit to your repository, i.e. API keys, or dynamic values based on configurations, i.e. API Urls. This is where [Cypress environment variables](https://docs.cypress.io/guides/guides/environment-variables) can be used. + +There are a handful of ways to pass environment variables to Cypress, but the most common is going to be via the [`cypress.env.json` file](https://docs.cypress.io/guides/guides/environment-variables#Option-1-configuration-file), the [env executor option for cypress](https://nx.dev/packages/cypress/executors/cypress#env) or the commandline. + +Create a `cypress.env.json` file in the projects root i.e. `apps/my-cool-app-e2e/cypress.env.json`. Cypress will automatically pick up this file. This method is helpful for configurations that you want to not commit. Just don't forget to add the file to the `.gitignore` and add documentation so people in your repo know what values to popluate in their local copy of the `cypress.env.json` file. + +Using [@nrwl/cypress:cypress](/packages/cypress/executors/cypress) env executor option is a good way to add values you want to define that you don't mine commit to the repository, such as a base API url. You can leverage [target configurations](/reference/project-configuration#targets) to define different values as well. + +Optionally, you can pass environment variables via the commandline with the `--env` flag. + +{% callout type="warning" title="Executor options and --env" %} +When using the `--env` flag, this will not be merged with any values used in the `env` executor option. +{% /callout %} + +```shell +nx e2e frontend-e2e --env.API_URL="https://api.my-nx-website.com" --env.API_KEY="abc-123" +``` diff --git a/docs/generated/packages/cypress/documents/v10-migration-guide.md b/docs/generated/packages/cypress/documents/v10-migration-guide.md new file mode 100644 index 0000000000000..f6f7c6e105830 --- /dev/null +++ b/docs/generated/packages/cypress/documents/v10-migration-guide.md @@ -0,0 +1,29 @@ +# Migrating to Cypress V10 + +Cypress v10 introduce new features, like component testing, along with some breaking changes. + +Before continuing, make sure you have all your changes committed and have a clean working tree. + +You can migrate an E2E project to v10 by running the following command: + +```shell +nx g @nrwl/cypress:migrate-to-cypress-10 +``` + +In general, these are the steps taken to migrate your project: + +1. Migrates your existing `cypress.json` configuration to a new `cypress.config.ts` configuration file. + - The `pluginsFile` option has been replaced for `setupNodeEvents`. We will import the file and add it to + the `setupNodeEvents` config option. Double-check your plugins are working correctly. +2. Rename all test files from `.spec.ts` to `.cy.ts` +3. Rename the `support/index.ts` to `support/e2e.ts` and update any associated imports +4. Rename the `integrations` folder to the `e2e` folder + +{% callout type="caution" title="Root cypress.json" %} +Keeping a root `cypress.json` file, will cause issues with [Cypress trying to load the project](https://github.com/nrwl/nx/issues/11512). +Instead, you can create a [root ts file and import it into each project's cypress config file](https://github.com/nrwl/nx/issues/11512#issuecomment-1213420638) to share values across projects. +{% /callout %} + +We take the best effort to make this migration seamless, but there can be edge cases we didn't anticipate. So feel free to [open an issue](https://github.com/nrwl/nx/issues/new?assignees=&labels=type%3A+bug&template=1-bug.md) if you come across any problems. + +You can also consult the [official Cypress migration guide](https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0) if you get stuck and want to manually migrate your projects. diff --git a/docs/generated/packages/cypress/documents/v11-migration-guide.md b/docs/generated/packages/cypress/documents/v11-migration-guide.md new file mode 100644 index 0000000000000..69519d2908e9b --- /dev/null +++ b/docs/generated/packages/cypress/documents/v11-migration-guide.md @@ -0,0 +1,29 @@ +# Migrating to Cypress V11 + +Cypress v10 introduce new features, like component testing, along with some breaking changes. Nx can help you migrate from v8 or v9 of Cypress to v10 and then to v11. + +Before continuing, make sure you have all your changes committed and have a clean working tree. + +You can migrate an E2E project to v11 by running the following command: + +```shell +nx g @nrwl/cypress:migrate-to-cypress-11 +``` + +In general, these are the steps taken to migrate your project: + +1. Migrates your existing `cypress.json` configuration to a new `cypress.config.ts` configuration file. + - The `pluginsFile` option has been replaced for `setupNodeEvents`. We will import the file and add it to + the `setupNodeEvents` config option. Double-check your plugins are working correctly. +2. Rename all test files from `.spec.ts` to `.cy.ts` +3. Rename the `support/index.ts` to `support/e2e.ts` and update any associated imports +4. Rename the `integrations` folder to the `e2e` folder + +{% callout type="caution" title="Root cypress.json" %} +Keeping a root `cypress.json` file, will cause issues with [Cypress trying to load the project](https://github.com/nrwl/nx/issues/11512). +Instead, you can create a [root ts file and import it into each project's cypress config file](https://github.com/nrwl/nx/issues/11512#issuecomment-1213420638) to share values across projects. +{% /callout %} + +We take the best effort to make this migration seamless, but there can be edge cases we didn't anticipate. So feel free to [open an issue](https://github.com/nrwl/nx/issues/new?assignees=&labels=type%3A+bug&template=1-bug.md) if you come across any problems. + +You can also consult the [official Cypress migration guide](https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0) if you get stuck and want to manually migrate your projects. diff --git a/docs/generated/packages/cypress/executors/cypress.json b/docs/generated/packages/cypress/executors/cypress.json new file mode 100644 index 0000000000000..715c10307237a --- /dev/null +++ b/docs/generated/packages/cypress/executors/cypress.json @@ -0,0 +1,141 @@ +{ + "name": "cypress", + "implementation": "/packages/cypress/src/executors/cypress/cypress.impl.ts", + "schema": { + "version": 2, + "title": "Cypress Target", + "description": "Run Cypress for e2e, integration and component testing.", + "type": "object", + "outputCapture": "pipe", + "cli": "nx", + "presets": [ + { + "name": "Starting Dev Server", + "keys": ["cypressConfig", "devServerTarget"] + }, + { "name": "Custom Base Url", "keys": ["cypressConfig", "baseUrl"] }, + { + "name": "Component Testing", + "keys": ["cypressConfig", "devServerTarget", "testingType", "skipServe"] + } + ], + "properties": { + "cypressConfig": { + "type": "string", + "description": "The path of the Cypress configuration json file.", + "x-completion-type": "file", + "x-completion-glob": "cypress?(*)@(.js|.ts|.json)" + }, + "watch": { + "type": "boolean", + "description": "Recompile and run tests when files change.", + "default": false + }, + "tsConfig": { + "type": "string", + "description": "The path of the Cypress tsconfig configuration json file.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "devServerTarget": { + "type": "string", + "description": "Dev server target to run tests against." + }, + "headed": { + "type": "boolean", + "description": "Displays the browser instead of running headlessly. Set this to `true` if your run depends on a Chrome extension being loaded.", + "default": false + }, + "headless": { + "type": "boolean", + "description": "Hide the browser instead of running headed (default for cypress run).", + "default": false, + "x-deprecated": true + }, + "exit": { + "type": "boolean", + "description": "Whether or not the Cypress Test Runner will stay open after running tests in a spec file.", + "default": true + }, + "key": { + "type": "string", + "description": "The key cypress should use to run tests in parallel/record the run (CI only)." + }, + "record": { + "type": "boolean", + "description": "Whether or not Cypress should record the results of the tests.", + "default": false + }, + "parallel": { + "type": "boolean", + "description": "Whether or not Cypress should run its tests in parallel (CI only).", + "default": false + }, + "baseUrl": { + "type": "string", + "description": "The address (with the port) which your application is running on." + }, + "browser": { + "type": "string", + "description": "The browser to run tests in." + }, + "env": { + "type": "object", + "description": "A key-value Pair of environment variables to pass to Cypress runner." + }, + "spec": { + "type": "string", + "description": "A comma delimited glob string that is provided to the Cypress runner to specify which spec files to run. i.e. `**examples/**,**actions.spec**`." + }, + "copyFiles": { + "type": "string", + "description": "A regex string that is used to choose what additional integration files to copy to the dist folder.", + "x-deprecated": true + }, + "ciBuildId": { + "oneOf": [{ "type": "string" }, { "type": "number" }], + "description": "A unique identifier for a run to enable grouping or parallelization." + }, + "group": { + "type": "string", + "description": "A named group for recorded runs in the Cypress dashboard." + }, + "ignoreTestFiles": { + "type": "string", + "description": "A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses minimatch with the options: `{dot: true, matchBase: true}`. We suggest using https://globster.xyz to test what files would match." + }, + "reporter": { + "type": "string", + "description": "The reporter used during cypress run." + }, + "reporterOptions": { + "type": "string", + "description": "The reporter options used. Supported options depend on the reporter." + }, + "skipServe": { + "type": "boolean", + "description": "Skip dev-server build.", + "default": false + }, + "testingType": { + "type": "string", + "description": "Specify the type of tests to execute.", + "enum": ["component", "e2e"], + "default": "e2e" + }, + "tag": { + "type": "string", + "description": "A comma delimited list to identify a run with.", + "aliases": ["t"] + } + }, + "additionalProperties": true, + "required": ["cypressConfig"], + "examplesFile": "Depending on your testing type, the Cypress executor is configured in different ways. The following are sample configurations that are created via the [cypress-project](/packages/cypress/generators/cypress-project) and [cypress-component-project](/packages/cypress/generators/cypress-component-project) generators.\n\n{% tabs %}\n{% tab label=\"E2E Testing\" %}\n\n```json\n\"targets\": {\n \"e2e\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"apps/app-e2e/cypres.config.ts\",\n \"devServerTarget\": \"my-react-app:serve\",\n \"testingType\": \"e2e\"\n }\n }\n}\n```\n\n{% callout type=\"note\" title=\"API Testing\" %}\nAPI testing with Cypress is the same setup as e2e testing. Just change which `devServerTarget` is used!\n{% /callout %}\n\n### Providing a Base URL\n\nIf `devServerTarget` is provided, the url returned from started the dev server will be passed to cypress as the `baseUrl` option.\n\nDefining a `baseUrl` in the executor options will override the inferred `baseUrl` from the `devServerTarget`.\n\nThe `baseUrl` defined in the Cypress config file is the last value used if no url is found in the `devServerTarget` or executor options.\n\n### Static Serving\n\nWhen running in CI it doesn't make sense to start up a dev server since there aren't changes to watch for.\n\nYou can use [`@nrwl/web:file-server`](/packages/web/executors/file-server) to serve the pre-built static files of your frontend project.\n\nIn some _frontend_ application, add a 'static-serve' target.\n\n```json\n\"serve-static\": {\n \"executor\": \"@nrwl/web:file-server\",\n \"options\":{\n \"buildTarget\": \"frontend:build\"\n }\n}\n```\n\nIn the _e2e_ application add a configuration to change `devServerTarget` to point to the `static-serve` from the _frontend_ application\n\n```json\n\"e2e\": {\n //...\n \"configurations\": {\n \"ci\": {\n \"devServerTarget\": \"frontend:serve-static\"\n }\n }\n}\n```\n\n{% callout type=\"note\" title=\"What about Node projects?\" %}\nThe same can be done for backend node apps with [`@nrwl/js:node` executor](/packages/js/executors/node)\n{% /callout %}\n\n```bash\nnx e2e my-app-e2e --configuration=ci\n```\n\n{% /tab %}\n{% tab label=\"Component Testing\" %}\n\n{% callout type=\"note\" title=\"Cypress Component Testing\" %}\nWhen adding component testing to a project, it's best to use the framework specific generator, instead `cypress-component-project` directly.\n\n- [React component testing](/packages/react/generators/cypress-component-configuration)\n- [Angular component testing](/packages/angular/generators/cypress-component-configuration)\n\n{% /callout %}\n\n```json\n\"targets\": {\n \"component-test\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"apps/app/cypres.config.ts\",\n \"devServerTarget\": \"my-react-app:build\",\n \"testingType\": \"component\",\n \"skipServe\": true\n }\n }\n}\n```\n\nIt's important `skipServe` is set to true. Nx doesn't need to run the `devServerTarget`, Cypress creates its own dev server for component testing.\nInstead, Nx needs to know what build target to create the correct configuration to pass to Cypress, which is why it's still used in component testing.\n\n{% /tab %}\n{% /tabs %}\n\n### Environment Variables\n\nUsing [executor configurations](/recipe/use-executor-configurations#use-executor-configurations) offers flexibility to set environment variables\n\n```json\n\"targets\": {\n \"e2e\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"apps/app-e2e/cypres.config.ts\",\n \"devServerTarget\": \"my-react-app:serve\",\n \"testingType\": \"e2e\"\n },\n \"configurations\": {\n \"qa\": {\n \"env\": {\n \"API_URL\": \"https://api.qa.company.com\"\n }\n },\n \"dev\": {\n \"env\": {\n \"API_URL\": \"http://locahost:3333/api\"\n }\n }\n }\n }\n}\n```\n\nRead more on different ways to use [environment variables for cypress executor](/packages/cypress#environment-variables)\n" + }, + "description": "Run Cypress E2E tests.", + "aliases": [], + "hidden": false, + "path": "/packages/cypress/src/executors/cypress/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/cypress/generators/cypress-component-project.json b/docs/generated/packages/cypress/generators/cypress-component-project.json new file mode 100644 index 0000000000000..8bdaf1b4d8c6c --- /dev/null +++ b/docs/generated/packages/cypress/generators/cypress-component-project.json @@ -0,0 +1,42 @@ +{ + "name": "cypress-component-project", + "factory": "./src/generators/cypress-component-project/cypress-component-project#cypressComponentProject", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxCypressComponentProject", + "cli": "nx", + "title": "Set up Cypress component testing for a project", + "description": "Set up Cypress component test for a project.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/cypress:cypress-component-project --project=my-cool-lib ", + "description": "Add cypress component testing to an existing project named my-cool-lib" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project to add cypress component testing to", + "$default": { "$source": "projectName" }, + "x-prompt": "What project should we add Cypress component testing to?" + }, + "bundler": { + "description": "The Cypress bundler to use.", + "type": "string", + "enum": ["vite", "webpack"], + "x-prompt": "Which Cypress bundler do you want to use for the dev-server?", + "default": "webpack" + } + }, + "required": ["project"], + "examplesFile": "This is a framework-agnostic generator for adding component testing to a project.\n\n```bash\nnx g cypress-component-project --project=my-cool-project\n```\n\nRunning this generator, adds the required files to the specified project without any configurations for Cypress. It's best to use the framework specific generator, instead `cypress-component-project` directly\n\n- [React component testing](/packages/react/generators/cypress-component-configuration)\n- [Angular component testing](/packages/angular/generators/cypress-component-configuration)\n\nA new `component-test` target will be added to the specified project.\n\n```bash\nnx g component-test my-cool-project\n```\n\nRead more about [Cypress Component Testing](/cypress/cypress-component-testing)\n", + "presets": [] + }, + "description": "Set up Cypress Component Test for a project", + "hidden": true, + "implementation": "/packages/cypress/src/generators/cypress-component-project/cypress-component-project#cypressComponentProject.ts", + "aliases": [], + "path": "/packages/cypress/src/generators/cypress-component-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/cypress/generators/cypress-project.json b/docs/generated/packages/cypress/generators/cypress-project.json new file mode 100644 index 0000000000000..724802d7d6bb6 --- /dev/null +++ b/docs/generated/packages/cypress/generators/cypress-project.json @@ -0,0 +1,85 @@ +{ + "name": "cypress-project", + "factory": "./src/generators/cypress-project/cypress-project#cypressProjectGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxCypressProjectGeneratorSchema", + "cli": "nx", + "title": "Create Cypress Configuration for the workspace", + "description": "Create Cypress Configuration for the workspace.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the frontend project to test.", + "$default": { "$source": "projectName" } + }, + "baseUrl": { + "type": "string", + "description": "The address (with the port) which your application is running on." + }, + "name": { + "type": "string", + "description": "Name of the E2E Project.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the e2e project?" + }, + "directory": { + "type": "string", + "description": "A directory where the project is placed." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "js": { + "description": "Generate JavaScript files rather than TypeScript files.", + "type": "boolean", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside workspace.json.", + "type": "boolean" + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "rootProject": { + "description": "Create a application at the root of the workspace", + "type": "boolean", + "default": false, + "hidden": true + }, + "bundler": { + "description": "The Cypress bundler to use.", + "type": "string", + "enum": ["vite", "webpack", "none"], + "x-prompt": "Which Cypress bundler do you want to use?", + "default": "webpack" + } + }, + "required": ["name"], + "examplesFile": "Adding Cypress to an existing application requires two options. The name of the e2e app to create and what project that e2e app is for.\n\n```bash\nnx g cypress-project --name=my-app-e2e --project=my-app\n```\n\nWhen providing `--project` option, the generator will look for the `serve` target in that given project. This allows the [cypress executor](/packages/cypress/executors/cypress) to spin up the project and start the cypress runner.\n\nIf you prefer to not have the project served automatically, you can provide a `--base-url` argument in place of `--project`\n\n```bash\nnx g cypress-project --name=my-app-e2e --base-url=http://localhost:1234\n```\n\n{% callout type=\"note\" title=\"What about API Projects?\" %}\nYou can also run the `cypress-project` generator against API projects like a [Nest API](/packages/nest/generators/application#@nrwl/nest:application).\nIf there is a URL to visit then you can test it with Cypress!\n{% /callout %}\n\n## Using Cypress with Vite.js\n\nNow, you can generate your Cypress project with Vite.js as the bundler:\n\n```bash\nnx g cypress-project --name=my-app-e2e --project=my-app --bundler=vite\n```\n\nThis generator will pass the `bundler` information (`bundler: 'vite'`) to our `nxE2EPreset`, in your project's `cypress.config.ts` file (eg. `my-app-e2e/cypress.config.ts`).\n\n### Customizing the Vite.js configuration\n\nThe `nxE2EPreset` will then use the `bundler` information to generate the correct settings for your Cypress project to use Vite.js. In the background, the way this works is that it's using a custom Vite preprocessor for your files, that's called on the `file:preprocessor` event. If you want to customize this behaviour, you can do so like this in your project's `cypress.config.ts` file:\n\n```ts\nimport { defineConfig } from 'cypress';\nimport { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';\n\nconst config = nxE2EPreset(__filename, { bundler: 'vite' });\nexport default defineConfig({\n e2e: {\n ...config,\n setupNodeEvents(on, config): {\n config.setupNodeEvents(on);\n // Your settings here\n }\n },\n});\n```\n", + "presets": [] + }, + "description": "Add a Cypress E2E Project.", + "hidden": true, + "implementation": "/packages/cypress/src/generators/cypress-project/cypress-project#cypressProjectGenerator.ts", + "aliases": [], + "path": "/packages/cypress/src/generators/cypress-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/cypress/generators/init.json b/docs/generated/packages/cypress/generators/init.json new file mode 100644 index 0000000000000..d02b24999b10e --- /dev/null +++ b/docs/generated/packages/cypress/generators/init.json @@ -0,0 +1,26 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#cypressInitGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxCypressInit", + "cli": "nx", + "title": "Add Cypress Configuration to the workspace", + "description": "Add Cypress Configuration to the workspace.", + "type": "object", + "properties": { + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + } + }, + "presets": [] + }, + "description": "Initialize the `@nrwl/cypress` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/cypress/src/generators/init/init#cypressInitGenerator.ts", + "path": "/packages/cypress/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/cypress/generators/migrate-to-cypress-10.json b/docs/generated/packages/cypress/generators/migrate-to-cypress-10.json new file mode 100644 index 0000000000000..a1394d696c570 --- /dev/null +++ b/docs/generated/packages/cypress/generators/migrate-to-cypress-10.json @@ -0,0 +1,26 @@ +{ + "name": "migrate-to-cypress-10", + "factory": "./src/generators/migrate-to-cypress-ten/migrate-to-cypress-ten#migrateCypressProject", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxCypressMigrateToTen", + "cli": "nx", + "title": "Migrate e2e project to Cypress 10", + "description": "Migrate Cypress e2e project from v8/v9 to Cypress v10.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/cypress:migrate-to-cypress-10", + "description": "Migrate existing cypress projects to Cypress v10" + } + ], + "properties": {}, + "presets": [] + }, + "description": "Migrate existing Cypress e2e projects to Cypress v10", + "hidden": true, + "implementation": "/packages/cypress/src/generators/migrate-to-cypress-ten/migrate-to-cypress-ten#migrateCypressProject.ts", + "aliases": [], + "path": "/packages/cypress/src/generators/migrate-to-cypress-ten/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/cypress/generators/migrate-to-cypress-11.json b/docs/generated/packages/cypress/generators/migrate-to-cypress-11.json new file mode 100644 index 0000000000000..3e1d6c9efc60f --- /dev/null +++ b/docs/generated/packages/cypress/generators/migrate-to-cypress-11.json @@ -0,0 +1,26 @@ +{ + "name": "migrate-to-cypress-11", + "factory": "./src/generators/migrate-to-cypress-11/migrate-to-cypress-11#migrateCypressProject", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxCypressMigrateTo11", + "cli": "nx", + "title": "Migrate e2e project to Cypress 11", + "description": "Migrate Cypress e2e project from v8/v9 to Cypress v11.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/cypress:migrate-to-cypress-11", + "description": "Migrate existing cypress projects to Cypress v11" + } + ], + "properties": {}, + "presets": [] + }, + "description": "Migrate existing Cypress e2e projects to Cypress v11", + "implementation": "/packages/cypress/src/generators/migrate-to-cypress-11/migrate-to-cypress-11#migrateCypressProject.ts", + "aliases": [], + "hidden": false, + "path": "/packages/cypress/src/generators/migrate-to-cypress-11/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/detox.json b/docs/generated/packages/detox.json deleted file mode 100644 index 05083299888e2..0000000000000 --- a/docs/generated/packages/detox.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "detox", - "packageName": "@nrwl/detox", - "description": "The Nx Plugin for Detox contains executors and generators for allowing your workspace to use the powerful Detox integration testing capabilities.", - "root": "/packages/detox", - "source": "/packages/detox/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/detox", - "file": "shared/detox-plugin", - "content": "Detox is gray box end-to-end testing and automation library for mobile apps. It has a lot of great features:\n\n- Cross Platform\n- Runs on Devices\n- Automatically Synchronized\n- Test Runner Independent\n- Debuggable\n\n## Setting Up Detox\n\n### Install applesimutils (Mac only)\n\n[applesimutils](https://github.com/wix/AppleSimulatorUtils) is a collection of utils for Apple simulators.\n\n```sh\nbrew tap wix/brew\nbrew install applesimutils\n```\n\n### Install Jest Globally\n\n```sh\nnpm install -g jest\n```\n\n### Generating Applications\n\nBy default, when creating a mobile application, Nx will use Detox to create the e2e tests project.\n\n```shell\nnx g @nrwl/react-native:app frontend\n```\n\n### Creating a Detox E2E project for an existing project\n\nYou can create a new Detox E2E project for an existing mobile project.\n\nIf the `@nrwl/detox` package is not installed, install the version that matches your `@nrwl/workspace` version.\n\n{% tabs %}\n{%tab label=\"npm\"%}\n\n```sh\n# npm\nnpm install --save-dev @nrwl/detox\n```\n\n{% /tab %}\n{%tab label=\"yarn\"%}\n\n```sh\n# yarn\nyarn add --dev @nrwl/detox\n```\n\n{% /tab %}\n{% /tabs %}\n\nNext, generate an E2E project based on an existing project.\n\n```sh\nnx g @nrwl/detox:app your-app-name-e2e --project=your-app-name\n```\n\nReplace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`.\n\nIn addition, you need to follow [instructions at Detox](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md) to do manual setup for Android files.\n\n## Using Detox\n\n### Testing Applications\n\n- Run `nx test-ios frontend-e2e` to build the iOS app and execute e2e tests with Detox for iOS (Mac only)\n- Run `nx test-android frontend-e2e` to build the Android app and execute e2e tests with Detox for Android\n\nYou can run below commands:\n\n- `nx build-ios frontend-e2e`: build the iOS app (Mac only)\n- `nx build-android frontend-e2e`: build the Android app\n\n### Testing against Prod Build\n\nYou can run your e2e test against a production build:\n\n- `nx test-ios frontend-e2e --prod`: to build the iOS app and execute e2e tests with Detox for iOS with Release configuration (Mac only)\n- `nx test-android frontend-e2e`: rto build the Android app and execute e2e tests with Detox for Android with release build type\n- `nx build-ios frontend-e2e --prod`: build the iOS app using Release configuration (Mac only)\n- `nx build-android frontend-e2e --prod`: build the Android app using release build type\n\n## Configuration\n\n### Using .detoxrc.json\n\nIf you need to fine tune your Detox setup, you can do so by modifying `.detoxrc.json` in the e2e project.\n\n#### Change Testing Simulator/Emulator\n\nFor iOS, in terminal, run `xcrun simctl list` to view a list of simulators on your Mac. To open your active simulator, `run open -a simulator`. In `frontend-e2e/.detoxrc.json`, you could change the simulator under `devices.simulator.device`.\n\nFor Android, in terminal, run `emulator -list-avds` to view a list of emulators installed. To open your emulator, run `emulator -avd `. In `frontend-e2e/.detoxrc.json`, you could change the simulator under `devices.emulator.device`.\n\nIn addition, to override the device name specified in a configuration, you could use `--device-name` option: `nx test-ios --device-name \"iPhone 11\"`. The `device-name` property provides you the ability to test an application run on specific device.\n\n```shell\nnx test-ios frontend-e2e --device-name \"iPhone 11\"\nnx test-android frontend-e2e --device-name \"Pixel_4a_API_30\"\n```\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#detoxInitGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "title": "Add Detox Schematics", - "description": "Add Detox Schematics.", - "type": "object", - "properties": { - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/detox` plugin.", - "hidden": true, - "implementation": "/packages/detox/src/generators/init/init#detoxInitGenerator.ts", - "aliases": [], - "path": "/packages/detox/src/generators/init/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application#detoxApplicationGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "title": "Create Detox Configuration for the workspace", - "description": "Create Detox Configuration for the workspace.", - "type": "object", - "properties": { - "appProject": { - "type": "string", - "description": "Name of the frontend project to be tested.", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the frontend project to test?" - }, - "e2eName": { - "type": "string", - "description": "Name of the E2E Project.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the E2E project?" - }, - "appName": { - "type": "string", - "description": "Name of the app to be tested if different from appProject" - }, - "appDisplayName": { - "type": "string", - "description": "Display name of the app to be tested if different from appProject" - }, - "framework": { - "type": "string", - "description": "App framework to test", - "enum": ["react-native", "expo"], - "x-prompt": "What app framework should detox test?" - }, - "e2eDirectory": { - "type": "string", - "description": "A directory where the project is placed relative to apps directory." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "js": { - "description": "Generate JavaScript files rather than TypeScript files.", - "type": "boolean", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - } - }, - "required": ["e2eName", "appProject", "framework"], - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create a Detox application.", - "implementation": "/packages/detox/src/generators/application/application#detoxApplicationGenerator.ts", - "hidden": false, - "path": "/packages/detox/src/generators/application/schema.json" - } - ], - "executors": [ - { - "name": "build", - "implementation": "/packages/detox/src/executors/build/build.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Run detox build", - "description": "Run detox build options.", - "type": "object", - "cli": "nx", - "properties": { - "detoxConfiguration": { - "type": "string", - "description": "Select a device configuration from your defined configurations, if not supplied, and there's only one configuration, detox will default to it.", - "alias": "C" - }, - "configPath": { - "type": "string", - "description": "Specify Detox config file path. If not supplied, detox searches for `.detoxrc[.js]` or `detox` section in `package.json`.", - "alias": "cp", - "x-completion-type": "file", - "x-completion-glob": ".detoxrc?(.js)" - } - }, - "required": [], - "presets": [] - }, - "description": "Run the command defined in build property of the specified configuration.", - "aliases": [], - "hidden": false, - "path": "/packages/detox/src/executors/build/schema.json" - }, - { - "name": "test", - "implementation": "/packages/detox/src/executors/test/test.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Run detox test", - "description": "Run detox test options.", - "type": "object", - "cli": "nx", - "presets": [ - { - "name": "Run tests", - "keys": ["detoxConfiguration", "loglevel", "reuse"] - } - ], - "properties": { - "detoxConfiguration": { - "type": "string", - "description": "Select a device configuration from your defined configurations, if not supplied, and there's only one configuration, detox will default to it.", - "alias": "C", - "examples": [ - "ios.sim.debug", - "ios.sim.release", - "android.emu.debug", - "android.emu.release" - ] - }, - "buildTarget": { - "type": "string", - "description": "Target which builds the application." - }, - "configPath": { - "type": "string", - "description": "Specify Detox config file path. If not supplied, detox searches for `.detoxrc[.js]` or `detox` section in package.json.", - "alias": "cp", - "x-completion-type": "file", - "x-completion-glob": ".detoxrc?(.js)" - }, - "runnerConfig": { - "type": "string", - "description": "Test runner config file, defaults to `e2e/mocha.opts` for mocha and `e2e/config.json` for Jest.", - "alias": "o" - }, - "deviceName": { - "type": "string", - "description": "Override the device name specified in a configuration. Useful for running a single build configuration on multiple devices.", - "alias": "n" - }, - "loglevel": { - "type": "string", - "enum": ["fatal", "error", "warn", "info", "verbose", "trace"], - "description": "Log level: `fatal`, `error`, `warn`, `info`, `verbose`, `trace`.", - "alias": "l" - }, - "debugSynchronization": { - "type": "boolean", - "description": "Customize how long an action/expectation can take to complete before Detox starts querying the app why it is busy. By default, the app status will be printed if the action takes more than 10s to complete.", - "alias": "d" - }, - "artifactsLocation": { - "type": "string", - "description": "Artifacts (logs, screenshots, etc) root directory.", - "alias": "a" - }, - "recordLogs": { - "type": "string", - "enum": ["failing", "all", "none"], - "description": "Save logs during each test to artifacts directory. Pass `failing` to save logs of failing tests only." - }, - "takeScreenshots": { - "type": "string", - "enum": ["manual", "failing", "all", "none"], - "description": "Save screenshots before and after each test to artifacts directory. Pass `failing` to save screenshots of failing tests only. " - }, - "recordVideos": { - "type": "string", - "enum": ["failing", "all", "none"], - "description": "Save screen recordings of each test to artifacts directory. Pass `failing` to save recordings of failing tests only." - }, - "recordPerformance": { - "type": "string", - "enum": ["all", "none"], - "description": "[iOS Only] Save Detox Instruments performance recordings of each test to artifacts directory." - }, - "recordTimeline": { - "type": "string", - "enum": ["all", "none"], - "description": "[Jest Only] Record tests and events timeline, for visual display on the `chrome://tracing` tool." - }, - "captureViewHierarchy": { - "type": "string", - "enum": ["enabled", "disabled"], - "description": "[iOS Only] Capture `*.uihierarchy` snapshots on view action errors and `device.captureViewHierarchy()` calls." - }, - "retries": { - "type": "number", - "description": "[Jest Circus Only] Re-spawn the test runner for individual failing suite files until they pass, or `` times at least." - }, - "reuse": { - "type": "boolean", - "description": "Reuse existing installed app (do not delete + reinstall) for a faster run.", - "default": true - }, - "cleanup": { - "type": "boolean", - "description": "Shutdown simulator when test is over, useful for CI scripts, to make sure detox exists cleanly with no residue" - }, - "workers": { - "type": "number", - "description": "Specifies number of workers the test runner should spawn, requires a test runner with parallel execution support (Detox CLI currently supports Jest)." - }, - "jestReportSpecs": { - "type": "boolean", - "description": "[Jest Only] Whether to output logs per each running spec, in real-time. By default, disabled with multiple workers." - }, - "headless": { - "type": "boolean", - "description": "Android Only] Launch Emulator in headless mode. Useful when running on CI." - }, - "gpu": { - "type": "boolean", - "description": "[Android Only] Launch Emulator with the specific `-gpu [gpu mode]` parameter." - }, - "deviceLaunchArgs": { - "type": "string", - "description": "A list of passthrough-arguments to use when (if) devices (Android emulator / iOS simulator) are launched by Detox." - }, - "appLaunchArgs": { - "type": "number", - "description": "Custom arguments to pass (through) onto the app every time it is launched." - }, - "noColor": { - "type": "boolean", - "description": "Disable colors in log output" - }, - "useCustomLogger": { - "type": "boolean", - "description": "Use Detox' custom console-logging implementation, for logging Detox (non-device) logs. Disabling will fallback to Node.js / test-runner's implementation (e.g. Jest / Mocha)." - }, - "forceAdbInstall": { - "type": "boolean", - "description": "Due to problems with the adb install command on Android, Detox resorts to a different scheme for install APK's. Setting true will disable that and force usage of `adb install`, instead." - }, - "inspectBrk": { - "type": "boolean", - "description": "Uses node's `--inspect-brk` flag to let users debug the jest/mocha test runner" - } - }, - "required": ["detoxConfiguration"] - }, - "description": "Initiating your detox test suite.", - "aliases": [], - "hidden": false, - "path": "/packages/detox/src/executors/test/schema.json" - } - ] -} diff --git a/docs/generated/packages/detox/documents/overview.md b/docs/generated/packages/detox/documents/overview.md new file mode 100644 index 0000000000000..91ba3f1442ffb --- /dev/null +++ b/docs/generated/packages/detox/documents/overview.md @@ -0,0 +1,107 @@ +Detox is gray box end-to-end testing and automation library for mobile apps. It has a lot of great features: + +- Cross Platform +- Runs on Devices +- Automatically Synchronized +- Test Runner Independent +- Debuggable + +## Setting Up Detox + +### Install applesimutils (Mac only) + +[applesimutils](https://github.com/wix/AppleSimulatorUtils) is a collection of utils for Apple simulators. + +```sh +brew tap wix/brew +brew install applesimutils +``` + +### Install Jest Globally + +```sh +npm install -g jest +``` + +### Generating Applications + +By default, when creating a mobile application, Nx will use Detox to create the e2e tests project. + +```shell +nx g @nrwl/react-native:app frontend +``` + +### Creating a Detox E2E project for an existing project + +You can create a new Detox E2E project for an existing mobile project. + +If the `@nrwl/detox` package is not installed, install the version that matches your `@nrwl/workspace` version. + +{% tabs %} +{%tab label="npm"%} + +```sh +# npm +npm install --save-dev @nrwl/detox +``` + +{% /tab %} +{%tab label="yarn"%} + +```sh +# yarn +yarn add --dev @nrwl/detox +``` + +{% /tab %} +{% /tabs %} + +Next, generate an E2E project based on an existing project. + +```sh +nx g @nrwl/detox:app your-app-name-e2e --project=your-app-name +``` + +Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`. + +In addition, you need to follow [instructions at Detox](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md) to do manual setup for Android files. + +## Using Detox + +### Testing Applications + +- Run `nx test-ios frontend-e2e` to build the iOS app and execute e2e tests with Detox for iOS (Mac only) +- Run `nx test-android frontend-e2e` to build the Android app and execute e2e tests with Detox for Android + +You can run below commands: + +- `nx build-ios frontend-e2e`: build the iOS app (Mac only) +- `nx build-android frontend-e2e`: build the Android app + +### Testing against Prod Build + +You can run your e2e test against a production build: + +- `nx test-ios frontend-e2e --prod`: to build the iOS app and execute e2e tests with Detox for iOS with Release configuration (Mac only) +- `nx test-android frontend-e2e`: rto build the Android app and execute e2e tests with Detox for Android with release build type +- `nx build-ios frontend-e2e --prod`: build the iOS app using Release configuration (Mac only) +- `nx build-android frontend-e2e --prod`: build the Android app using release build type + +## Configuration + +### Using .detoxrc.json + +If you need to fine tune your Detox setup, you can do so by modifying `.detoxrc.json` in the e2e project. + +#### Change Testing Simulator/Emulator + +For iOS, in terminal, run `xcrun simctl list` to view a list of simulators on your Mac. To open your active simulator, `run open -a simulator`. In `frontend-e2e/.detoxrc.json`, you could change the simulator under `devices.simulator.device`. + +For Android, in terminal, run `emulator -list-avds` to view a list of emulators installed. To open your emulator, run `emulator -avd `. In `frontend-e2e/.detoxrc.json`, you could change the simulator under `devices.emulator.device`. + +In addition, to override the device name specified in a configuration, you could use `--device-name` option: `nx test-ios --device-name "iPhone 11"`. The `device-name` property provides you the ability to test an application run on specific device. + +```shell +nx test-ios frontend-e2e --device-name "iPhone 11" +nx test-android frontend-e2e --device-name "Pixel_4a_API_30" +``` diff --git a/docs/generated/packages/detox/executors/build.json b/docs/generated/packages/detox/executors/build.json new file mode 100644 index 0000000000000..ac5e12d0abd3f --- /dev/null +++ b/docs/generated/packages/detox/executors/build.json @@ -0,0 +1,33 @@ +{ + "name": "build", + "implementation": "/packages/detox/src/executors/build/build.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Run detox build", + "description": "Run detox build options.", + "type": "object", + "cli": "nx", + "properties": { + "detoxConfiguration": { + "type": "string", + "description": "Select a device configuration from your defined configurations, if not supplied, and there's only one configuration, detox will default to it.", + "alias": "C" + }, + "configPath": { + "type": "string", + "description": "Specify Detox config file path. If not supplied, detox searches for `.detoxrc[.js]` or `detox` section in `package.json`.", + "alias": "cp", + "x-completion-type": "file", + "x-completion-glob": ".detoxrc?(.js)" + } + }, + "required": [], + "presets": [] + }, + "description": "Run the command defined in build property of the specified configuration.", + "aliases": [], + "hidden": false, + "path": "/packages/detox/src/executors/build/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/detox/executors/test.json b/docs/generated/packages/detox/executors/test.json new file mode 100644 index 0000000000000..57ad457f7c530 --- /dev/null +++ b/docs/generated/packages/detox/executors/test.json @@ -0,0 +1,157 @@ +{ + "name": "test", + "implementation": "/packages/detox/src/executors/test/test.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Run detox test", + "description": "Run detox test options.", + "type": "object", + "cli": "nx", + "presets": [ + { + "name": "Run tests", + "keys": ["detoxConfiguration", "loglevel", "reuse"] + } + ], + "properties": { + "detoxConfiguration": { + "type": "string", + "description": "Select a device configuration from your defined configurations, if not supplied, and there's only one configuration, detox will default to it.", + "alias": "C", + "examples": [ + "ios.sim.debug", + "ios.sim.release", + "android.emu.debug", + "android.emu.release" + ] + }, + "buildTarget": { + "type": "string", + "description": "Target which builds the application." + }, + "configPath": { + "type": "string", + "description": "Specify Detox config file path. If not supplied, detox searches for `.detoxrc[.js]` or `detox` section in package.json.", + "alias": "cp", + "x-completion-type": "file", + "x-completion-glob": ".detoxrc?(.js)" + }, + "runnerConfig": { + "type": "string", + "description": "Test runner config file, defaults to `e2e/mocha.opts` for mocha and `e2e/config.json` for Jest.", + "alias": "o" + }, + "deviceName": { + "type": "string", + "description": "Override the device name specified in a configuration. Useful for running a single build configuration on multiple devices.", + "alias": "n" + }, + "loglevel": { + "type": "string", + "enum": ["fatal", "error", "warn", "info", "verbose", "trace"], + "description": "Log level: `fatal`, `error`, `warn`, `info`, `verbose`, `trace`.", + "alias": "l" + }, + "debugSynchronization": { + "type": "boolean", + "description": "Customize how long an action/expectation can take to complete before Detox starts querying the app why it is busy. By default, the app status will be printed if the action takes more than 10s to complete.", + "alias": "d" + }, + "artifactsLocation": { + "type": "string", + "description": "Artifacts (logs, screenshots, etc) root directory.", + "alias": "a" + }, + "recordLogs": { + "type": "string", + "enum": ["failing", "all", "none"], + "description": "Save logs during each test to artifacts directory. Pass `failing` to save logs of failing tests only." + }, + "takeScreenshots": { + "type": "string", + "enum": ["manual", "failing", "all", "none"], + "description": "Save screenshots before and after each test to artifacts directory. Pass `failing` to save screenshots of failing tests only. " + }, + "recordVideos": { + "type": "string", + "enum": ["failing", "all", "none"], + "description": "Save screen recordings of each test to artifacts directory. Pass `failing` to save recordings of failing tests only." + }, + "recordPerformance": { + "type": "string", + "enum": ["all", "none"], + "description": "[iOS Only] Save Detox Instruments performance recordings of each test to artifacts directory." + }, + "recordTimeline": { + "type": "string", + "enum": ["all", "none"], + "description": "[Jest Only] Record tests and events timeline, for visual display on the `chrome://tracing` tool." + }, + "captureViewHierarchy": { + "type": "string", + "enum": ["enabled", "disabled"], + "description": "[iOS Only] Capture `*.uihierarchy` snapshots on view action errors and `device.captureViewHierarchy()` calls." + }, + "retries": { + "type": "number", + "description": "[Jest Circus Only] Re-spawn the test runner for individual failing suite files until they pass, or `` times at least." + }, + "reuse": { + "type": "boolean", + "description": "Reuse existing installed app (do not delete + reinstall) for a faster run.", + "default": true + }, + "cleanup": { + "type": "boolean", + "description": "Shutdown simulator when test is over, useful for CI scripts, to make sure detox exists cleanly with no residue" + }, + "workers": { + "type": "number", + "description": "Specifies number of workers the test runner should spawn, requires a test runner with parallel execution support (Detox CLI currently supports Jest)." + }, + "jestReportSpecs": { + "type": "boolean", + "description": "[Jest Only] Whether to output logs per each running spec, in real-time. By default, disabled with multiple workers." + }, + "headless": { + "type": "boolean", + "description": "Android Only] Launch Emulator in headless mode. Useful when running on CI." + }, + "gpu": { + "type": "boolean", + "description": "[Android Only] Launch Emulator with the specific `-gpu [gpu mode]` parameter." + }, + "deviceLaunchArgs": { + "type": "string", + "description": "A list of passthrough-arguments to use when (if) devices (Android emulator / iOS simulator) are launched by Detox." + }, + "appLaunchArgs": { + "type": "number", + "description": "Custom arguments to pass (through) onto the app every time it is launched." + }, + "noColor": { + "type": "boolean", + "description": "Disable colors in log output" + }, + "useCustomLogger": { + "type": "boolean", + "description": "Use Detox' custom console-logging implementation, for logging Detox (non-device) logs. Disabling will fallback to Node.js / test-runner's implementation (e.g. Jest / Mocha)." + }, + "forceAdbInstall": { + "type": "boolean", + "description": "Due to problems with the adb install command on Android, Detox resorts to a different scheme for install APK's. Setting true will disable that and force usage of `adb install`, instead." + }, + "inspectBrk": { + "type": "boolean", + "description": "Uses node's `--inspect-brk` flag to let users debug the jest/mocha test runner" + } + }, + "required": ["detoxConfiguration"] + }, + "description": "Initiating your detox test suite.", + "aliases": [], + "hidden": false, + "path": "/packages/detox/src/executors/test/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/detox/generators/application.json b/docs/generated/packages/detox/generators/application.json new file mode 100644 index 0000000000000..e4360e9f1bff0 --- /dev/null +++ b/docs/generated/packages/detox/generators/application.json @@ -0,0 +1,72 @@ +{ + "name": "application", + "factory": "./src/generators/application/application#detoxApplicationGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "title": "Create Detox Configuration for the workspace", + "description": "Create Detox Configuration for the workspace.", + "type": "object", + "properties": { + "appProject": { + "type": "string", + "description": "Name of the frontend project to be tested.", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the frontend project to test?" + }, + "e2eName": { + "type": "string", + "description": "Name of the E2E Project.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the E2E project?" + }, + "appName": { + "type": "string", + "description": "Name of the app to be tested if different from appProject" + }, + "appDisplayName": { + "type": "string", + "description": "Display name of the app to be tested if different from appProject" + }, + "framework": { + "type": "string", + "description": "App framework to test", + "enum": ["react-native", "expo"], + "x-prompt": "What app framework should detox test?" + }, + "e2eDirectory": { + "type": "string", + "description": "A directory where the project is placed relative to apps directory." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "js": { + "description": "Generate JavaScript files rather than TypeScript files.", + "type": "boolean", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + } + }, + "required": ["e2eName", "appProject", "framework"], + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create a Detox application.", + "implementation": "/packages/detox/src/generators/application/application#detoxApplicationGenerator.ts", + "hidden": false, + "path": "/packages/detox/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/detox/generators/init.json b/docs/generated/packages/detox/generators/init.json new file mode 100644 index 0000000000000..8658f7fbda889 --- /dev/null +++ b/docs/generated/packages/detox/generators/init.json @@ -0,0 +1,25 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#detoxInitGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "title": "Add Detox Schematics", + "description": "Add Detox Schematics.", + "type": "object", + "properties": { + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/detox` plugin.", + "hidden": true, + "implementation": "/packages/detox/src/generators/init/init#detoxInitGenerator.ts", + "aliases": [], + "path": "/packages/detox/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/devkit.json b/docs/generated/packages/devkit.json deleted file mode 100644 index c5700fb4cb026..0000000000000 --- a/docs/generated/packages/devkit.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "devkit", - "packageName": "@nrwl/devkit", - "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more.", - "root": "/packages/devkit", - "source": "/packages/devkit/src", - "documentation": [ - { - "id": "index", - "name": "Overview", - "file": "generated/devkit/index", - "content": "# Module: index\n\nThe Nx Devkit is the underlying technology used to customize Nx to support\ndifferent technologies and custom use-cases. It contains many utility\nfunctions for reading and writing files, updating configuration,\nworking with Abstract Syntax Trees(ASTs), and more.\n\nAs with most things in Nx, the core of Nx Devkit is very simple.\nIt only uses language primitives and immutable objects\n(the tree being the only exception).\n\n## Table of contents\n\n### Project Graph Enumerations\n\n- [DependencyType](../../devkit/index#dependencytype)\n\n### Utils Enumerations\n\n- [ChangeType](../../devkit/index#changetype)\n\n### Project Graph Classes\n\n- [ProjectGraphBuilder](../../devkit/index#projectgraphbuilder)\n\n### Utils Classes\n\n- [Hasher](../../devkit/index#hasher)\n\n### Workspace Classes\n\n- [Workspaces](../../devkit/index#workspaces)\n\n### Commands Interfaces\n\n- [Target](../../devkit/index#target)\n\n### Other Interfaces\n\n- [NxPlugin](../../devkit/index#nxplugin)\n\n### Project Graph Interfaces\n\n- [FileData](../../devkit/index#filedata)\n- [ProjectFileMap](../../devkit/index#projectfilemap)\n- [ProjectGraph](../../devkit/index#projectgraph)\n- [ProjectGraphDependency](../../devkit/index#projectgraphdependency)\n- [ProjectGraphExternalNode](../../devkit/index#projectgraphexternalnode)\n- [ProjectGraphProcessorContext](../../devkit/index#projectgraphprocessorcontext)\n- [ProjectGraphProjectNode](../../devkit/index#projectgraphprojectnode)\n- [ProjectGraphV4](../../devkit/index#projectgraphv4)\n\n### Tree Interfaces\n\n- [FileChange](../../devkit/index#filechange)\n- [Tree](../../devkit/index#tree)\n\n### Utils Interfaces\n\n- [DefaultTasksRunnerOptions](../../devkit/index#defaulttasksrunneroptions)\n- [Hash](../../devkit/index#hash)\n- [JsonParseOptions](../../devkit/index#jsonparseoptions)\n- [JsonSerializeOptions](../../devkit/index#jsonserializeoptions)\n- [ModuleFederationConfig](../../devkit/index#modulefederationconfig)\n- [RemoteCache](../../devkit/index#remotecache)\n- [SharedLibraryConfig](../../devkit/index#sharedlibraryconfig)\n- [StringDeletion](../../devkit/index#stringdeletion)\n- [StringInsertion](../../devkit/index#stringinsertion)\n\n### Workspace Interfaces\n\n- [ExecutorContext](../../devkit/index#executorcontext)\n- [ExecutorsJson](../../devkit/index#executorsjson)\n- [GeneratorsJson](../../devkit/index#generatorsjson)\n- [HasherContext](../../devkit/index#hashercontext)\n- [ImplicitJsonSubsetDependency](../../devkit/index#implicitjsonsubsetdependency)\n- [MigrationsJson](../../devkit/index#migrationsjson)\n- [NxAffectedConfig](../../devkit/index#nxaffectedconfig)\n- [NxJsonConfiguration](../../devkit/index#nxjsonconfiguration)\n- [ProjectConfiguration](../../devkit/index#projectconfiguration)\n- [ProjectsConfigurations](../../devkit/index#projectsconfigurations)\n- [TargetConfiguration](../../devkit/index#targetconfiguration)\n- [TargetDependencyConfig](../../devkit/index#targetdependencyconfig)\n- [Task](../../devkit/index#task)\n- [TaskGraph](../../devkit/index#taskgraph)\n- [Workspace](../../devkit/index#workspace)\n\n### Generators Type aliases\n\n- [WorkspaceConfiguration](../../devkit/index#workspaceconfiguration)\n\n### Other Type aliases\n\n- [ProjectTargetConfigurator](../../devkit/index#projecttargetconfigurator)\n\n### Package Manager Type aliases\n\n- [PackageManager](../../devkit/index#packagemanager)\n\n### Project Graph Type aliases\n\n- [ProjectGraphNode](../../devkit/index#projectgraphnode)\n\n### Utils Type aliases\n\n- [AdditionalSharedConfig](../../devkit/index#additionalsharedconfig)\n- [ModuleFederationLibrary](../../devkit/index#modulefederationlibrary)\n- [Remotes](../../devkit/index#remotes)\n- [SharedFunction](../../devkit/index#sharedfunction)\n- [SharedWorkspaceLibraryConfig](../../devkit/index#sharedworkspacelibraryconfig)\n- [StringChange](../../devkit/index#stringchange)\n- [WorkspaceLibrary](../../devkit/index#workspacelibrary)\n- [WorkspaceLibrarySecondaryEntryPoint](../../devkit/index#workspacelibrarysecondaryentrypoint)\n\n### Workspace Type aliases\n\n- [CustomHasher](../../devkit/index#customhasher)\n- [Executor](../../devkit/index#executor)\n- [Generator](../../devkit/index#generator)\n- [GeneratorCallback](../../devkit/index#generatorcallback)\n- [ImplicitDependencyEntry](../../devkit/index#implicitdependencyentry)\n- [ProjectType](../../devkit/index#projecttype)\n- [TaskGraphExecutor](../../devkit/index#taskgraphexecutor)\n- [WorkspaceJsonConfiguration](../../devkit/index#workspacejsonconfiguration)\n\n### Logger Variables\n\n- [logger](../../devkit/index#logger)\n\n### Utils Variables\n\n- [appRootPath](../../devkit/index#approotpath)\n- [cacheDir](../../devkit/index#cachedir)\n- [output](../../devkit/index#output)\n- [workspaceRoot](../../devkit/index#workspaceroot)\n\n### Functions\n\n- [addDependenciesToPackageJson](../../devkit/index#adddependenciestopackagejson)\n- [addProjectConfiguration](../../devkit/index#addprojectconfiguration)\n- [applyAdditionalShared](../../devkit/index#applyadditionalshared)\n- [applyChangesToString](../../devkit/index#applychangestostring)\n- [applySharedFunction](../../devkit/index#applysharedfunction)\n- [convertNxExecutor](../../devkit/index#convertnxexecutor)\n- [convertNxGenerator](../../devkit/index#convertnxgenerator)\n- [createLockFile](../../devkit/index#createlockfile)\n- [createPackageJson](../../devkit/index#createpackagejson)\n- [createProjectGraphAsync](../../devkit/index#createprojectgraphasync)\n- [defaultTasksRunner](../../devkit/index#defaulttasksrunner)\n- [detectPackageManager](../../devkit/index#detectpackagemanager)\n- [detectWorkspaceScope](../../devkit/index#detectworkspacescope)\n- [ensurePackage](../../devkit/index#ensurepackage)\n- [extractLayoutDirectory](../../devkit/index#extractlayoutdirectory)\n- [formatFiles](../../devkit/index#formatfiles)\n- [generateFiles](../../devkit/index#generatefiles)\n- [getDependentPackagesForProject](../../devkit/index#getdependentpackagesforproject)\n- [getImportPath](../../devkit/index#getimportpath)\n- [getNpmPackageSharedConfig](../../devkit/index#getnpmpackagesharedconfig)\n- [getOutputsForTargetAndConfiguration](../../devkit/index#getoutputsfortargetandconfiguration)\n- [getPackageManagerCommand](../../devkit/index#getpackagemanagercommand)\n- [getPackageManagerVersion](../../devkit/index#getpackagemanagerversion)\n- [getProjects](../../devkit/index#getprojects)\n- [getWorkspaceLayout](../../devkit/index#getworkspacelayout)\n- [getWorkspacePath](../../devkit/index#getworkspacepath)\n- [installPackagesTask](../../devkit/index#installpackagestask)\n- [isStandaloneProject](../../devkit/index#isstandaloneproject)\n- [joinPathFragments](../../devkit/index#joinpathfragments)\n- [mapRemotes](../../devkit/index#mapremotes)\n- [mapRemotesForSSR](../../devkit/index#mapremotesforssr)\n- [moveFilesToNewDirectory](../../devkit/index#movefilestonewdirectory)\n- [names](../../devkit/index#names)\n- [normalizePath](../../devkit/index#normalizepath)\n- [offsetFromRoot](../../devkit/index#offsetfromroot)\n- [parseJson](../../devkit/index#parsejson)\n- [parseTargetString](../../devkit/index#parsetargetstring)\n- [readAllWorkspaceConfiguration](../../devkit/index#readallworkspaceconfiguration)\n- [readCachedProjectGraph](../../devkit/index#readcachedprojectgraph)\n- [readJson](../../devkit/index#readjson)\n- [readJsonFile](../../devkit/index#readjsonfile)\n- [readNxJson](../../devkit/index#readnxjson)\n- [readProjectConfiguration](../../devkit/index#readprojectconfiguration)\n- [readRootPackageJson](../../devkit/index#readrootpackagejson)\n- [readTargetOptions](../../devkit/index#readtargetoptions)\n- [readWorkspaceConfiguration](../../devkit/index#readworkspaceconfiguration)\n- [removeDependenciesFromPackageJson](../../devkit/index#removedependenciesfrompackagejson)\n- [removeProjectConfiguration](../../devkit/index#removeprojectconfiguration)\n- [reverse](../../devkit/index#reverse)\n- [runExecutor](../../devkit/index#runexecutor)\n- [serializeJson](../../devkit/index#serializejson)\n- [sharePackages](../../devkit/index#sharepackages)\n- [shareWorkspaceLibraries](../../devkit/index#shareworkspacelibraries)\n- [stripIndents](../../devkit/index#stripindents)\n- [stripJsonComments](../../devkit/index#stripjsoncomments)\n- [targetToTargetString](../../devkit/index#targettotargetstring)\n- [toJS](../../devkit/index#tojs)\n- [updateJson](../../devkit/index#updatejson)\n- [updateProjectConfiguration](../../devkit/index#updateprojectconfiguration)\n- [updateTsConfigsToJs](../../devkit/index#updatetsconfigstojs)\n- [updateWorkspaceConfiguration](../../devkit/index#updateworkspaceconfiguration)\n- [visitNotIgnoredFiles](../../devkit/index#visitnotignoredfiles)\n- [workspaceLayout](../../devkit/index#workspacelayout)\n- [writeJson](../../devkit/index#writejson)\n- [writeJsonFile](../../devkit/index#writejsonfile)\n\n## Project Graph Enumerations\n\n### DependencyType\n\n• **DependencyType**: `Object`\n\n---\n\n## Utils Enumerations\n\n### ChangeType\n\n• **ChangeType**: `Object`\n\n## Project Graph Classes\n\n### ProjectGraphBuilder\n\n• **ProjectGraphBuilder**: `Object`\n\n---\n\n## Utils Classes\n\n### Hasher\n\n• **Hasher**: `Object`\n\n---\n\n## Workspace Classes\n\n### Workspaces\n\n• **Workspaces**: `Object`\n\n## Commands Interfaces\n\n### Target\n\n• **Target**: `Object`\n\n---\n\n## Other Interfaces\n\n### NxPlugin\n\n• **NxPlugin**: `Object`\n\nA plugin for Nx\n\n---\n\n## Project Graph Interfaces\n\n### FileData\n\n• **FileData**: `Object`\n\n---\n\n### ProjectFileMap\n\n• **ProjectFileMap**: `Object`\n\n---\n\n### ProjectGraph\n\n• **ProjectGraph**<`T`\\>: `Object`\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n---\n\n### ProjectGraphDependency\n\n• **ProjectGraphDependency**: `Object`\n\n---\n\n### ProjectGraphExternalNode\n\n• **ProjectGraphExternalNode**: `Object`\n\n---\n\n### ProjectGraphProcessorContext\n\n• **ProjectGraphProcessorContext**: `Object`\n\n---\n\n### ProjectGraphProjectNode\n\n• **ProjectGraphProjectNode**<`T`\\>: `Object`\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n---\n\n### ProjectGraphV4\n\n• **ProjectGraphV4**<`T`\\>: `Object`\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n---\n\n## Tree Interfaces\n\n### FileChange\n\n• **FileChange**: `Object`\n\n---\n\n### Tree\n\n• **Tree**: `Object`\n\n---\n\n## Utils Interfaces\n\n### DefaultTasksRunnerOptions\n\n• **DefaultTasksRunnerOptions**: `Object`\n\n---\n\n### Hash\n\n• **Hash**: `Object`\n\n---\n\n### JsonParseOptions\n\n• **JsonParseOptions**: `Object`\n\n---\n\n### JsonSerializeOptions\n\n• **JsonSerializeOptions**: `Object`\n\n---\n\n### ModuleFederationConfig\n\n• **ModuleFederationConfig**: `Object`\n\n---\n\n### RemoteCache\n\n• **RemoteCache**: `Object`\n\n---\n\n### SharedLibraryConfig\n\n• **SharedLibraryConfig**: `Object`\n\n---\n\n### StringDeletion\n\n• **StringDeletion**: `Object`\n\n---\n\n### StringInsertion\n\n• **StringInsertion**: `Object`\n\n---\n\n## Workspace Interfaces\n\n### ExecutorContext\n\n• **ExecutorContext**: `Object`\n\n---\n\n### ExecutorsJson\n\n• **ExecutorsJson**: `Object`\n\n---\n\n### GeneratorsJson\n\n• **GeneratorsJson**: `Object`\n\n---\n\n### HasherContext\n\n• **HasherContext**: `Object`\n\n---\n\n### ImplicitJsonSubsetDependency\n\n• **ImplicitJsonSubsetDependency**<`T`\\>: `Object`\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :------------------ |\n| `T` | `\"*\"` \\| `string`[] |\n\n---\n\n### MigrationsJson\n\n• **MigrationsJson**: `Object`\n\n---\n\n### NxAffectedConfig\n\n• **NxAffectedConfig**: `Object`\n\n---\n\n### NxJsonConfiguration\n\n• **NxJsonConfiguration**<`T`\\>: `Object`\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :------------------ |\n| `T` | `\"*\"` \\| `string`[] |\n\n---\n\n### ProjectConfiguration\n\n• **ProjectConfiguration**: `Object`\n\n---\n\n### ProjectsConfigurations\n\n• **ProjectsConfigurations**: `Object`\n\n---\n\n### TargetConfiguration\n\n• **TargetConfiguration**<`T`\\>: `Object`\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n---\n\n### TargetDependencyConfig\n\n• **TargetDependencyConfig**: `Object`\n\n---\n\n### Task\n\n• **Task**: `Object`\n\n---\n\n### TaskGraph\n\n• **TaskGraph**: `Object`\n\n---\n\n### Workspace\n\n• **Workspace**: `Object`\n\n## Generators Type aliases\n\n### WorkspaceConfiguration\n\nƬ **WorkspaceConfiguration**: `Omit`<[`ProjectsConfigurations`](../../devkit/index#projectsconfigurations), `\"projects\"`\\> & `Partial`<[`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)\\>\n\n---\n\n## Other Type aliases\n\n### ProjectTargetConfigurator\n\nƬ **ProjectTargetConfigurator**: (`file`: `string`) => `Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\\>\n\n#### Type declaration\n\n▸ (`file`): `Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\\>\n\n##### Parameters\n\n| Name | Type |\n| :----- | :------- |\n| `file` | `string` |\n\n##### Returns\n\n`Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\\>\n\n---\n\n## Package Manager Type aliases\n\n### PackageManager\n\nƬ **PackageManager**: `\"yarn\"` \\| `\"pnpm\"` \\| `\"npm\"`\n\n---\n\n## Project Graph Type aliases\n\n### ProjectGraphNode\n\nƬ **ProjectGraphNode**<`T`\\>: [`ProjectGraphProjectNode`](../../devkit/index#projectgraphprojectnode)<`T`\\> \\| [`ProjectGraphExternalNode`](../../devkit/index#projectgraphexternalnode)\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n---\n\n## Utils Type aliases\n\n### AdditionalSharedConfig\n\nƬ **AdditionalSharedConfig**: (`string` \\| [libraryName: string, sharedConfig: SharedLibraryConfig] \\| { `libraryName`: `string` ; `sharedConfig`: [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) })[]\n\n---\n\n### ModuleFederationLibrary\n\nƬ **ModuleFederationLibrary**: `Object`\n\n#### Type declaration\n\n| Name | Type |\n| :----- | :------- |\n| `name` | `string` |\n| `type` | `string` |\n\n---\n\n### Remotes\n\nƬ **Remotes**: `string`[] \\| [remoteName: string, remoteUrl: string][]\n\n---\n\n### SharedFunction\n\nƬ **SharedFunction**: (`libraryName`: `string`, `sharedConfig`: [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)) => `undefined` \\| `false` \\| [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\n\n#### Type declaration\n\n▸ (`libraryName`, `sharedConfig`): `undefined` \\| `false` \\| [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\n\n##### Parameters\n\n| Name | Type |\n| :------------- | :-------------------------------------------------------------- |\n| `libraryName` | `string` |\n| `sharedConfig` | [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) |\n\n##### Returns\n\n`undefined` \\| `false` \\| [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\n\n---\n\n### SharedWorkspaceLibraryConfig\n\nƬ **SharedWorkspaceLibraryConfig**: `Object`\n\n#### Type declaration\n\n| Name | Type |\n| :--------------------- | :------------------------------------------------------------------------------------------------------------ |\n| `getAliases` | () => `Record`<`string`, `string`\\> |\n| `getLibraries` | (`eager?`: `boolean`) => `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\\> |\n| `getReplacementPlugin` | () => `NormalModuleReplacementPlugin` |\n\n---\n\n### StringChange\n\nƬ **StringChange**: [`StringInsertion`](../../devkit/index#stringinsertion) \\| [`StringDeletion`](../../devkit/index#stringdeletion)\n\n---\n\n### WorkspaceLibrary\n\nƬ **WorkspaceLibrary**: `Object`\n\n#### Type declaration\n\n| Name | Type |\n| :---------- | :---------------------- |\n| `importKey` | `string` \\| `undefined` |\n| `name` | `string` |\n| `root` | `string` |\n\n---\n\n### WorkspaceLibrarySecondaryEntryPoint\n\nƬ **WorkspaceLibrarySecondaryEntryPoint**: `Object`\n\n#### Type declaration\n\n| Name | Type |\n| :----- | :------- |\n| `name` | `string` |\n| `path` | `string` |\n\n---\n\n## Workspace Type aliases\n\n### CustomHasher\n\nƬ **CustomHasher**: (`task`: [`Task`](../../devkit/index#task), `context`: [`HasherContext`](../../devkit/index#hashercontext)) => `Promise`<[`Hash`](../../devkit/index#hash)\\>\n\n#### Type declaration\n\n▸ (`task`, `context`): `Promise`<[`Hash`](../../devkit/index#hash)\\>\n\n##### Parameters\n\n| Name | Type |\n| :-------- | :-------------------------------------------------- |\n| `task` | [`Task`](../../devkit/index#task) |\n| `context` | [`HasherContext`](../../devkit/index#hashercontext) |\n\n##### Returns\n\n`Promise`<[`Hash`](../../devkit/index#hash)\\>\n\n---\n\n### Executor\n\nƬ **Executor**<`T`\\>: (`options`: `T`, `context`: [`ExecutorContext`](../../devkit/index#executorcontext)) => `Promise`<`Object`\\> \\| `AsyncIterableIterator`<`Object`\\>\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n#### Type declaration\n\n▸ (`options`, `context`): `Promise`<`Object`\\> \\| `AsyncIterableIterator`<`Object`\\>\n\nImplementation of a target of a project\n\n##### Parameters\n\n| Name | Type |\n| :-------- | :------------------------------------------------------ |\n| `options` | `T` |\n| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |\n\n##### Returns\n\n`Promise`<`Object`\\> \\| `AsyncIterableIterator`<`Object`\\>\n\n---\n\n### Generator\n\nƬ **Generator**<`T`\\>: (`tree`: `any`, `schema`: `T`) => `void` \\| [`GeneratorCallback`](../../devkit/index#generatorcallback) \\| `Promise`<`void` \\| [`GeneratorCallback`](../../devkit/index#generatorcallback)\\>\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :-------- |\n| `T` | `unknown` |\n\n#### Type declaration\n\n▸ (`tree`, `schema`): `void` \\| [`GeneratorCallback`](../../devkit/index#generatorcallback) \\| `Promise`<`void` \\| [`GeneratorCallback`](../../devkit/index#generatorcallback)\\>\n\nA function that schedules updates to the filesystem to be done atomically\n\n##### Parameters\n\n| Name | Type |\n| :------- | :---- |\n| `tree` | `any` |\n| `schema` | `T` |\n\n##### Returns\n\n`void` \\| [`GeneratorCallback`](../../devkit/index#generatorcallback) \\| `Promise`<`void` \\| [`GeneratorCallback`](../../devkit/index#generatorcallback)\\>\n\n---\n\n### GeneratorCallback\n\nƬ **GeneratorCallback**: () => `void` \\| `Promise`<`void`\\>\n\n#### Type declaration\n\n▸ (): `void` \\| `Promise`<`void`\\>\n\nA callback function that is executed after changes are made to the file system\n\n##### Returns\n\n`void` \\| `Promise`<`void`\\>\n\n---\n\n### ImplicitDependencyEntry\n\nƬ **ImplicitDependencyEntry**<`T`\\>: `Object`\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :------------------ |\n| `T` | `\"*\"` \\| `string`[] |\n\n#### Index signature\n\n▪ [key: `string`]: `T` \\| [`ImplicitJsonSubsetDependency`](../../devkit/index#implicitjsonsubsetdependency)<`T`\\>\n\n---\n\n### ProjectType\n\nƬ **ProjectType**: `\"library\"` \\| `\"application\"`\n\n---\n\n### TaskGraphExecutor\n\nƬ **TaskGraphExecutor**<`T`\\>: (`taskGraph`: [`TaskGraph`](../../devkit/index#taskgraph), `options`: `Record`<`string`, `T`\\>, `overrides`: `T`, `context`: [`ExecutorContext`](../../devkit/index#executorcontext)) => `Promise`<`Record`<`string`, `Object`\\>\\>\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n#### Type declaration\n\n▸ (`taskGraph`, `options`, `overrides`, `context`): `Promise`<`Record`<`string`, `Object`\\>\\>\n\nImplementation of a target of a project that handles multiple projects to be batched\n\n##### Parameters\n\n| Name | Type |\n| :---------- | :------------------------------------------------------ |\n| `taskGraph` | [`TaskGraph`](../../devkit/index#taskgraph) |\n| `options` | `Record`<`string`, `T`\\> |\n| `overrides` | `T` |\n| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |\n\n##### Returns\n\n`Promise`<`Record`<`string`, `Object`\\>\\>\n\n---\n\n### WorkspaceJsonConfiguration\n\nƬ **WorkspaceJsonConfiguration**: [`ProjectsConfigurations`](../../devkit/index#projectsconfigurations)\n\n## Logger Variables\n\n### logger\n\n• **logger**: `Object`\n\n#### Type declaration\n\n| Name | Type |\n| :------ | :-------------------------- |\n| `debug` | (...`s`: `any`[]) => `void` |\n| `error` | (`s`: `any`) => `void` |\n| `fatal` | (...`s`: `any`[]) => `void` |\n| `info` | (`s`: `any`) => `void` |\n| `log` | (...`s`: `any`[]) => `void` |\n| `warn` | (`s`: `any`) => `void` |\n\n---\n\n## Utils Variables\n\n### appRootPath\n\n• **appRootPath**: `string` = `workspaceRoot`\n\n---\n\n### cacheDir\n\n• **cacheDir**: `string`\n\n---\n\n### output\n\n• **output**: `CLIOutput`\n\n---\n\n### workspaceRoot\n\n• **workspaceRoot**: `string`\n\n## Functions\n\n### addDependenciesToPackageJson\n\n▸ **addDependenciesToPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../devkit/index#generatorcallback)\n\nAdd Dependencies and Dev Dependencies to package.json\n\nFor example:\n\n```typescript\naddDependenciesToPackageJson(tree, { react: 'latest' }, { jest: 'latest' });\n```\n\nThis will **add** `react` and `jest` to the dependencies and devDependencies sections of package.json respectively.\n\n#### Parameters\n\n| Name | Type | Default value | Description |\n| :---------------- | :-------------------------------- | :--------------- | :---------------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | Tree representing file system to modify |\n| `dependencies` | `Record`<`string`, `string`\\> | `undefined` | Dependencies to be added to the dependencies section of package.json |\n| `devDependencies` | `Record`<`string`, `string`\\> | `undefined` | Dependencies to be added to the devDependencies section of package.json |\n| `packageJsonPath` | `string` | `'package.json'` | Path to package.json |\n\n#### Returns\n\n[`GeneratorCallback`](../../devkit/index#generatorcallback)\n\nCallback to install dependencies only if necessary, no-op otherwise\n\n---\n\n### addProjectConfiguration\n\n▸ **addProjectConfiguration**(`tree`, `projectName`, `projectConfiguration`, `standalone?`): `void`\n\nAdds project configuration to the Nx workspace.\n\nThe project configuration is stored in workspace.json or the associated project.json file.\nThe utility will update either files.\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------------------- | :---------------------------------------------------------------- | :----------------------------------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |\n| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) |\n| `projectConfiguration` | [`ProjectConfiguration`](../../devkit/index#projectconfiguration) | project configuration |\n| `standalone?` | `boolean` | should the project use package.json? If false, the project config is inside workspace.json |\n\n#### Returns\n\n`void`\n\n---\n\n### applyAdditionalShared\n\n▸ **applyAdditionalShared**(`sharedConfig`, `additionalShared`, `projectGraph`): `void`\n\nAdd additional dependencies to the shared package that may not have been\ndiscovered by the project graph.\n\nThis can be useful for applications that use a Dependency Injection system\nthat expects certain Singleton values to be present in the shared injection\nhierarchy.\n\n#### Parameters\n\n| Name | Type | Description |\n| :----------------- | :----------------------------------------------------------------------------------- | :--------------------------------- |\n| `sharedConfig` | `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\\> | The original Shared Config |\n| `additionalShared` | [`AdditionalSharedConfig`](../../devkit/index#additionalsharedconfig) | The additional dependencies to add |\n| `projectGraph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\\> | The Nx project graph |\n\n#### Returns\n\n`void`\n\n---\n\n### applyChangesToString\n\n▸ **applyChangesToString**(`text`, `changes`): `string`\n\nApplies a list of changes to a string's original value.\n\nThis is useful when working with ASTs.\n\nFor Example, to rename a property in a method's options:\n\n```typescript\nconst code = `bootstrap({\n target: document.querySelector('#app')\n})`;\n\nconst indexOfPropertyName = 13; // Usually determined by analyzing an AST.\nconst updatedCode = applyChangesToString(code, [\n {\n type: ChangeType.Insert,\n index: indexOfPropertyName,\n text: 'element',\n },\n {\n type: ChangeType.Delete,\n start: indexOfPropertyName,\n length: 6,\n },\n]);\n\nbootstrap({\n element: document.querySelector('#app'),\n});\n```\n\n#### Parameters\n\n| Name | Type |\n| :-------- | :-------------------------------------------------- |\n| `text` | `string` |\n| `changes` | [`StringChange`](../../devkit/index#stringchange)[] |\n\n#### Returns\n\n`string`\n\n---\n\n### applySharedFunction\n\n▸ **applySharedFunction**(`sharedConfig`, `sharedFn`): `void`\n\nApply a custom function provided by the user that will modify the Shared Config\nof the dependencies for the Module Federation build.\n\n#### Parameters\n\n| Name | Type | Description |\n| :------------- | :----------------------------------------------------------------------------------- | :---------------------------------------- |\n| `sharedConfig` | `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\\> | The original Shared Config to be modified |\n| `sharedFn` | [`SharedFunction`](../../devkit/index#sharedfunction) | The custom function to run |\n\n#### Returns\n\n`void`\n\n---\n\n### convertNxExecutor\n\n▸ **convertNxExecutor**(`executor`): `any`\n\nConvert an Nx Executor into an Angular Devkit Builder\n\nUse this to expose a compatible Angular Builder\n\n#### Parameters\n\n| Name | Type |\n| :--------- | :------------------------------------------------ |\n| `executor` | [`Executor`](../../devkit/index#executor)<`any`\\> |\n\n#### Returns\n\n`any`\n\n---\n\n### convertNxGenerator\n\n▸ **convertNxGenerator**<`T`\\>(`generator`, `skipWritingConfigInOldFormat?`): (`generatorOptions`: `T`) => (`tree`: `any`, `context`: `any`) => `Promise`<`any`\\>\n\nConvert an Nx Generator into an Angular Devkit Schematic.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n#### Parameters\n\n| Name | Type | Default value | Description |\n| :----------------------------- | :------------------------------------------------ | :------------ | :------------------------------------------------------------------------------------------------ |\n| `generator` | [`Generator`](../../devkit/index#generator)<`T`\\> | `undefined` | The Nx generator to convert to an Angular Devkit Schematic. |\n| `skipWritingConfigInOldFormat` | `boolean` | `false` | Whether to skip writing the configuration in the old format (the one used by the Angular DevKit). |\n\n#### Returns\n\n`fn`\n\n▸ (`generatorOptions`): (`tree`: `any`, `context`: `any`) => `Promise`<`any`\\>\n\n##### Parameters\n\n| Name | Type |\n| :----------------- | :--- |\n| `generatorOptions` | `T` |\n\n##### Returns\n\n`fn`\n\n▸ (`tree`, `context`): `Promise`<`any`\\>\n\n##### Parameters\n\n| Name | Type |\n| :-------- | :---- |\n| `tree` | `any` |\n| `context` | `any` |\n\n##### Returns\n\n`Promise`<`any`\\>\n\n---\n\n### createLockFile\n\n▸ **createLockFile**(`packageJson`, `packageManager?`): `string`\n\nCreate lock file based on the root level lock file and (pruned) package.json\n\n#### Parameters\n\n| Name | Type |\n| :--------------- | :---------------------------------------------------- |\n| `packageJson` | `PackageJson` |\n| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) |\n\n#### Returns\n\n`string`\n\n---\n\n### createPackageJson\n\n▸ **createPackageJson**(`projectName`, `graph`, `options?`): `PackageJson`\n\nCreates a package.json in the output directory for support to install dependencies within containers.\n\nIf a package.json exists in the project, it will reuse that.\nIf isProduction flag is set, it wil remove devDependencies and optional peerDependencies\n\n#### Parameters\n\n| Name | Type |\n| :---------------------- | :-------------------------------------------------------- |\n| `projectName` | `string` |\n| `graph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\\> |\n| `options` | `Object` |\n| `options.isProduction?` | `boolean` |\n| `options.root?` | `string` |\n\n#### Returns\n\n`PackageJson`\n\n---\n\n### createProjectGraphAsync\n\n▸ **createProjectGraphAsync**(`opts?`): `Promise`<[`ProjectGraph`](../../devkit/index#projectgraph)\\>\n\nComputes and returns a ProjectGraph.\n\nNx will compute the graph either in a daemon process or in the current process.\n\nNx will compute it in the current process if:\n\n- The process is running in CI (CI env variable is to true or other common variables used by CI providers are set).\n- It is running in the docker container.\n- The daemon process is disabled because of the previous error when starting the daemon.\n- `NX_DAEMON` is set to `false`.\n- `useDaemon` is set to false in `nx.json`\n\n`NX_DAEMON` env variable takes precedence:\n\n- If it is set to true, the daemon will always be used.\n- If it is set to false, the graph will always be computed in the current process.\n\nTip: If you want to debug project graph creation, run your command with NX_DAEMON=false.\n\nNx uses two layers of caching: the information about explicit dependencies stored on the disk and the information\nstored in the daemon process. To reset both run: `nx reset`.\n\n#### Parameters\n\n| Name | Type |\n| :------------------------ | :-------- |\n| `opts` | `Object` |\n| `opts.exitOnError` | `boolean` |\n| `opts.resetDaemonClient?` | `boolean` |\n\n#### Returns\n\n`Promise`<[`ProjectGraph`](../../devkit/index#projectgraph)\\>\n\n---\n\n### defaultTasksRunner\n\n▸ `Const` **defaultTasksRunner**(`tasks`, `options`, `context?`): `any`\n\n#### Parameters\n\n| Name | Type |\n| :--------------------------- | :------------------------------------------------------------------------------------ |\n| `tasks` | [`Task`](../../devkit/index#task)[] |\n| `options` | [`DefaultTasksRunnerOptions`](../../devkit/index#defaulttasksrunneroptions) |\n| `context?` | `Object` |\n| `context.daemon?` | `DaemonClient` |\n| `context.hasher?` | [`Hasher`](../../devkit/index#hasher) |\n| `context.initiatingProject?` | `string` |\n| `context.nxArgs` | `NxArgs` |\n| `context.nxJson` | [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)<`string`[] \\| `\"*\"`\\> |\n| `context.projectGraph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\\> |\n| `context.target?` | `string` |\n| `context.taskGraph?` | [`TaskGraph`](../../devkit/index#taskgraph) |\n\n#### Returns\n\n`any`\n\n---\n\n### detectPackageManager\n\n▸ **detectPackageManager**(`dir?`): [`PackageManager`](../../devkit/index#packagemanager)\n\nDetects which package manager is used in the workspace based on the lock file.\n\n#### Parameters\n\n| Name | Type | Default value |\n| :---- | :------- | :------------ |\n| `dir` | `string` | `''` |\n\n#### Returns\n\n[`PackageManager`](../../devkit/index#packagemanager)\n\n---\n\n### detectWorkspaceScope\n\n▸ **detectWorkspaceScope**(`packageName`): `string`\n\nDetect workspace scope from the package.json name\n\n#### Parameters\n\n| Name | Type |\n| :------------ | :------- |\n| `packageName` | `string` |\n\n#### Returns\n\n`string`\n\n---\n\n### ensurePackage\n\n▸ **ensurePackage**(`tree`, `pkg`, `requiredVersion`, `options?`): `Promise`<`void`\\>\n\nEnsure that dependencies and devDependencies from package.json are installed at the required versions.\n\nFor example:\n\n```typescript\nensurePackage(tree, {}, { '@nrwl/jest': nxVersion });\n```\n\nThis will check that @nrwl/jest@ exists in devDependencies.\nIf it exists then function returns, otherwise it will install the package before continuing.\nWhen running with --dryRun, the function will throw when dependencies are missing.\n\n#### Parameters\n\n| Name | Type | Description |\n| :------------------------ | :-------------------------------- | :----------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |\n| `pkg` | `string` | the package to check (e.g. @nrwl/jest) |\n| `requiredVersion` | `string` | the version or semver range to check (e.g. ~1.0.0, >=1.0.0 <2.0.0) |\n| `options` | `Object` | |\n| `options.dev?` | `boolean` | - |\n| `options.throwOnMissing?` | `boolean` | - |\n\n#### Returns\n\n`Promise`<`void`\\>\n\n---\n\n### extractLayoutDirectory\n\n▸ **extractLayoutDirectory**(`directory`): `Object`\n\nExperimental\n\n#### Parameters\n\n| Name | Type |\n| :---------- | :------- |\n| `directory` | `string` |\n\n#### Returns\n\n`Object`\n\n| Name | Type |\n| :----------------- | :------- |\n| `layoutDirectory` | `string` |\n| `projectDirectory` | `string` |\n\n---\n\n### formatFiles\n\n▸ **formatFiles**(`tree`): `Promise`<`void`\\>\n\nFormats all the created or updated files using Prettier\n\n#### Parameters\n\n| Name | Type | Description |\n| :----- | :-------------------------------- | :------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |\n\n#### Returns\n\n`Promise`<`void`\\>\n\n---\n\n### generateFiles\n\n▸ **generateFiles**(`tree`, `srcFolder`, `target`, `substitutions`): `void`\n\nGenerates a folder of files based on provided templates.\n\nWhile doing so it performs two substitutions:\n\n- Substitutes segments of file names surrounded by \\_\\_\n- Uses ejs to substitute values in templates\n\nExamples:\n\n```typescript\ngenerateFiles(tree, path.join(__dirname, 'files'), './tools/scripts', {\n tmpl: '',\n name: 'myscript',\n});\n```\n\nThis command will take all the files from the `files` directory next to the place where the command is invoked from.\nIt will replace all `__tmpl__` with '' and all `__name__` with 'myscript' in the file names, and will replace all\n`<%= name %>` with `myscript` in the files themselves.\n`tmpl: ''` is a common pattern. With it you can name files like this: `index.ts__tmpl__`, so your editor\ndoesn't get confused about incorrect TypeScript files.\n\n#### Parameters\n\n| Name | Type | Description |\n| :-------------- | :-------------------------------- | :-------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |\n| `srcFolder` | `string` | the source folder of files (absolute path) |\n| `target` | `string` | the target folder (relative to the tree root) |\n| `substitutions` | `Object` | an object of key-value pairs |\n\n#### Returns\n\n`void`\n\n---\n\n### getDependentPackagesForProject\n\n▸ **getDependentPackagesForProject**(`projectGraph`, `name`): `Object`\n\n#### Parameters\n\n| Name | Type |\n| :------------- | :-------------------------------------------------------- |\n| `projectGraph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\\> |\n| `name` | `string` |\n\n#### Returns\n\n`Object`\n\n| Name | Type |\n| :------------------- | :---------------------------------------------------------- |\n| `npmPackages` | `string`[] |\n| `workspaceLibraries` | [`WorkspaceLibrary`](../../devkit/index#workspacelibrary)[] |\n\n---\n\n### getImportPath\n\n▸ **getImportPath**(`npmScope`, `projectDirectory`): `string`\n\nPrefixes project name with npm scope\n\n#### Parameters\n\n| Name | Type |\n| :----------------- | :------- |\n| `npmScope` | `string` |\n| `projectDirectory` | `string` |\n\n#### Returns\n\n`string`\n\n---\n\n### getNpmPackageSharedConfig\n\n▸ **getNpmPackageSharedConfig**(`pkgName`, `version`): [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) \\| `undefined`\n\nBuild the Module Federation Share Config for a specific package and the\nspecified version of that package.\n\n#### Parameters\n\n| Name | Type | Description |\n| :-------- | :------- | :----------------------------------------------------------------------------- |\n| `pkgName` | `string` | Name of the package to share |\n| `version` | `string` | Version of the package to require by other apps in the Module Federation setup |\n\n#### Returns\n\n[`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) \\| `undefined`\n\n---\n\n### getOutputsForTargetAndConfiguration\n\n▸ **getOutputsForTargetAndConfiguration**(`task`, `node`): `string`[]\n\nReturns the list of outputs that will be cached.\n\n#### Parameters\n\n| Name | Type | Description |\n| :----- | :------------------------------------------------------------------------------ | :-------------------------------------------------------- |\n| `task` | `Pick`<[`Task`](../../devkit/index#task), `\"overrides\"` \\| `\"target\"`\\> | target + overrides |\n| `node` | [`ProjectGraphProjectNode`](../../devkit/index#projectgraphprojectnode)<`any`\\> | ProjectGraphProjectNode object that the task runs against |\n\n#### Returns\n\n`string`[]\n\n---\n\n### getPackageManagerCommand\n\n▸ **getPackageManagerCommand**(`packageManager?`): `PackageManagerCommands`\n\nReturns commands for the package manager used in the workspace.\nBy default, the package manager is derived based on the lock file,\nbut it can also be passed in explicitly.\n\nExample:\n\n```javascript\nexecSync(`${getPackageManagerCommand().addDev} my-dev-package`);\n```\n\n#### Parameters\n\n| Name | Type |\n| :--------------- | :---------------------------------------------------- |\n| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) |\n\n#### Returns\n\n`PackageManagerCommands`\n\n---\n\n### getPackageManagerVersion\n\n▸ **getPackageManagerVersion**(`packageManager?`): `string`\n\nReturns the version of the package manager used in the workspace.\nBy default, the package manager is derived based on the lock file,\nbut it can also be passed in explicitly.\n\n#### Parameters\n\n| Name | Type |\n| :--------------- | :---------------------------------------------------- |\n| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) |\n\n#### Returns\n\n`string`\n\n---\n\n### getProjects\n\n▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../devkit/index#projectconfiguration)\\>\n\nGet a map of all projects in a workspace.\n\nUse [readProjectConfiguration](../../devkit/index#readprojectconfiguration) if only one project is needed.\n\n#### Parameters\n\n| Name | Type |\n| :----- | :-------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n\n#### Returns\n\n`Map`<`string`, [`ProjectConfiguration`](../../devkit/index#projectconfiguration)\\>\n\n---\n\n### getWorkspaceLayout\n\n▸ **getWorkspaceLayout**(`tree`): `Object`\n\nReturns workspace defaults. It includes defaults folders for apps and libs,\nand the default scope.\n\nExample:\n\n```typescript\n{ appsDir: 'apps', libsDir: 'libs', npmScope: 'myorg' }\n```\n\n#### Parameters\n\n| Name | Type | Description |\n| :----- | :-------------------------------- | :--------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | file system tree |\n\n#### Returns\n\n`Object`\n\n| Name | Type |\n| :-------------------- | :-------- |\n| `appsDir` | `string` |\n| `libsDir` | `string` |\n| `npmScope` | `string` |\n| `standaloneAsDefault` | `boolean` |\n\n---\n\n### getWorkspacePath\n\n▸ **getWorkspacePath**(`tree`): `\"/angular.json\"` \\| `\"/workspace.json\"` \\| `null`\n\n#### Parameters\n\n| Name | Type |\n| :----- | :-------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n\n#### Returns\n\n`\"/angular.json\"` \\| `\"/workspace.json\"` \\| `null`\n\n---\n\n### installPackagesTask\n\n▸ **installPackagesTask**(`tree`, `alwaysRun?`, `cwd?`, `packageManager?`): `void`\n\nRuns `npm install` or `yarn install`. It will skip running the install if\n`package.json` hasn't changed at all or it hasn't changed since the last invocation.\n\n#### Parameters\n\n| Name | Type | Default value | Description |\n| :--------------- | :---------------------------------------------------- | :------------ | :------------------------------------------------------------ |\n| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | the file system tree |\n| `alwaysRun` | `boolean` | `false` | always run the command even if `package.json` hasn't changed. |\n| `cwd` | `string` | `''` | - |\n| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) | `undefined` | - |\n\n#### Returns\n\n`void`\n\n---\n\n### isStandaloneProject\n\n▸ **isStandaloneProject**(`tree`, `project`): `boolean`\n\nReturns if a project has a standalone configuration (project.json).\n\n#### Parameters\n\n| Name | Type | Description |\n| :-------- | :-------------------------------- | :------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |\n| `project` | `string` | the project name |\n\n#### Returns\n\n`boolean`\n\n---\n\n### joinPathFragments\n\n▸ **joinPathFragments**(...`fragments`): `string`\n\nNormalized path fragments and joins them\n\n#### Parameters\n\n| Name | Type |\n| :------------- | :--------- |\n| `...fragments` | `string`[] |\n\n#### Returns\n\n`string`\n\n---\n\n### mapRemotes\n\n▸ **mapRemotes**(`remotes`, `remoteEntryExt`, `determineRemoteUrl`): `Record`<`string`, `string`\\>\n\nMap remote names to a format that can be understood and used by Module\nFederation.\n\n#### Parameters\n\n| Name | Type | Description |\n| :------------------- | :-------------------------------------- | :------------------------------------------------------- |\n| `remotes` | [`Remotes`](../../devkit/index#remotes) | The remotes to map |\n| `remoteEntryExt` | `\"js\"` \\| `\"mjs\"` | The file extension of the remoteEntry file |\n| `determineRemoteUrl` | (`remote`: `string`) => `string` | The function used to lookup the URL of the served remote |\n\n#### Returns\n\n`Record`<`string`, `string`\\>\n\n---\n\n### mapRemotesForSSR\n\n▸ **mapRemotesForSSR**(`remotes`, `remoteEntryExt`, `determineRemoteUrl`): `Record`<`string`, `string`\\>\n\nMap remote names to a format that can be understood and used by Module\nFederation.\n\n#### Parameters\n\n| Name | Type | Description |\n| :------------------- | :-------------------------------------- | :------------------------------------------------------- |\n| `remotes` | [`Remotes`](../../devkit/index#remotes) | The remotes to map |\n| `remoteEntryExt` | `\"js\"` \\| `\"mjs\"` | The file extension of the remoteEntry file |\n| `determineRemoteUrl` | (`remote`: `string`) => `string` | The function used to lookup the URL of the served remote |\n\n#### Returns\n\n`Record`<`string`, `string`\\>\n\n---\n\n### moveFilesToNewDirectory\n\n▸ **moveFilesToNewDirectory**(`tree`, `oldDir`, `newDir`): `void`\n\nAnalogous to cp -r oldDir newDir\n\n#### Parameters\n\n| Name | Type |\n| :------- | :-------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n| `oldDir` | `string` |\n| `newDir` | `string` |\n\n#### Returns\n\n`void`\n\n---\n\n### names\n\n▸ **names**(`name`): `Object`\n\nUtil function to generate different strings based off the provided name.\n\nExamples:\n\n```typescript\nnames('my-name'); // {name: 'my-name', className: 'MyName', propertyName: 'myName', constantName: 'MY_NAME', fileName: 'my-name'}\nnames('myName'); // {name: 'myName', className: 'MyName', propertyName: 'myName', constantName: 'MY_NAME', fileName: 'my-name'}\n```\n\n#### Parameters\n\n| Name | Type |\n| :----- | :------- |\n| `name` | `string` |\n\n#### Returns\n\n`Object`\n\n| Name | Type |\n| :------------- | :------- |\n| `className` | `string` |\n| `constantName` | `string` |\n| `fileName` | `string` |\n| `name` | `string` |\n| `propertyName` | `string` |\n\n---\n\n### normalizePath\n\n▸ **normalizePath**(`osSpecificPath`): `string`\n\nCoverts an os specific path to a unix style path\n\n#### Parameters\n\n| Name | Type |\n| :--------------- | :------- |\n| `osSpecificPath` | `string` |\n\n#### Returns\n\n`string`\n\n---\n\n### offsetFromRoot\n\n▸ **offsetFromRoot**(`fullPathToDir`): `string`\n\nCalculates an offset from the root of the workspace, which is useful for\nconstructing relative URLs.\n\nExamples:\n\n```typescript\noffsetFromRoot('apps/mydir/myapp/'); // returns \"../../../\"\n```\n\n#### Parameters\n\n| Name | Type | Description |\n| :-------------- | :------- | :------------- |\n| `fullPathToDir` | `string` | directory path |\n\n#### Returns\n\n`string`\n\n---\n\n### parseJson\n\n▸ **parseJson**<`T`\\>(`input`, `options?`): `T`\n\nParses the given JSON string and returns the object the JSON content represents.\nBy default javascript-style comments are allowed.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :----------------------- |\n| `T` | extends `object` = `any` |\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :-------------------------------------------------------- | :--------------------- |\n| `input` | `string` | JSON content as string |\n| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) | JSON parse options |\n\n#### Returns\n\n`T`\n\nObject the JSON content represents\n\n---\n\n### parseTargetString\n\n▸ **parseTargetString**(`targetString`): [`Target`](../../devkit/index#target)\n\nParses a target string into {project, target, configuration}\n\nExamples:\n\n```typescript\nparseTargetString('proj:test'); // returns { project: \"proj\", target: \"test\" }\nparseTargetString('proj:test:production'); // returns { project: \"proj\", target: \"test\", configuration: \"production\" }\n```\n\n#### Parameters\n\n| Name | Type | Description |\n| :------------- | :------- | :--------------- |\n| `targetString` | `string` | target reference |\n\n#### Returns\n\n[`Target`](../../devkit/index#target)\n\n---\n\n### readAllWorkspaceConfiguration\n\n▸ **readAllWorkspaceConfiguration**(): [`ProjectsConfigurations`](../../devkit/index#projectsconfigurations) & [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)\n\n**`deprecated`** Use readProjectsConfigurationFromProjectGraph(await createProjectGraphAsync())\n\n#### Returns\n\n[`ProjectsConfigurations`](../../devkit/index#projectsconfigurations) & [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)\n\n---\n\n### readCachedProjectGraph\n\n▸ **readCachedProjectGraph**(): [`ProjectGraph`](../../devkit/index#projectgraph)<[`ProjectConfiguration`](../../devkit/index#projectconfiguration)\\>\n\nSynchronously reads the latest cached copy of the workspace's ProjectGraph.\n\n**`throws`** {Error} if there is no cached ProjectGraph to read from\n\n#### Returns\n\n[`ProjectGraph`](../../devkit/index#projectgraph)<[`ProjectConfiguration`](../../devkit/index#projectconfiguration)\\>\n\n---\n\n### readJson\n\n▸ **readJson**<`T`\\>(`tree`, `path`, `options?`): `T`\n\nReads a json file, removes all comments and parses JSON.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :----------------------- |\n| `T` | extends `object` = `any` |\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :-------------------------------------------------------- | :-------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | file system tree |\n| `path` | `string` | file path |\n| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) | Optional JSON Parse Options |\n\n#### Returns\n\n`T`\n\n---\n\n### readJsonFile\n\n▸ **readJsonFile**<`T`\\>(`path`, `options?`): `T`\n\nReads a JSON file and returns the object the JSON content represents.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :----------------------- |\n| `T` | extends `object` = `any` |\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :---------------- | :----------------- |\n| `path` | `string` | A path to a file. |\n| `options?` | `JsonReadOptions` | JSON parse options |\n\n#### Returns\n\n`T`\n\nObject the JSON content of the file represents\n\n---\n\n### readNxJson\n\n▸ **readNxJson**(): [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)\n\n#### Returns\n\n[`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)\n\n---\n\n### readProjectConfiguration\n\n▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../devkit/index#projectconfiguration)\n\nReads a project configuration.\n\nThe project configuration is stored in workspace.json or the associated project.json file.\nThe utility will read from either file.\n\n**`throws`** If supplied projectName cannot be found\n\n#### Parameters\n\n| Name | Type | Description |\n| :------------ | :-------------------------------- | :---------------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |\n| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) |\n\n#### Returns\n\n[`ProjectConfiguration`](../../devkit/index#projectconfiguration)\n\n---\n\n### readRootPackageJson\n\n▸ **readRootPackageJson**(): `Object`\n\n#### Returns\n\n`Object`\n\n| Name | Type |\n| :----------------- | :------- |\n| `dependencies?` | `Object` |\n| `devDependencies?` | `Object` |\n\n---\n\n### readTargetOptions\n\n▸ **readTargetOptions**<`T`\\>(`__namedParameters`, `context`): `T`\n\nReads and combines options for a given target.\n\nWorks as if you invoked the target yourself without passing any command lint overrides.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :---- |\n| `T` | `any` |\n\n#### Parameters\n\n| Name | Type |\n| :------------------ | :------------------------------------------------------ |\n| `__namedParameters` | [`Target`](../../devkit/index#target) |\n| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |\n\n#### Returns\n\n`T`\n\n---\n\n### readWorkspaceConfiguration\n\n▸ **readWorkspaceConfiguration**(`tree`): [`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration)\n\nRead general workspace configuration such as the default project or cli settings\n\nThis does _not_ provide projects configuration, use [readProjectConfiguration](../../devkit/index#readprojectconfiguration) instead.\n\n#### Parameters\n\n| Name | Type |\n| :----- | :-------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n\n#### Returns\n\n[`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration)\n\n---\n\n### removeDependenciesFromPackageJson\n\n▸ **removeDependenciesFromPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../devkit/index#generatorcallback)\n\nRemove Dependencies and Dev Dependencies from package.json\n\nFor example:\n\n```typescript\nremoveDependenciesFromPackageJson(tree, ['react'], ['jest']);\n```\n\nThis will **remove** `react` and `jest` from the dependencies and devDependencies sections of package.json respectively.\n\n#### Parameters\n\n| Name | Type | Default value | Description |\n| :---------------- | :-------------------------------- | :--------------- | :-------------------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | - |\n| `dependencies` | `string`[] | `undefined` | Dependencies to be removed from the dependencies section of package.json |\n| `devDependencies` | `string`[] | `undefined` | Dependencies to be removed from the devDependencies section of package.json |\n| `packageJsonPath` | `string` | `'package.json'` | - |\n\n#### Returns\n\n[`GeneratorCallback`](../../devkit/index#generatorcallback)\n\nCallback to uninstall dependencies only if necessary. undefined is returned if changes are not necessary.\n\n---\n\n### removeProjectConfiguration\n\n▸ **removeProjectConfiguration**(`tree`, `projectName`): `void`\n\nRemoves the configuration of an existing project.\n\nThe project configuration is stored in workspace.json or the associated project.json file.\nThe utility will update either file.\n\n#### Parameters\n\n| Name | Type |\n| :------------ | :-------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n| `projectName` | `string` |\n\n#### Returns\n\n`void`\n\n---\n\n### reverse\n\n▸ **reverse**(`graph`): [`ProjectGraph`](../../devkit/index#projectgraph)\n\nReturns a new project graph where all the edges are reversed.\n\nFor instance, if project A depends on B, in the reversed graph\nB will depend on A.\n\n#### Parameters\n\n| Name | Type |\n| :------ | :-------------------------------------------------------- |\n| `graph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\\> |\n\n#### Returns\n\n[`ProjectGraph`](../../devkit/index#projectgraph)\n\n---\n\n### runExecutor\n\n▸ **runExecutor**<`T`\\>(`targetDescription`, `overrides`, `context`): `Promise`<`AsyncIterableIterator`<`T`\\>\\>\n\nLoads and invokes executor.\n\nThis is analogous to invoking executor from the terminal, with the exception\nthat the params aren't parsed from the string, but instead provided parsed already.\n\nApart from that, it works the same way:\n\n- it will load the workspace configuration\n- it will resolve the target\n- it will load the executor and the schema\n- it will load the options for the appropriate configuration\n- it will run the validations and will set the default\n- and, of course, it will invoke the executor\n\nExample:\n\n```typescript\nfor await (const s of await runExecutor(\n { project: 'myproj', target: 'serve' },\n { watch: true },\n context\n)) {\n // s.success\n}\n```\n\nNote that the return value is a promise of an iterator, so you need to await before iterating over it.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :--------------- |\n| `T` | extends `Object` |\n\n#### Parameters\n\n| Name | Type |\n| :--------------------------------- | :------------------------------------------------------ |\n| `targetDescription` | `Object` |\n| `targetDescription.configuration?` | `string` |\n| `targetDescription.project` | `string` |\n| `targetDescription.target` | `string` |\n| `overrides` | `Object` |\n| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |\n\n#### Returns\n\n`Promise`<`AsyncIterableIterator`<`T`\\>\\>\n\n---\n\n### serializeJson\n\n▸ **serializeJson**<`T`\\>(`input`, `options?`): `string`\n\nSerializes the given data to a JSON string.\nBy default the JSON string is formatted with a 2 space intendation to be easy readable.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :-------------------------- |\n| `T` | extends `object` = `object` |\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :---------------------------------------------------------------- | :---------------------------------------- |\n| `input` | `T` | Object which should be serialized to JSON |\n| `options?` | [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | JSON serialize options |\n\n#### Returns\n\n`string`\n\nthe formatted JSON representation of the object\n\n---\n\n### sharePackages\n\n▸ **sharePackages**(`packages`): `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\\>\n\nCreate a dictionary of packages and their Module Federation Shared Config\nfrom an array of package names.\n\nLookup the versions of the packages from the root package.json file in the\nworkspace.\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :--------- | :-------------------------------- |\n| `packages` | `string`[] | Array of package names as strings |\n\n#### Returns\n\n`Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\\>\n\n---\n\n### shareWorkspaceLibraries\n\n▸ **shareWorkspaceLibraries**(`libraries`, `tsConfigPath?`): [`SharedWorkspaceLibraryConfig`](../../devkit/index#sharedworkspacelibraryconfig)\n\nBuild an object of functions to be used with the ModuleFederationPlugin to\nshare Nx Workspace Libraries between Hosts and Remotes.\n\n#### Parameters\n\n| Name | Type | Description |\n| :------------- | :---------------------------------------------------------- | :--------------------------------------------------------------------------- |\n| `libraries` | [`WorkspaceLibrary`](../../devkit/index#workspacelibrary)[] | The Nx Workspace Libraries to share |\n| `tsConfigPath` | `string` | The path to TS Config File that contains the Path Mappings for the Libraries |\n\n#### Returns\n\n[`SharedWorkspaceLibraryConfig`](../../devkit/index#sharedworkspacelibraryconfig)\n\n---\n\n### stripIndents\n\n▸ **stripIndents**(`strings`, ...`values`): `string`\n\nRemoves indents, which is useful for printing warning and messages.\n\nExample:\n\n```typescript\nstripIndents`\n Options:\n - option1\n - option2\n`;\n```\n\n#### Parameters\n\n| Name | Type |\n| :---------- | :--------------------- |\n| `strings` | `TemplateStringsArray` |\n| `...values` | `any`[] |\n\n#### Returns\n\n`string`\n\n---\n\n### stripJsonComments\n\n▸ `Const` **stripJsonComments**(`text`, `replaceCh?`): `string`\n\nTakes JSON with JavaScript-style comments and remove\nthem. Optionally replaces every none-newline character\nof comments with a replaceCharacter\n\n#### Parameters\n\n| Name | Type |\n| :----------- | :------- |\n| `text` | `string` |\n| `replaceCh?` | `string` |\n\n#### Returns\n\n`string`\n\n---\n\n### targetToTargetString\n\n▸ **targetToTargetString**(`target`): `string`\n\nReturns a string in the format \"project:target[:configuration]\" for the target\n\n#### Parameters\n\n| Name | Type | Description |\n| :------- | :------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `target` | [`Target`](../../devkit/index#target) | target object Examples: `typescript targetToTargetString({ project: \"proj\", target: \"test\" }) // returns \"proj:test\" targetToTargetString({ project: \"proj\", target: \"test\", configuration: \"production\" }) // returns \"proj:test:production\" ` |\n\n#### Returns\n\n`string`\n\n---\n\n### toJS\n\n▸ **toJS**(`tree`): `void`\n\nRename and transpile any new typescript files created to javascript files\n\n#### Parameters\n\n| Name | Type |\n| :----- | :-------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n\n#### Returns\n\n`void`\n\n---\n\n### updateJson\n\n▸ **updateJson**<`T`, `U`\\>(`tree`, `path`, `updater`, `options?`): `void`\n\nUpdates a JSON value to the file system tree\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :----------------------- |\n| `T` | extends `object` = `any` |\n| `U` | extends `object` = `T` |\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :---------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | File system tree |\n| `path` | `string` | Path of JSON file in the Tree |\n| `updater` | (`value`: `T`) => `U` | Function that maps the current value of a JSON document to a new value to be written to the document |\n| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) & [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | Optional JSON Parse and Serialize Options |\n\n#### Returns\n\n`void`\n\n---\n\n### updateProjectConfiguration\n\n▸ **updateProjectConfiguration**(`tree`, `projectName`, `projectConfiguration`): `void`\n\nUpdates the configuration of an existing project.\n\nThe project configuration is stored in workspace.json or the associated project.json file.\nThe utility will update either files.\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------------------- | :---------------------------------------------------------------- | :---------------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |\n| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) |\n| `projectConfiguration` | [`ProjectConfiguration`](../../devkit/index#projectconfiguration) | project configuration |\n\n#### Returns\n\n`void`\n\n---\n\n### updateTsConfigsToJs\n\n▸ **updateTsConfigsToJs**(`tree`, `options`): `void`\n\n#### Parameters\n\n| Name | Type |\n| :-------------------- | :-------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n| `options` | `Object` |\n| `options.projectRoot` | `string` |\n\n#### Returns\n\n`void`\n\n---\n\n### updateWorkspaceConfiguration\n\n▸ **updateWorkspaceConfiguration**(`tree`, `workspaceConfig`): `void`\n\nUpdate general workspace configuration such as the default project or cli settings.\n\nThis does _not_ update projects configuration, use [updateProjectConfiguration](../../devkit/index#updateprojectconfiguration) or [addProjectConfiguration](../../devkit/index#addprojectconfiguration) instead.\n\n#### Parameters\n\n| Name | Type |\n| :---------------- | :-------------------------------------------------------------------- |\n| `tree` | [`Tree`](../../devkit/index#tree) |\n| `workspaceConfig` | [`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration) |\n\n#### Returns\n\n`void`\n\n---\n\n### visitNotIgnoredFiles\n\n▸ **visitNotIgnoredFiles**(`tree`, `dirPath?`, `visitor`): `void`\n\nUtility to act on all files in a tree that are not ignored by git.\n\n#### Parameters\n\n| Name | Type | Default value |\n| :-------- | :-------------------------------- | :------------ |\n| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` |\n| `dirPath` | `string` | `tree.root` |\n| `visitor` | (`path`: `string`) => `void` | `undefined` |\n\n#### Returns\n\n`void`\n\n---\n\n### workspaceLayout\n\n▸ **workspaceLayout**(): `Object`\n\nReturns information about where apps and libs will be created.\n\n#### Returns\n\n`Object`\n\n| Name | Type |\n| :-------- | :------- |\n| `appsDir` | `string` |\n| `libsDir` | `string` |\n\n---\n\n### writeJson\n\n▸ **writeJson**<`T`\\>(`tree`, `path`, `value`, `options?`): `void`\n\nWrites a JSON value to the file system tree\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :-------------------------- |\n| `T` | extends `object` = `object` |\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :---------------------------------------------------------------- | :------------------------------ |\n| `tree` | [`Tree`](../../devkit/index#tree) | File system tree |\n| `path` | `string` | Path of JSON file in the Tree |\n| `value` | `T` | Serializable value to write |\n| `options?` | [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | Optional JSON Serialize Options |\n\n#### Returns\n\n`void`\n\n---\n\n### writeJsonFile\n\n▸ **writeJsonFile**<`T`\\>(`path`, `data`, `options?`): `void`\n\nSerializes the given data to JSON and writes it to a file.\n\n#### Type parameters\n\n| Name | Type |\n| :--- | :-------------------------- |\n| `T` | extends `object` = `object` |\n\n#### Parameters\n\n| Name | Type | Description |\n| :--------- | :----------------- | :-------------------------------------------------------------- |\n| `path` | `string` | A path to a file. |\n| `data` | `T` | data which should be serialized to JSON and written to the file |\n| `options?` | `JsonWriteOptions` | JSON serialize options |\n\n#### Returns\n\n`void`\n" - }, - { - "id": "ngcli_adapter", - "name": "Ng CLI Adapter", - "file": "generated/devkit/ngcli_adapter", - "content": "# Module: ngcli-adapter\n\n## Table of contents\n\n### Ng CLI Adapter Classes\n\n- [NxScopedHost](../../devkit/ngcli_adapter#nxscopedhost)\n\n### Functions\n\n- [mockSchematicsForTesting](../../devkit/ngcli_adapter#mockschematicsfortesting)\n- [overrideCollectionResolutionForTesting](../../devkit/ngcli_adapter#overridecollectionresolutionfortesting)\n- [wrapAngularDevkitSchematic](../../devkit/ngcli_adapter#wrapangulardevkitschematic)\n\n## Ng CLI Adapter Classes\n\n### NxScopedHost\n\n• **NxScopedHost**: `Object`\n\n## Functions\n\n### mockSchematicsForTesting\n\n▸ **mockSchematicsForTesting**(`schematics`): `void`\n\nIf you have an Nx Devkit generator invoking the wrapped Angular Devkit schematic,\nand you don't want the Angular Devkit schematic to run, you can mock it up using this function.\n\nUnfortunately, there are some edge cases in the Nx-Angular devkit integration that\ncan be seen in the unit tests context. This function is useful for handling that as well.\n\nIn this case, you can mock it up.\n\nExample:\n\n```typescript\nmockSchematicsForTesting({\n 'mycollection:myschematic': (tree, params) => {\n tree.write('README.md');\n },\n});\n```\n\n#### Parameters\n\n| Name | Type |\n| :----------- | :------- |\n| `schematics` | `Object` |\n\n#### Returns\n\n`void`\n\n---\n\n### overrideCollectionResolutionForTesting\n\n▸ **overrideCollectionResolutionForTesting**(`collections`): `void`\n\nBy default, Angular Devkit schematic collections will be resolved using the Node resolution.\nThis doesn't work if you are testing schematics that refer to other schematics in the\nsame repo.\n\nThis function can can be used to override the resolution behaviour.\n\nExample:\n\n```typescript\noverrideCollectionResolutionForTesting({\n '@nrwl/workspace': path.join(\n __dirname,\n '../../../../workspace/generators.json'\n ),\n '@nrwl/angular': path.join(__dirname, '../../../../angular/generators.json'),\n '@nrwl/linter': path.join(__dirname, '../../../../linter/generators.json'),\n});\n```\n\n#### Parameters\n\n| Name | Type |\n| :------------ | :------- |\n| `collections` | `Object` |\n\n#### Returns\n\n`void`\n\n---\n\n### wrapAngularDevkitSchematic\n\n▸ **wrapAngularDevkitSchematic**(`collectionName`, `generatorName`): (`host`: [`Tree`](../../devkit/index#tree), `generatorOptions`: { [k: string]: `any`; }) => `Promise`<`any`\\>\n\n#### Parameters\n\n| Name | Type |\n| :--------------- | :------- |\n| `collectionName` | `string` |\n| `generatorName` | `string` |\n\n#### Returns\n\n`fn`\n\n▸ (`host`, `generatorOptions`): `Promise`<`any`\\>\n\n##### Parameters\n\n| Name | Type |\n| :----------------- | :-------------------------------- |\n| `host` | [`Tree`](../../devkit/index#tree) |\n| `generatorOptions` | `Object` |\n\n##### Returns\n\n`Promise`<`any`\\>\n" - } - ], - "generators": [], - "executors": [] -} diff --git a/docs/generated/packages/devkit/documents/index.md b/docs/generated/packages/devkit/documents/index.md new file mode 100644 index 0000000000000..4e1c8105eea91 --- /dev/null +++ b/docs/generated/packages/devkit/documents/index.md @@ -0,0 +1,2409 @@ +# Module: index + +The Nx Devkit is the underlying technology used to customize Nx to support +different technologies and custom use-cases. It contains many utility +functions for reading and writing files, updating configuration, +working with Abstract Syntax Trees(ASTs), and more. + +As with most things in Nx, the core of Nx Devkit is very simple. +It only uses language primitives and immutable objects +(the tree being the only exception). + +## Table of contents + +### Project Graph Enumerations + +- [DependencyType](../../devkit/index#dependencytype) + +### Utils Enumerations + +- [ChangeType](../../devkit/index#changetype) + +### Project Graph Classes + +- [ProjectGraphBuilder](../../devkit/index#projectgraphbuilder) + +### Utils Classes + +- [Hasher](../../devkit/index#hasher) + +### Workspace Classes + +- [Workspaces](../../devkit/index#workspaces) + +### Commands Interfaces + +- [Target](../../devkit/index#target) + +### Other Interfaces + +- [NxPlugin](../../devkit/index#nxplugin) + +### Project Graph Interfaces + +- [FileData](../../devkit/index#filedata) +- [ProjectFileMap](../../devkit/index#projectfilemap) +- [ProjectGraph](../../devkit/index#projectgraph) +- [ProjectGraphDependency](../../devkit/index#projectgraphdependency) +- [ProjectGraphExternalNode](../../devkit/index#projectgraphexternalnode) +- [ProjectGraphProcessorContext](../../devkit/index#projectgraphprocessorcontext) +- [ProjectGraphProjectNode](../../devkit/index#projectgraphprojectnode) +- [ProjectGraphV4](../../devkit/index#projectgraphv4) + +### Tree Interfaces + +- [FileChange](../../devkit/index#filechange) +- [Tree](../../devkit/index#tree) + +### Utils Interfaces + +- [DefaultTasksRunnerOptions](../../devkit/index#defaulttasksrunneroptions) +- [Hash](../../devkit/index#hash) +- [JsonParseOptions](../../devkit/index#jsonparseoptions) +- [JsonSerializeOptions](../../devkit/index#jsonserializeoptions) +- [ModuleFederationConfig](../../devkit/index#modulefederationconfig) +- [RemoteCache](../../devkit/index#remotecache) +- [SharedLibraryConfig](../../devkit/index#sharedlibraryconfig) +- [StringDeletion](../../devkit/index#stringdeletion) +- [StringInsertion](../../devkit/index#stringinsertion) + +### Workspace Interfaces + +- [ExecutorContext](../../devkit/index#executorcontext) +- [ExecutorsJson](../../devkit/index#executorsjson) +- [GeneratorsJson](../../devkit/index#generatorsjson) +- [HasherContext](../../devkit/index#hashercontext) +- [ImplicitJsonSubsetDependency](../../devkit/index#implicitjsonsubsetdependency) +- [MigrationsJson](../../devkit/index#migrationsjson) +- [NxAffectedConfig](../../devkit/index#nxaffectedconfig) +- [NxJsonConfiguration](../../devkit/index#nxjsonconfiguration) +- [ProjectConfiguration](../../devkit/index#projectconfiguration) +- [ProjectsConfigurations](../../devkit/index#projectsconfigurations) +- [TargetConfiguration](../../devkit/index#targetconfiguration) +- [TargetDependencyConfig](../../devkit/index#targetdependencyconfig) +- [Task](../../devkit/index#task) +- [TaskGraph](../../devkit/index#taskgraph) +- [Workspace](../../devkit/index#workspace) + +### Generators Type aliases + +- [WorkspaceConfiguration](../../devkit/index#workspaceconfiguration) + +### Other Type aliases + +- [ProjectTargetConfigurator](../../devkit/index#projecttargetconfigurator) + +### Package Manager Type aliases + +- [PackageManager](../../devkit/index#packagemanager) + +### Project Graph Type aliases + +- [ProjectGraphNode](../../devkit/index#projectgraphnode) + +### Utils Type aliases + +- [AdditionalSharedConfig](../../devkit/index#additionalsharedconfig) +- [ModuleFederationLibrary](../../devkit/index#modulefederationlibrary) +- [Remotes](../../devkit/index#remotes) +- [SharedFunction](../../devkit/index#sharedfunction) +- [SharedWorkspaceLibraryConfig](../../devkit/index#sharedworkspacelibraryconfig) +- [StringChange](../../devkit/index#stringchange) +- [WorkspaceLibrary](../../devkit/index#workspacelibrary) +- [WorkspaceLibrarySecondaryEntryPoint](../../devkit/index#workspacelibrarysecondaryentrypoint) + +### Workspace Type aliases + +- [CustomHasher](../../devkit/index#customhasher) +- [Executor](../../devkit/index#executor) +- [Generator](../../devkit/index#generator) +- [GeneratorCallback](../../devkit/index#generatorcallback) +- [ImplicitDependencyEntry](../../devkit/index#implicitdependencyentry) +- [ProjectType](../../devkit/index#projecttype) +- [TaskGraphExecutor](../../devkit/index#taskgraphexecutor) +- [WorkspaceJsonConfiguration](../../devkit/index#workspacejsonconfiguration) + +### Logger Variables + +- [logger](../../devkit/index#logger) + +### Utils Variables + +- [appRootPath](../../devkit/index#approotpath) +- [cacheDir](../../devkit/index#cachedir) +- [output](../../devkit/index#output) +- [workspaceRoot](../../devkit/index#workspaceroot) + +### Functions + +- [addDependenciesToPackageJson](../../devkit/index#adddependenciestopackagejson) +- [addProjectConfiguration](../../devkit/index#addprojectconfiguration) +- [applyAdditionalShared](../../devkit/index#applyadditionalshared) +- [applyChangesToString](../../devkit/index#applychangestostring) +- [applySharedFunction](../../devkit/index#applysharedfunction) +- [convertNxExecutor](../../devkit/index#convertnxexecutor) +- [convertNxGenerator](../../devkit/index#convertnxgenerator) +- [createLockFile](../../devkit/index#createlockfile) +- [createPackageJson](../../devkit/index#createpackagejson) +- [createProjectGraphAsync](../../devkit/index#createprojectgraphasync) +- [defaultTasksRunner](../../devkit/index#defaulttasksrunner) +- [detectPackageManager](../../devkit/index#detectpackagemanager) +- [detectWorkspaceScope](../../devkit/index#detectworkspacescope) +- [ensurePackage](../../devkit/index#ensurepackage) +- [extractLayoutDirectory](../../devkit/index#extractlayoutdirectory) +- [formatFiles](../../devkit/index#formatfiles) +- [generateFiles](../../devkit/index#generatefiles) +- [getDependentPackagesForProject](../../devkit/index#getdependentpackagesforproject) +- [getImportPath](../../devkit/index#getimportpath) +- [getNpmPackageSharedConfig](../../devkit/index#getnpmpackagesharedconfig) +- [getOutputsForTargetAndConfiguration](../../devkit/index#getoutputsfortargetandconfiguration) +- [getPackageManagerCommand](../../devkit/index#getpackagemanagercommand) +- [getPackageManagerVersion](../../devkit/index#getpackagemanagerversion) +- [getProjects](../../devkit/index#getprojects) +- [getWorkspaceLayout](../../devkit/index#getworkspacelayout) +- [getWorkspacePath](../../devkit/index#getworkspacepath) +- [installPackagesTask](../../devkit/index#installpackagestask) +- [isStandaloneProject](../../devkit/index#isstandaloneproject) +- [joinPathFragments](../../devkit/index#joinpathfragments) +- [mapRemotes](../../devkit/index#mapremotes) +- [mapRemotesForSSR](../../devkit/index#mapremotesforssr) +- [moveFilesToNewDirectory](../../devkit/index#movefilestonewdirectory) +- [names](../../devkit/index#names) +- [normalizePath](../../devkit/index#normalizepath) +- [offsetFromRoot](../../devkit/index#offsetfromroot) +- [parseJson](../../devkit/index#parsejson) +- [parseTargetString](../../devkit/index#parsetargetstring) +- [readAllWorkspaceConfiguration](../../devkit/index#readallworkspaceconfiguration) +- [readCachedProjectGraph](../../devkit/index#readcachedprojectgraph) +- [readJson](../../devkit/index#readjson) +- [readJsonFile](../../devkit/index#readjsonfile) +- [readNxJson](../../devkit/index#readnxjson) +- [readProjectConfiguration](../../devkit/index#readprojectconfiguration) +- [readRootPackageJson](../../devkit/index#readrootpackagejson) +- [readTargetOptions](../../devkit/index#readtargetoptions) +- [readWorkspaceConfiguration](../../devkit/index#readworkspaceconfiguration) +- [removeDependenciesFromPackageJson](../../devkit/index#removedependenciesfrompackagejson) +- [removeProjectConfiguration](../../devkit/index#removeprojectconfiguration) +- [reverse](../../devkit/index#reverse) +- [runExecutor](../../devkit/index#runexecutor) +- [serializeJson](../../devkit/index#serializejson) +- [sharePackages](../../devkit/index#sharepackages) +- [shareWorkspaceLibraries](../../devkit/index#shareworkspacelibraries) +- [stripIndents](../../devkit/index#stripindents) +- [stripJsonComments](../../devkit/index#stripjsoncomments) +- [targetToTargetString](../../devkit/index#targettotargetstring) +- [toJS](../../devkit/index#tojs) +- [updateJson](../../devkit/index#updatejson) +- [updateProjectConfiguration](../../devkit/index#updateprojectconfiguration) +- [updateTsConfigsToJs](../../devkit/index#updatetsconfigstojs) +- [updateWorkspaceConfiguration](../../devkit/index#updateworkspaceconfiguration) +- [visitNotIgnoredFiles](../../devkit/index#visitnotignoredfiles) +- [workspaceLayout](../../devkit/index#workspacelayout) +- [writeJson](../../devkit/index#writejson) +- [writeJsonFile](../../devkit/index#writejsonfile) + +## Project Graph Enumerations + +### DependencyType + +• **DependencyType**: `Object` + +--- + +## Utils Enumerations + +### ChangeType + +• **ChangeType**: `Object` + +## Project Graph Classes + +### ProjectGraphBuilder + +• **ProjectGraphBuilder**: `Object` + +--- + +## Utils Classes + +### Hasher + +• **Hasher**: `Object` + +--- + +## Workspace Classes + +### Workspaces + +• **Workspaces**: `Object` + +## Commands Interfaces + +### Target + +• **Target**: `Object` + +--- + +## Other Interfaces + +### NxPlugin + +• **NxPlugin**: `Object` + +A plugin for Nx + +--- + +## Project Graph Interfaces + +### FileData + +• **FileData**: `Object` + +--- + +### ProjectFileMap + +• **ProjectFileMap**: `Object` + +--- + +### ProjectGraph + +• **ProjectGraph**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +--- + +### ProjectGraphDependency + +• **ProjectGraphDependency**: `Object` + +--- + +### ProjectGraphExternalNode + +• **ProjectGraphExternalNode**: `Object` + +--- + +### ProjectGraphProcessorContext + +• **ProjectGraphProcessorContext**: `Object` + +--- + +### ProjectGraphProjectNode + +• **ProjectGraphProjectNode**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +--- + +### ProjectGraphV4 + +• **ProjectGraphV4**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +--- + +## Tree Interfaces + +### FileChange + +• **FileChange**: `Object` + +--- + +### Tree + +• **Tree**: `Object` + +--- + +## Utils Interfaces + +### DefaultTasksRunnerOptions + +• **DefaultTasksRunnerOptions**: `Object` + +--- + +### Hash + +• **Hash**: `Object` + +--- + +### JsonParseOptions + +• **JsonParseOptions**: `Object` + +--- + +### JsonSerializeOptions + +• **JsonSerializeOptions**: `Object` + +--- + +### ModuleFederationConfig + +• **ModuleFederationConfig**: `Object` + +--- + +### RemoteCache + +• **RemoteCache**: `Object` + +--- + +### SharedLibraryConfig + +• **SharedLibraryConfig**: `Object` + +--- + +### StringDeletion + +• **StringDeletion**: `Object` + +--- + +### StringInsertion + +• **StringInsertion**: `Object` + +--- + +## Workspace Interfaces + +### ExecutorContext + +• **ExecutorContext**: `Object` + +--- + +### ExecutorsJson + +• **ExecutorsJson**: `Object` + +--- + +### GeneratorsJson + +• **GeneratorsJson**: `Object` + +--- + +### HasherContext + +• **HasherContext**: `Object` + +--- + +### ImplicitJsonSubsetDependency + +• **ImplicitJsonSubsetDependency**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### MigrationsJson + +• **MigrationsJson**: `Object` + +--- + +### NxAffectedConfig + +• **NxAffectedConfig**: `Object` + +--- + +### NxJsonConfiguration + +• **NxJsonConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### ProjectConfiguration + +• **ProjectConfiguration**: `Object` + +--- + +### ProjectsConfigurations + +• **ProjectsConfigurations**: `Object` + +--- + +### TargetConfiguration + +• **TargetConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +--- + +### TargetDependencyConfig + +• **TargetDependencyConfig**: `Object` + +--- + +### Task + +• **Task**: `Object` + +--- + +### TaskGraph + +• **TaskGraph**: `Object` + +--- + +### Workspace + +• **Workspace**: `Object` + +## Generators Type aliases + +### WorkspaceConfiguration + +Ƭ **WorkspaceConfiguration**: `Omit`<[`ProjectsConfigurations`](../../devkit/index#projectsconfigurations), `"projects"`\> & `Partial`<[`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)\> + +--- + +## Other Type aliases + +### ProjectTargetConfigurator + +Ƭ **ProjectTargetConfigurator**: (`file`: `string`) => `Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\> + +#### Type declaration + +▸ (`file`): `Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\> + +##### Parameters + +| Name | Type | +| :----- | :------- | +| `file` | `string` | + +##### Returns + +`Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\> + +--- + +## Package Manager Type aliases + +### PackageManager + +Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` + +--- + +## Project Graph Type aliases + +### ProjectGraphNode + +Ƭ **ProjectGraphNode**<`T`\>: [`ProjectGraphProjectNode`](../../devkit/index#projectgraphprojectnode)<`T`\> \| [`ProjectGraphExternalNode`](../../devkit/index#projectgraphexternalnode) + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +--- + +## Utils Type aliases + +### AdditionalSharedConfig + +Ƭ **AdditionalSharedConfig**: (`string` \| [libraryName: string, sharedConfig: SharedLibraryConfig] \| { `libraryName`: `string` ; `sharedConfig`: [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) })[] + +--- + +### ModuleFederationLibrary + +Ƭ **ModuleFederationLibrary**: `Object` + +#### Type declaration + +| Name | Type | +| :----- | :------- | +| `name` | `string` | +| `type` | `string` | + +--- + +### Remotes + +Ƭ **Remotes**: `string`[] \| [remoteName: string, remoteUrl: string][] + +--- + +### SharedFunction + +Ƭ **SharedFunction**: (`libraryName`: `string`, `sharedConfig`: [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)) => `undefined` \| `false` \| [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) + +#### Type declaration + +▸ (`libraryName`, `sharedConfig`): `undefined` \| `false` \| [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) + +##### Parameters + +| Name | Type | +| :------------- | :-------------------------------------------------------------- | +| `libraryName` | `string` | +| `sharedConfig` | [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) | + +##### Returns + +`undefined` \| `false` \| [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) + +--- + +### SharedWorkspaceLibraryConfig + +Ƭ **SharedWorkspaceLibraryConfig**: `Object` + +#### Type declaration + +| Name | Type | +| :--------------------- | :------------------------------------------------------------------------------------------------------------ | +| `getAliases` | () => `Record`<`string`, `string`\> | +| `getLibraries` | (`eager?`: `boolean`) => `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\> | +| `getReplacementPlugin` | () => `NormalModuleReplacementPlugin` | + +--- + +### StringChange + +Ƭ **StringChange**: [`StringInsertion`](../../devkit/index#stringinsertion) \| [`StringDeletion`](../../devkit/index#stringdeletion) + +--- + +### WorkspaceLibrary + +Ƭ **WorkspaceLibrary**: `Object` + +#### Type declaration + +| Name | Type | +| :---------- | :---------------------- | +| `importKey` | `string` \| `undefined` | +| `name` | `string` | +| `root` | `string` | + +--- + +### WorkspaceLibrarySecondaryEntryPoint + +Ƭ **WorkspaceLibrarySecondaryEntryPoint**: `Object` + +#### Type declaration + +| Name | Type | +| :----- | :------- | +| `name` | `string` | +| `path` | `string` | + +--- + +## Workspace Type aliases + +### CustomHasher + +Ƭ **CustomHasher**: (`task`: [`Task`](../../devkit/index#task), `context`: [`HasherContext`](../../devkit/index#hashercontext)) => `Promise`<[`Hash`](../../devkit/index#hash)\> + +#### Type declaration + +▸ (`task`, `context`): `Promise`<[`Hash`](../../devkit/index#hash)\> + +##### Parameters + +| Name | Type | +| :-------- | :-------------------------------------------------- | +| `task` | [`Task`](../../devkit/index#task) | +| `context` | [`HasherContext`](../../devkit/index#hashercontext) | + +##### Returns + +`Promise`<[`Hash`](../../devkit/index#hash)\> + +--- + +### Executor + +Ƭ **Executor**<`T`\>: (`options`: `T`, `context`: [`ExecutorContext`](../../devkit/index#executorcontext)) => `Promise`<`Object`\> \| `AsyncIterableIterator`<`Object`\> + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +#### Type declaration + +▸ (`options`, `context`): `Promise`<`Object`\> \| `AsyncIterableIterator`<`Object`\> + +Implementation of a target of a project + +##### Parameters + +| Name | Type | +| :-------- | :------------------------------------------------------ | +| `options` | `T` | +| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) | + +##### Returns + +`Promise`<`Object`\> \| `AsyncIterableIterator`<`Object`\> + +--- + +### Generator + +Ƭ **Generator**<`T`\>: (`tree`: `any`, `schema`: `T`) => `void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback)\> + +#### Type parameters + +| Name | Type | +| :--- | :-------- | +| `T` | `unknown` | + +#### Type declaration + +▸ (`tree`, `schema`): `void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback)\> + +A function that schedules updates to the filesystem to be done atomically + +##### Parameters + +| Name | Type | +| :------- | :---- | +| `tree` | `any` | +| `schema` | `T` | + +##### Returns + +`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback)\> + +--- + +### GeneratorCallback + +Ƭ **GeneratorCallback**: () => `void` \| `Promise`<`void`\> + +#### Type declaration + +▸ (): `void` \| `Promise`<`void`\> + +A callback function that is executed after changes are made to the file system + +##### Returns + +`void` \| `Promise`<`void`\> + +--- + +### ImplicitDependencyEntry + +Ƭ **ImplicitDependencyEntry**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +#### Index signature + +▪ [key: `string`]: `T` \| [`ImplicitJsonSubsetDependency`](../../devkit/index#implicitjsonsubsetdependency)<`T`\> + +--- + +### ProjectType + +Ƭ **ProjectType**: `"library"` \| `"application"` + +--- + +### TaskGraphExecutor + +Ƭ **TaskGraphExecutor**<`T`\>: (`taskGraph`: [`TaskGraph`](../../devkit/index#taskgraph), `options`: `Record`<`string`, `T`\>, `overrides`: `T`, `context`: [`ExecutorContext`](../../devkit/index#executorcontext)) => `Promise`<`Record`<`string`, `Object`\>\> + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +#### Type declaration + +▸ (`taskGraph`, `options`, `overrides`, `context`): `Promise`<`Record`<`string`, `Object`\>\> + +Implementation of a target of a project that handles multiple projects to be batched + +##### Parameters + +| Name | Type | +| :---------- | :------------------------------------------------------ | +| `taskGraph` | [`TaskGraph`](../../devkit/index#taskgraph) | +| `options` | `Record`<`string`, `T`\> | +| `overrides` | `T` | +| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) | + +##### Returns + +`Promise`<`Record`<`string`, `Object`\>\> + +--- + +### WorkspaceJsonConfiguration + +Ƭ **WorkspaceJsonConfiguration**: [`ProjectsConfigurations`](../../devkit/index#projectsconfigurations) + +## Logger Variables + +### logger + +• **logger**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :-------------------------- | +| `debug` | (...`s`: `any`[]) => `void` | +| `error` | (`s`: `any`) => `void` | +| `fatal` | (...`s`: `any`[]) => `void` | +| `info` | (`s`: `any`) => `void` | +| `log` | (...`s`: `any`[]) => `void` | +| `warn` | (`s`: `any`) => `void` | + +--- + +## Utils Variables + +### appRootPath + +• **appRootPath**: `string` = `workspaceRoot` + +--- + +### cacheDir + +• **cacheDir**: `string` + +--- + +### output + +• **output**: `CLIOutput` + +--- + +### workspaceRoot + +• **workspaceRoot**: `string` + +## Functions + +### addDependenciesToPackageJson + +▸ **addDependenciesToPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../devkit/index#generatorcallback) + +Add Dependencies and Dev Dependencies to package.json + +For example: + +```typescript +addDependenciesToPackageJson(tree, { react: 'latest' }, { jest: 'latest' }); +``` + +This will **add** `react` and `jest` to the dependencies and devDependencies sections of package.json respectively. + +#### Parameters + +| Name | Type | Default value | Description | +| :---------------- | :-------------------------------- | :--------------- | :---------------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | Tree representing file system to modify | +| `dependencies` | `Record`<`string`, `string`\> | `undefined` | Dependencies to be added to the dependencies section of package.json | +| `devDependencies` | `Record`<`string`, `string`\> | `undefined` | Dependencies to be added to the devDependencies section of package.json | +| `packageJsonPath` | `string` | `'package.json'` | Path to package.json | + +#### Returns + +[`GeneratorCallback`](../../devkit/index#generatorcallback) + +Callback to install dependencies only if necessary, no-op otherwise + +--- + +### addProjectConfiguration + +▸ **addProjectConfiguration**(`tree`, `projectName`, `projectConfiguration`, `standalone?`): `void` + +Adds project configuration to the Nx workspace. + +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. + +#### Parameters + +| Name | Type | Description | +| :--------------------- | :---------------------------------------------------------------- | :----------------------------------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree | +| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../devkit/index#projectconfiguration) | project configuration | +| `standalone?` | `boolean` | should the project use package.json? If false, the project config is inside workspace.json | + +#### Returns + +`void` + +--- + +### applyAdditionalShared + +▸ **applyAdditionalShared**(`sharedConfig`, `additionalShared`, `projectGraph`): `void` + +Add additional dependencies to the shared package that may not have been +discovered by the project graph. + +This can be useful for applications that use a Dependency Injection system +that expects certain Singleton values to be present in the shared injection +hierarchy. + +#### Parameters + +| Name | Type | Description | +| :----------------- | :----------------------------------------------------------------------------------- | :--------------------------------- | +| `sharedConfig` | `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\> | The original Shared Config | +| `additionalShared` | [`AdditionalSharedConfig`](../../devkit/index#additionalsharedconfig) | The additional dependencies to add | +| `projectGraph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\> | The Nx project graph | + +#### Returns + +`void` + +--- + +### applyChangesToString + +▸ **applyChangesToString**(`text`, `changes`): `string` + +Applies a list of changes to a string's original value. + +This is useful when working with ASTs. + +For Example, to rename a property in a method's options: + +```typescript +const code = `bootstrap({ + target: document.querySelector('#app') +})`; + +const indexOfPropertyName = 13; // Usually determined by analyzing an AST. +const updatedCode = applyChangesToString(code, [ + { + type: ChangeType.Insert, + index: indexOfPropertyName, + text: 'element', + }, + { + type: ChangeType.Delete, + start: indexOfPropertyName, + length: 6, + }, +]); + +bootstrap({ + element: document.querySelector('#app'), +}); +``` + +#### Parameters + +| Name | Type | +| :-------- | :-------------------------------------------------- | +| `text` | `string` | +| `changes` | [`StringChange`](../../devkit/index#stringchange)[] | + +#### Returns + +`string` + +--- + +### applySharedFunction + +▸ **applySharedFunction**(`sharedConfig`, `sharedFn`): `void` + +Apply a custom function provided by the user that will modify the Shared Config +of the dependencies for the Module Federation build. + +#### Parameters + +| Name | Type | Description | +| :------------- | :----------------------------------------------------------------------------------- | :---------------------------------------- | +| `sharedConfig` | `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\> | The original Shared Config to be modified | +| `sharedFn` | [`SharedFunction`](../../devkit/index#sharedfunction) | The custom function to run | + +#### Returns + +`void` + +--- + +### convertNxExecutor + +▸ **convertNxExecutor**(`executor`): `any` + +Convert an Nx Executor into an Angular Devkit Builder + +Use this to expose a compatible Angular Builder + +#### Parameters + +| Name | Type | +| :--------- | :------------------------------------------------ | +| `executor` | [`Executor`](../../devkit/index#executor)<`any`\> | + +#### Returns + +`any` + +--- + +### convertNxGenerator + +▸ **convertNxGenerator**<`T`\>(`generator`, `skipWritingConfigInOldFormat?`): (`generatorOptions`: `T`) => (`tree`: `any`, `context`: `any`) => `Promise`<`any`\> + +Convert an Nx Generator into an Angular Devkit Schematic. + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +#### Parameters + +| Name | Type | Default value | Description | +| :----------------------------- | :------------------------------------------------ | :------------ | :------------------------------------------------------------------------------------------------ | +| `generator` | [`Generator`](../../devkit/index#generator)<`T`\> | `undefined` | The Nx generator to convert to an Angular Devkit Schematic. | +| `skipWritingConfigInOldFormat` | `boolean` | `false` | Whether to skip writing the configuration in the old format (the one used by the Angular DevKit). | + +#### Returns + +`fn` + +▸ (`generatorOptions`): (`tree`: `any`, `context`: `any`) => `Promise`<`any`\> + +##### Parameters + +| Name | Type | +| :----------------- | :--- | +| `generatorOptions` | `T` | + +##### Returns + +`fn` + +▸ (`tree`, `context`): `Promise`<`any`\> + +##### Parameters + +| Name | Type | +| :-------- | :---- | +| `tree` | `any` | +| `context` | `any` | + +##### Returns + +`Promise`<`any`\> + +--- + +### createLockFile + +▸ **createLockFile**(`packageJson`, `packageManager?`): `string` + +Create lock file based on the root level lock file and (pruned) package.json + +#### Parameters + +| Name | Type | +| :--------------- | :---------------------------------------------------- | +| `packageJson` | `PackageJson` | +| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) | + +#### Returns + +`string` + +--- + +### createPackageJson + +▸ **createPackageJson**(`projectName`, `graph`, `options?`): `PackageJson` + +Creates a package.json in the output directory for support to install dependencies within containers. + +If a package.json exists in the project, it will reuse that. +If isProduction flag is set, it wil remove devDependencies and optional peerDependencies + +#### Parameters + +| Name | Type | +| :---------------------- | :-------------------------------------------------------- | +| `projectName` | `string` | +| `graph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\> | +| `options` | `Object` | +| `options.isProduction?` | `boolean` | +| `options.root?` | `string` | + +#### Returns + +`PackageJson` + +--- + +### createProjectGraphAsync + +▸ **createProjectGraphAsync**(`opts?`): `Promise`<[`ProjectGraph`](../../devkit/index#projectgraph)\> + +Computes and returns a ProjectGraph. + +Nx will compute the graph either in a daemon process or in the current process. + +Nx will compute it in the current process if: + +- The process is running in CI (CI env variable is to true or other common variables used by CI providers are set). +- It is running in the docker container. +- The daemon process is disabled because of the previous error when starting the daemon. +- `NX_DAEMON` is set to `false`. +- `useDaemon` is set to false in `nx.json` + +`NX_DAEMON` env variable takes precedence: + +- If it is set to true, the daemon will always be used. +- If it is set to false, the graph will always be computed in the current process. + +Tip: If you want to debug project graph creation, run your command with NX_DAEMON=false. + +Nx uses two layers of caching: the information about explicit dependencies stored on the disk and the information +stored in the daemon process. To reset both run: `nx reset`. + +#### Parameters + +| Name | Type | +| :------------------------ | :-------- | +| `opts` | `Object` | +| `opts.exitOnError` | `boolean` | +| `opts.resetDaemonClient?` | `boolean` | + +#### Returns + +`Promise`<[`ProjectGraph`](../../devkit/index#projectgraph)\> + +--- + +### defaultTasksRunner + +▸ `Const` **defaultTasksRunner**(`tasks`, `options`, `context?`): `any` + +#### Parameters + +| Name | Type | +| :--------------------------- | :------------------------------------------------------------------------------------ | +| `tasks` | [`Task`](../../devkit/index#task)[] | +| `options` | [`DefaultTasksRunnerOptions`](../../devkit/index#defaulttasksrunneroptions) | +| `context?` | `Object` | +| `context.daemon?` | `DaemonClient` | +| `context.hasher?` | [`Hasher`](../../devkit/index#hasher) | +| `context.initiatingProject?` | `string` | +| `context.nxArgs` | `NxArgs` | +| `context.nxJson` | [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)<`string`[] \| `"*"`\> | +| `context.projectGraph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\> | +| `context.target?` | `string` | +| `context.taskGraph?` | [`TaskGraph`](../../devkit/index#taskgraph) | + +#### Returns + +`any` + +--- + +### detectPackageManager + +▸ **detectPackageManager**(`dir?`): [`PackageManager`](../../devkit/index#packagemanager) + +Detects which package manager is used in the workspace based on the lock file. + +#### Parameters + +| Name | Type | Default value | +| :---- | :------- | :------------ | +| `dir` | `string` | `''` | + +#### Returns + +[`PackageManager`](../../devkit/index#packagemanager) + +--- + +### detectWorkspaceScope + +▸ **detectWorkspaceScope**(`packageName`): `string` + +Detect workspace scope from the package.json name + +#### Parameters + +| Name | Type | +| :------------ | :------- | +| `packageName` | `string` | + +#### Returns + +`string` + +--- + +### ensurePackage + +▸ **ensurePackage**(`tree`, `pkg`, `requiredVersion`, `options?`): `Promise`<`void`\> + +Ensure that dependencies and devDependencies from package.json are installed at the required versions. + +For example: + +```typescript +ensurePackage(tree, {}, { '@nrwl/jest': nxVersion }); +``` + +This will check that @nrwl/jest@ exists in devDependencies. +If it exists then function returns, otherwise it will install the package before continuing. +When running with --dryRun, the function will throw when dependencies are missing. + +#### Parameters + +| Name | Type | Description | +| :------------------------ | :-------------------------------- | :----------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree | +| `pkg` | `string` | the package to check (e.g. @nrwl/jest) | +| `requiredVersion` | `string` | the version or semver range to check (e.g. ~1.0.0, >=1.0.0 <2.0.0) | +| `options` | `Object` | | +| `options.dev?` | `boolean` | - | +| `options.throwOnMissing?` | `boolean` | - | + +#### Returns + +`Promise`<`void`\> + +--- + +### extractLayoutDirectory + +▸ **extractLayoutDirectory**(`directory`): `Object` + +Experimental + +#### Parameters + +| Name | Type | +| :---------- | :------- | +| `directory` | `string` | + +#### Returns + +`Object` + +| Name | Type | +| :----------------- | :------- | +| `layoutDirectory` | `string` | +| `projectDirectory` | `string` | + +--- + +### formatFiles + +▸ **formatFiles**(`tree`): `Promise`<`void`\> + +Formats all the created or updated files using Prettier + +#### Parameters + +| Name | Type | Description | +| :----- | :-------------------------------- | :------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree | + +#### Returns + +`Promise`<`void`\> + +--- + +### generateFiles + +▸ **generateFiles**(`tree`, `srcFolder`, `target`, `substitutions`): `void` + +Generates a folder of files based on provided templates. + +While doing so it performs two substitutions: + +- Substitutes segments of file names surrounded by \_\_ +- Uses ejs to substitute values in templates + +Examples: + +```typescript +generateFiles(tree, path.join(__dirname, 'files'), './tools/scripts', { + tmpl: '', + name: 'myscript', +}); +``` + +This command will take all the files from the `files` directory next to the place where the command is invoked from. +It will replace all `__tmpl__` with '' and all `__name__` with 'myscript' in the file names, and will replace all +`<%= name %>` with `myscript` in the files themselves. +`tmpl: ''` is a common pattern. With it you can name files like this: `index.ts__tmpl__`, so your editor +doesn't get confused about incorrect TypeScript files. + +#### Parameters + +| Name | Type | Description | +| :-------------- | :-------------------------------- | :-------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree | +| `srcFolder` | `string` | the source folder of files (absolute path) | +| `target` | `string` | the target folder (relative to the tree root) | +| `substitutions` | `Object` | an object of key-value pairs | + +#### Returns + +`void` + +--- + +### getDependentPackagesForProject + +▸ **getDependentPackagesForProject**(`projectGraph`, `name`): `Object` + +#### Parameters + +| Name | Type | +| :------------- | :-------------------------------------------------------- | +| `projectGraph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\> | +| `name` | `string` | + +#### Returns + +`Object` + +| Name | Type | +| :------------------- | :---------------------------------------------------------- | +| `npmPackages` | `string`[] | +| `workspaceLibraries` | [`WorkspaceLibrary`](../../devkit/index#workspacelibrary)[] | + +--- + +### getImportPath + +▸ **getImportPath**(`npmScope`, `projectDirectory`): `string` + +Prefixes project name with npm scope + +#### Parameters + +| Name | Type | +| :----------------- | :------- | +| `npmScope` | `string` | +| `projectDirectory` | `string` | + +#### Returns + +`string` + +--- + +### getNpmPackageSharedConfig + +▸ **getNpmPackageSharedConfig**(`pkgName`, `version`): [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) \| `undefined` + +Build the Module Federation Share Config for a specific package and the +specified version of that package. + +#### Parameters + +| Name | Type | Description | +| :-------- | :------- | :----------------------------------------------------------------------------- | +| `pkgName` | `string` | Name of the package to share | +| `version` | `string` | Version of the package to require by other apps in the Module Federation setup | + +#### Returns + +[`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig) \| `undefined` + +--- + +### getOutputsForTargetAndConfiguration + +▸ **getOutputsForTargetAndConfiguration**(`task`, `node`): `string`[] + +Returns the list of outputs that will be cached. + +#### Parameters + +| Name | Type | Description | +| :----- | :------------------------------------------------------------------------------ | :-------------------------------------------------------- | +| `task` | `Pick`<[`Task`](../../devkit/index#task), `"overrides"` \| `"target"`\> | target + overrides | +| `node` | [`ProjectGraphProjectNode`](../../devkit/index#projectgraphprojectnode)<`any`\> | ProjectGraphProjectNode object that the task runs against | + +#### Returns + +`string`[] + +--- + +### getPackageManagerCommand + +▸ **getPackageManagerCommand**(`packageManager?`): `PackageManagerCommands` + +Returns commands for the package manager used in the workspace. +By default, the package manager is derived based on the lock file, +but it can also be passed in explicitly. + +Example: + +```javascript +execSync(`${getPackageManagerCommand().addDev} my-dev-package`); +``` + +#### Parameters + +| Name | Type | +| :--------------- | :---------------------------------------------------- | +| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) | + +#### Returns + +`PackageManagerCommands` + +--- + +### getPackageManagerVersion + +▸ **getPackageManagerVersion**(`packageManager?`): `string` + +Returns the version of the package manager used in the workspace. +By default, the package manager is derived based on the lock file, +but it can also be passed in explicitly. + +#### Parameters + +| Name | Type | +| :--------------- | :---------------------------------------------------- | +| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) | + +#### Returns + +`string` + +--- + +### getProjects + +▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../devkit/index#projectconfiguration)\> + +Get a map of all projects in a workspace. + +Use [readProjectConfiguration](../../devkit/index#readprojectconfiguration) if only one project is needed. + +#### Parameters + +| Name | Type | +| :----- | :-------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | + +#### Returns + +`Map`<`string`, [`ProjectConfiguration`](../../devkit/index#projectconfiguration)\> + +--- + +### getWorkspaceLayout + +▸ **getWorkspaceLayout**(`tree`): `Object` + +Returns workspace defaults. It includes defaults folders for apps and libs, +and the default scope. + +Example: + +```typescript +{ appsDir: 'apps', libsDir: 'libs', npmScope: 'myorg' } +``` + +#### Parameters + +| Name | Type | Description | +| :----- | :-------------------------------- | :--------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | file system tree | + +#### Returns + +`Object` + +| Name | Type | +| :-------------------- | :-------- | +| `appsDir` | `string` | +| `libsDir` | `string` | +| `npmScope` | `string` | +| `standaloneAsDefault` | `boolean` | + +--- + +### getWorkspacePath + +▸ **getWorkspacePath**(`tree`): `"/angular.json"` \| `"/workspace.json"` \| `null` + +#### Parameters + +| Name | Type | +| :----- | :-------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | + +#### Returns + +`"/angular.json"` \| `"/workspace.json"` \| `null` + +--- + +### installPackagesTask + +▸ **installPackagesTask**(`tree`, `alwaysRun?`, `cwd?`, `packageManager?`): `void` + +Runs `npm install` or `yarn install`. It will skip running the install if +`package.json` hasn't changed at all or it hasn't changed since the last invocation. + +#### Parameters + +| Name | Type | Default value | Description | +| :--------------- | :---------------------------------------------------- | :------------ | :------------------------------------------------------------ | +| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | the file system tree | +| `alwaysRun` | `boolean` | `false` | always run the command even if `package.json` hasn't changed. | +| `cwd` | `string` | `''` | - | +| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) | `undefined` | - | + +#### Returns + +`void` + +--- + +### isStandaloneProject + +▸ **isStandaloneProject**(`tree`, `project`): `boolean` + +Returns if a project has a standalone configuration (project.json). + +#### Parameters + +| Name | Type | Description | +| :-------- | :-------------------------------- | :------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree | +| `project` | `string` | the project name | + +#### Returns + +`boolean` + +--- + +### joinPathFragments + +▸ **joinPathFragments**(...`fragments`): `string` + +Normalized path fragments and joins them + +#### Parameters + +| Name | Type | +| :------------- | :--------- | +| `...fragments` | `string`[] | + +#### Returns + +`string` + +--- + +### mapRemotes + +▸ **mapRemotes**(`remotes`, `remoteEntryExt`, `determineRemoteUrl`): `Record`<`string`, `string`\> + +Map remote names to a format that can be understood and used by Module +Federation. + +#### Parameters + +| Name | Type | Description | +| :------------------- | :-------------------------------------- | :------------------------------------------------------- | +| `remotes` | [`Remotes`](../../devkit/index#remotes) | The remotes to map | +| `remoteEntryExt` | `"js"` \| `"mjs"` | The file extension of the remoteEntry file | +| `determineRemoteUrl` | (`remote`: `string`) => `string` | The function used to lookup the URL of the served remote | + +#### Returns + +`Record`<`string`, `string`\> + +--- + +### mapRemotesForSSR + +▸ **mapRemotesForSSR**(`remotes`, `remoteEntryExt`, `determineRemoteUrl`): `Record`<`string`, `string`\> + +Map remote names to a format that can be understood and used by Module +Federation. + +#### Parameters + +| Name | Type | Description | +| :------------------- | :-------------------------------------- | :------------------------------------------------------- | +| `remotes` | [`Remotes`](../../devkit/index#remotes) | The remotes to map | +| `remoteEntryExt` | `"js"` \| `"mjs"` | The file extension of the remoteEntry file | +| `determineRemoteUrl` | (`remote`: `string`) => `string` | The function used to lookup the URL of the served remote | + +#### Returns + +`Record`<`string`, `string`\> + +--- + +### moveFilesToNewDirectory + +▸ **moveFilesToNewDirectory**(`tree`, `oldDir`, `newDir`): `void` + +Analogous to cp -r oldDir newDir + +#### Parameters + +| Name | Type | +| :------- | :-------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | +| `oldDir` | `string` | +| `newDir` | `string` | + +#### Returns + +`void` + +--- + +### names + +▸ **names**(`name`): `Object` + +Util function to generate different strings based off the provided name. + +Examples: + +```typescript +names('my-name'); // {name: 'my-name', className: 'MyName', propertyName: 'myName', constantName: 'MY_NAME', fileName: 'my-name'} +names('myName'); // {name: 'myName', className: 'MyName', propertyName: 'myName', constantName: 'MY_NAME', fileName: 'my-name'} +``` + +#### Parameters + +| Name | Type | +| :----- | :------- | +| `name` | `string` | + +#### Returns + +`Object` + +| Name | Type | +| :------------- | :------- | +| `className` | `string` | +| `constantName` | `string` | +| `fileName` | `string` | +| `name` | `string` | +| `propertyName` | `string` | + +--- + +### normalizePath + +▸ **normalizePath**(`osSpecificPath`): `string` + +Coverts an os specific path to a unix style path + +#### Parameters + +| Name | Type | +| :--------------- | :------- | +| `osSpecificPath` | `string` | + +#### Returns + +`string` + +--- + +### offsetFromRoot + +▸ **offsetFromRoot**(`fullPathToDir`): `string` + +Calculates an offset from the root of the workspace, which is useful for +constructing relative URLs. + +Examples: + +```typescript +offsetFromRoot('apps/mydir/myapp/'); // returns "../../../" +``` + +#### Parameters + +| Name | Type | Description | +| :-------------- | :------- | :------------- | +| `fullPathToDir` | `string` | directory path | + +#### Returns + +`string` + +--- + +### parseJson + +▸ **parseJson**<`T`\>(`input`, `options?`): `T` + +Parses the given JSON string and returns the object the JSON content represents. +By default javascript-style comments are allowed. + +#### Type parameters + +| Name | Type | +| :--- | :----------------------- | +| `T` | extends `object` = `any` | + +#### Parameters + +| Name | Type | Description | +| :--------- | :-------------------------------------------------------- | :--------------------- | +| `input` | `string` | JSON content as string | +| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) | JSON parse options | + +#### Returns + +`T` + +Object the JSON content represents + +--- + +### parseTargetString + +▸ **parseTargetString**(`targetString`): [`Target`](../../devkit/index#target) + +Parses a target string into {project, target, configuration} + +Examples: + +```typescript +parseTargetString('proj:test'); // returns { project: "proj", target: "test" } +parseTargetString('proj:test:production'); // returns { project: "proj", target: "test", configuration: "production" } +``` + +#### Parameters + +| Name | Type | Description | +| :------------- | :------- | :--------------- | +| `targetString` | `string` | target reference | + +#### Returns + +[`Target`](../../devkit/index#target) + +--- + +### readAllWorkspaceConfiguration + +▸ **readAllWorkspaceConfiguration**(): [`ProjectsConfigurations`](../../devkit/index#projectsconfigurations) & [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration) + +**`deprecated`** Use readProjectsConfigurationFromProjectGraph(await createProjectGraphAsync()) + +#### Returns + +[`ProjectsConfigurations`](../../devkit/index#projectsconfigurations) & [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration) + +--- + +### readCachedProjectGraph + +▸ **readCachedProjectGraph**(): [`ProjectGraph`](../../devkit/index#projectgraph)<[`ProjectConfiguration`](../../devkit/index#projectconfiguration)\> + +Synchronously reads the latest cached copy of the workspace's ProjectGraph. + +**`throws`** {Error} if there is no cached ProjectGraph to read from + +#### Returns + +[`ProjectGraph`](../../devkit/index#projectgraph)<[`ProjectConfiguration`](../../devkit/index#projectconfiguration)\> + +--- + +### readJson + +▸ **readJson**<`T`\>(`tree`, `path`, `options?`): `T` + +Reads a json file, removes all comments and parses JSON. + +#### Type parameters + +| Name | Type | +| :--- | :----------------------- | +| `T` | extends `object` = `any` | + +#### Parameters + +| Name | Type | Description | +| :--------- | :-------------------------------------------------------- | :-------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | file system tree | +| `path` | `string` | file path | +| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) | Optional JSON Parse Options | + +#### Returns + +`T` + +--- + +### readJsonFile + +▸ **readJsonFile**<`T`\>(`path`, `options?`): `T` + +Reads a JSON file and returns the object the JSON content represents. + +#### Type parameters + +| Name | Type | +| :--- | :----------------------- | +| `T` | extends `object` = `any` | + +#### Parameters + +| Name | Type | Description | +| :--------- | :---------------- | :----------------- | +| `path` | `string` | A path to a file. | +| `options?` | `JsonReadOptions` | JSON parse options | + +#### Returns + +`T` + +Object the JSON content of the file represents + +--- + +### readNxJson + +▸ **readNxJson**(): [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration) + +#### Returns + +[`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration) + +--- + +### readProjectConfiguration + +▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../devkit/index#projectconfiguration) + +Reads a project configuration. + +The project configuration is stored in workspace.json or the associated project.json file. +The utility will read from either file. + +**`throws`** If supplied projectName cannot be found + +#### Parameters + +| Name | Type | Description | +| :------------ | :-------------------------------- | :---------------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree | +| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | + +#### Returns + +[`ProjectConfiguration`](../../devkit/index#projectconfiguration) + +--- + +### readRootPackageJson + +▸ **readRootPackageJson**(): `Object` + +#### Returns + +`Object` + +| Name | Type | +| :----------------- | :------- | +| `dependencies?` | `Object` | +| `devDependencies?` | `Object` | + +--- + +### readTargetOptions + +▸ **readTargetOptions**<`T`\>(`__namedParameters`, `context`): `T` + +Reads and combines options for a given target. + +Works as if you invoked the target yourself without passing any command lint overrides. + +#### Type parameters + +| Name | Type | +| :--- | :---- | +| `T` | `any` | + +#### Parameters + +| Name | Type | +| :------------------ | :------------------------------------------------------ | +| `__namedParameters` | [`Target`](../../devkit/index#target) | +| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) | + +#### Returns + +`T` + +--- + +### readWorkspaceConfiguration + +▸ **readWorkspaceConfiguration**(`tree`): [`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration) + +Read general workspace configuration such as the default project or cli settings + +This does _not_ provide projects configuration, use [readProjectConfiguration](../../devkit/index#readprojectconfiguration) instead. + +#### Parameters + +| Name | Type | +| :----- | :-------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | + +#### Returns + +[`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration) + +--- + +### removeDependenciesFromPackageJson + +▸ **removeDependenciesFromPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../devkit/index#generatorcallback) + +Remove Dependencies and Dev Dependencies from package.json + +For example: + +```typescript +removeDependenciesFromPackageJson(tree, ['react'], ['jest']); +``` + +This will **remove** `react` and `jest` from the dependencies and devDependencies sections of package.json respectively. + +#### Parameters + +| Name | Type | Default value | Description | +| :---------------- | :-------------------------------- | :--------------- | :-------------------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | - | +| `dependencies` | `string`[] | `undefined` | Dependencies to be removed from the dependencies section of package.json | +| `devDependencies` | `string`[] | `undefined` | Dependencies to be removed from the devDependencies section of package.json | +| `packageJsonPath` | `string` | `'package.json'` | - | + +#### Returns + +[`GeneratorCallback`](../../devkit/index#generatorcallback) + +Callback to uninstall dependencies only if necessary. undefined is returned if changes are not necessary. + +--- + +### removeProjectConfiguration + +▸ **removeProjectConfiguration**(`tree`, `projectName`): `void` + +Removes the configuration of an existing project. + +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either file. + +#### Parameters + +| Name | Type | +| :------------ | :-------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | +| `projectName` | `string` | + +#### Returns + +`void` + +--- + +### reverse + +▸ **reverse**(`graph`): [`ProjectGraph`](../../devkit/index#projectgraph) + +Returns a new project graph where all the edges are reversed. + +For instance, if project A depends on B, in the reversed graph +B will depend on A. + +#### Parameters + +| Name | Type | +| :------ | :-------------------------------------------------------- | +| `graph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\> | + +#### Returns + +[`ProjectGraph`](../../devkit/index#projectgraph) + +--- + +### runExecutor + +▸ **runExecutor**<`T`\>(`targetDescription`, `overrides`, `context`): `Promise`<`AsyncIterableIterator`<`T`\>\> + +Loads and invokes executor. + +This is analogous to invoking executor from the terminal, with the exception +that the params aren't parsed from the string, but instead provided parsed already. + +Apart from that, it works the same way: + +- it will load the workspace configuration +- it will resolve the target +- it will load the executor and the schema +- it will load the options for the appropriate configuration +- it will run the validations and will set the default +- and, of course, it will invoke the executor + +Example: + +```typescript +for await (const s of await runExecutor( + { project: 'myproj', target: 'serve' }, + { watch: true }, + context +)) { + // s.success +} +``` + +Note that the return value is a promise of an iterator, so you need to await before iterating over it. + +#### Type parameters + +| Name | Type | +| :--- | :--------------- | +| `T` | extends `Object` | + +#### Parameters + +| Name | Type | +| :--------------------------------- | :------------------------------------------------------ | +| `targetDescription` | `Object` | +| `targetDescription.configuration?` | `string` | +| `targetDescription.project` | `string` | +| `targetDescription.target` | `string` | +| `overrides` | `Object` | +| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) | + +#### Returns + +`Promise`<`AsyncIterableIterator`<`T`\>\> + +--- + +### serializeJson + +▸ **serializeJson**<`T`\>(`input`, `options?`): `string` + +Serializes the given data to a JSON string. +By default the JSON string is formatted with a 2 space intendation to be easy readable. + +#### Type parameters + +| Name | Type | +| :--- | :-------------------------- | +| `T` | extends `object` = `object` | + +#### Parameters + +| Name | Type | Description | +| :--------- | :---------------------------------------------------------------- | :---------------------------------------- | +| `input` | `T` | Object which should be serialized to JSON | +| `options?` | [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | JSON serialize options | + +#### Returns + +`string` + +the formatted JSON representation of the object + +--- + +### sharePackages + +▸ **sharePackages**(`packages`): `Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\> + +Create a dictionary of packages and their Module Federation Shared Config +from an array of package names. + +Lookup the versions of the packages from the root package.json file in the +workspace. + +#### Parameters + +| Name | Type | Description | +| :--------- | :--------- | :-------------------------------- | +| `packages` | `string`[] | Array of package names as strings | + +#### Returns + +`Record`<`string`, [`SharedLibraryConfig`](../../devkit/index#sharedlibraryconfig)\> + +--- + +### shareWorkspaceLibraries + +▸ **shareWorkspaceLibraries**(`libraries`, `tsConfigPath?`): [`SharedWorkspaceLibraryConfig`](../../devkit/index#sharedworkspacelibraryconfig) + +Build an object of functions to be used with the ModuleFederationPlugin to +share Nx Workspace Libraries between Hosts and Remotes. + +#### Parameters + +| Name | Type | Description | +| :------------- | :---------------------------------------------------------- | :--------------------------------------------------------------------------- | +| `libraries` | [`WorkspaceLibrary`](../../devkit/index#workspacelibrary)[] | The Nx Workspace Libraries to share | +| `tsConfigPath` | `string` | The path to TS Config File that contains the Path Mappings for the Libraries | + +#### Returns + +[`SharedWorkspaceLibraryConfig`](../../devkit/index#sharedworkspacelibraryconfig) + +--- + +### stripIndents + +▸ **stripIndents**(`strings`, ...`values`): `string` + +Removes indents, which is useful for printing warning and messages. + +Example: + +```typescript +stripIndents` + Options: + - option1 + - option2 +`; +``` + +#### Parameters + +| Name | Type | +| :---------- | :--------------------- | +| `strings` | `TemplateStringsArray` | +| `...values` | `any`[] | + +#### Returns + +`string` + +--- + +### stripJsonComments + +▸ `Const` **stripJsonComments**(`text`, `replaceCh?`): `string` + +Takes JSON with JavaScript-style comments and remove +them. Optionally replaces every none-newline character +of comments with a replaceCharacter + +#### Parameters + +| Name | Type | +| :----------- | :------- | +| `text` | `string` | +| `replaceCh?` | `string` | + +#### Returns + +`string` + +--- + +### targetToTargetString + +▸ **targetToTargetString**(`target`): `string` + +Returns a string in the format "project:target[:configuration]" for the target + +#### Parameters + +| Name | Type | Description | +| :------- | :------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `target` | [`Target`](../../devkit/index#target) | target object Examples: `typescript targetToTargetString({ project: "proj", target: "test" }) // returns "proj:test" targetToTargetString({ project: "proj", target: "test", configuration: "production" }) // returns "proj:test:production" ` | + +#### Returns + +`string` + +--- + +### toJS + +▸ **toJS**(`tree`): `void` + +Rename and transpile any new typescript files created to javascript files + +#### Parameters + +| Name | Type | +| :----- | :-------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | + +#### Returns + +`void` + +--- + +### updateJson + +▸ **updateJson**<`T`, `U`\>(`tree`, `path`, `updater`, `options?`): `void` + +Updates a JSON value to the file system tree + +#### Type parameters + +| Name | Type | +| :--- | :----------------------- | +| `T` | extends `object` = `any` | +| `U` | extends `object` = `T` | + +#### Parameters + +| Name | Type | Description | +| :--------- | :---------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | File system tree | +| `path` | `string` | Path of JSON file in the Tree | +| `updater` | (`value`: `T`) => `U` | Function that maps the current value of a JSON document to a new value to be written to the document | +| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) & [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | Optional JSON Parse and Serialize Options | + +#### Returns + +`void` + +--- + +### updateProjectConfiguration + +▸ **updateProjectConfiguration**(`tree`, `projectName`, `projectConfiguration`): `void` + +Updates the configuration of an existing project. + +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. + +#### Parameters + +| Name | Type | Description | +| :--------------------- | :---------------------------------------------------------------- | :---------------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree | +| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../devkit/index#projectconfiguration) | project configuration | + +#### Returns + +`void` + +--- + +### updateTsConfigsToJs + +▸ **updateTsConfigsToJs**(`tree`, `options`): `void` + +#### Parameters + +| Name | Type | +| :-------------------- | :-------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | +| `options` | `Object` | +| `options.projectRoot` | `string` | + +#### Returns + +`void` + +--- + +### updateWorkspaceConfiguration + +▸ **updateWorkspaceConfiguration**(`tree`, `workspaceConfig`): `void` + +Update general workspace configuration such as the default project or cli settings. + +This does _not_ update projects configuration, use [updateProjectConfiguration](../../devkit/index#updateprojectconfiguration) or [addProjectConfiguration](../../devkit/index#addprojectconfiguration) instead. + +#### Parameters + +| Name | Type | +| :---------------- | :-------------------------------------------------------------------- | +| `tree` | [`Tree`](../../devkit/index#tree) | +| `workspaceConfig` | [`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration) | + +#### Returns + +`void` + +--- + +### visitNotIgnoredFiles + +▸ **visitNotIgnoredFiles**(`tree`, `dirPath?`, `visitor`): `void` + +Utility to act on all files in a tree that are not ignored by git. + +#### Parameters + +| Name | Type | Default value | +| :-------- | :-------------------------------- | :------------ | +| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | +| `dirPath` | `string` | `tree.root` | +| `visitor` | (`path`: `string`) => `void` | `undefined` | + +#### Returns + +`void` + +--- + +### workspaceLayout + +▸ **workspaceLayout**(): `Object` + +Returns information about where apps and libs will be created. + +#### Returns + +`Object` + +| Name | Type | +| :-------- | :------- | +| `appsDir` | `string` | +| `libsDir` | `string` | + +--- + +### writeJson + +▸ **writeJson**<`T`\>(`tree`, `path`, `value`, `options?`): `void` + +Writes a JSON value to the file system tree + +#### Type parameters + +| Name | Type | +| :--- | :-------------------------- | +| `T` | extends `object` = `object` | + +#### Parameters + +| Name | Type | Description | +| :--------- | :---------------------------------------------------------------- | :------------------------------ | +| `tree` | [`Tree`](../../devkit/index#tree) | File system tree | +| `path` | `string` | Path of JSON file in the Tree | +| `value` | `T` | Serializable value to write | +| `options?` | [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | Optional JSON Serialize Options | + +#### Returns + +`void` + +--- + +### writeJsonFile + +▸ **writeJsonFile**<`T`\>(`path`, `data`, `options?`): `void` + +Serializes the given data to JSON and writes it to a file. + +#### Type parameters + +| Name | Type | +| :--- | :-------------------------- | +| `T` | extends `object` = `object` | + +#### Parameters + +| Name | Type | Description | +| :--------- | :----------------- | :-------------------------------------------------------------- | +| `path` | `string` | A path to a file. | +| `data` | `T` | data which should be serialized to JSON and written to the file | +| `options?` | `JsonWriteOptions` | JSON serialize options | + +#### Returns + +`void` diff --git a/docs/generated/packages/devkit/documents/ngcli_adapter.md b/docs/generated/packages/devkit/documents/ngcli_adapter.md new file mode 100644 index 0000000000000..dd62a5fbc75c8 --- /dev/null +++ b/docs/generated/packages/devkit/documents/ngcli_adapter.md @@ -0,0 +1,118 @@ +# Module: ngcli-adapter + +## Table of contents + +### Ng CLI Adapter Classes + +- [NxScopedHost](../../devkit/ngcli_adapter#nxscopedhost) + +### Functions + +- [mockSchematicsForTesting](../../devkit/ngcli_adapter#mockschematicsfortesting) +- [overrideCollectionResolutionForTesting](../../devkit/ngcli_adapter#overridecollectionresolutionfortesting) +- [wrapAngularDevkitSchematic](../../devkit/ngcli_adapter#wrapangulardevkitschematic) + +## Ng CLI Adapter Classes + +### NxScopedHost + +• **NxScopedHost**: `Object` + +## Functions + +### mockSchematicsForTesting + +▸ **mockSchematicsForTesting**(`schematics`): `void` + +If you have an Nx Devkit generator invoking the wrapped Angular Devkit schematic, +and you don't want the Angular Devkit schematic to run, you can mock it up using this function. + +Unfortunately, there are some edge cases in the Nx-Angular devkit integration that +can be seen in the unit tests context. This function is useful for handling that as well. + +In this case, you can mock it up. + +Example: + +```typescript +mockSchematicsForTesting({ + 'mycollection:myschematic': (tree, params) => { + tree.write('README.md'); + }, +}); +``` + +#### Parameters + +| Name | Type | +| :----------- | :------- | +| `schematics` | `Object` | + +#### Returns + +`void` + +--- + +### overrideCollectionResolutionForTesting + +▸ **overrideCollectionResolutionForTesting**(`collections`): `void` + +By default, Angular Devkit schematic collections will be resolved using the Node resolution. +This doesn't work if you are testing schematics that refer to other schematics in the +same repo. + +This function can can be used to override the resolution behaviour. + +Example: + +```typescript +overrideCollectionResolutionForTesting({ + '@nrwl/workspace': path.join( + __dirname, + '../../../../workspace/generators.json' + ), + '@nrwl/angular': path.join(__dirname, '../../../../angular/generators.json'), + '@nrwl/linter': path.join(__dirname, '../../../../linter/generators.json'), +}); +``` + +#### Parameters + +| Name | Type | +| :------------ | :------- | +| `collections` | `Object` | + +#### Returns + +`void` + +--- + +### wrapAngularDevkitSchematic + +▸ **wrapAngularDevkitSchematic**(`collectionName`, `generatorName`): (`host`: [`Tree`](../../devkit/index#tree), `generatorOptions`: { [k: string]: `any`; }) => `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :--------------- | :------- | +| `collectionName` | `string` | +| `generatorName` | `string` | + +#### Returns + +`fn` + +▸ (`host`, `generatorOptions`): `Promise`<`any`\> + +##### Parameters + +| Name | Type | +| :----------------- | :-------------------------------- | +| `host` | [`Tree`](../../devkit/index#tree) | +| `generatorOptions` | `Object` | + +##### Returns + +`Promise`<`any`\> diff --git a/docs/generated/packages/esbuild.json b/docs/generated/packages/esbuild.json deleted file mode 100644 index 9ffae1c065ea5..0000000000000 --- a/docs/generated/packages/esbuild.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "esbuild", - "packageName": "@nrwl/esbuild", - "description": "The Nx Plugin for esbuild contains executors and generators that support building applications using esbuild", - "root": "/packages/esbuild", - "source": "/packages/esbuild/src", - "documentation": [ - { - "name": "Overview", - "id": "overview", - "path": "/packages/esbuild", - "file": "shared/esbuild-plugin", - "content": "The Nx Plugin for [esbuild](https://esbuild.github.io/api/), an extremely fast JavaScript bundler.\n\nWhy should you use this plugin?\n\n- _Fast_ builds using esbuild.\n- Type-checking using TypeScript, which esbuild does not handle.\n- Intelligent `package.json` output.\n- Additional [assets](/packages/esbuild/executors/esbuild#assets) for the output.\n\n## Setting up esbuild\n\nTo create a new workspace, run `npx create-nx-workspace@latest --preset=npm`.\n\nTo add the esbuild plugin to an existing workspace, run the following:\n\n{% tabs %}\n{% tab label=\"npm\" %}\n\n```shell\nnpm install -D @nrwl/esbuild\n```\n\n{% /tab %}\n{% tab label=\"yarn\" %}\n\n```shell\nyarn add -D @nrwl/esbuild\n```\n\n{% /tab %}\n{% /tabs %}\n\n### Creating a new JS library\n\nYou can add a new library that builds using esbuild with:\n\n```shell\nnx g @nrwl/js:lib mylib --bundler=esbuild\n```\n\nThis command will install the esbuild plugin if needed, and set `@nrwl/esbuild:esbuild` executor for the `build` target.\n\n### Adding esbuild target to existing libraries\n\nIf you already have a JS project that you want to use esbuild for, run this command:\n\n```shell\nnx g esbuild-project mylib\n```\n\nThis generator validates there isn't an existing `build` target. If you want to overwrite the existing target you can pass the `--skipValidation` option.\n\n```shell\nnx g esbuild-project mylib --skipValidation\n```\n\n## Using esbuild\n\nYou can run builds with:\n\n```shell\nnx build mylib\n```\n\nReplace `mylib` with the name or your project. This command works for both applications and libraries.\n\n### Copying assets\n\nAssets are non-JS and non-TS files, such as images, CSS, etc. You can add them to the project configuration as follows.\n\n```jsonc\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n //...\n \"assets\": [\n { \"input\": \"libs/mylib\", \"glob\": \"README.md\", \"output\": \"/\" },\n { \"input\": \"libs/mylib\", \"glob\": \"logo.png\", \"output\": \"/\" },\n { \"input\": \"libs/mylib\", \"glob\": \"docs/**/*.md\", \"output\": \"/docs\" },\n //...\n ]\n }\n}\n```\n\nRunning `nx build mylib` outputs something like this.\n\n```text\ndist/libs/mylib/\n├── README.md\n├── docs\n│ ├── CONTRIBUTING.md\n│ └── TESTING.md\n├── index.js\n├── logo.png\n└── package.json\n```\n\n### Generating a metafile\n\nA metafile can be generated by passing the `--metafile` option. This file contains information about the build that can be analyzed by other tools, such as [bundle buddy](https://www.bundle-buddy.com/esbuild).\n\n```shell\nnx build mylib --metafile\n```\n\nThis command will generate a `meta.json` file in the output directory.\n\n```text\ndist/libs/mylib/\n├── README.md\n├── index.js\n├── meta.json\n└── package.json\n```\n\n### Custom esbuild options\n\nExtra API options for esbuild can be passed in the `esbuildOptions` object for your project configuration.\n\n```jsonc\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n //...\n \"esbuildOptions\": {\n \"banner\": { \".js\": \"// banner\" },\n \"footer\": { \".js\": \"// footer\" }\n }\n }\n}\n```\n\n## More Documentation\n\n- [Using JS](/packages/js)\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#esbuildInitGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxWebpackInit", - "cli": "nx", - "title": "Init Webpack Plugin", - "description": "Init Webpack Plugin.", - "type": "object", - "properties": { - "compiler": { - "type": "string", - "enum": ["babel", "swc", "tsc"], - "description": "The compiler to initialize for.", - "default": "babel" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/esbuild` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/esbuild/src/generators/init/init#esbuildInitGenerator.ts", - "path": "/packages/esbuild/src/generators/init/schema.json" - }, - { - "name": "esbuild-project", - "factory": "./src/generators/esbuild-project/esbuild-project#esbuildProjectGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxEsBuildProject", - "cli": "nx", - "title": "Add esbuild configuration to a project", - "description": "Add esbuild configuration to a project.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "$default": { "$source": "argv", "index": 0 }, - "x-dropdown": "project", - "x-prompt": "What is the name of the project to set up a esbuild for?" - }, - "main": { - "type": "string", - "description": "Path relative to the workspace root for the main entry file. Defaults to `/src/main.ts` or `src/index.ts`, whichever is found.", - "alias": "entryFile" - }, - "tsConfig": { - "type": "string", - "description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to `/tsconfig.app.json` or `/tsconfig.lib.json`, whichever is found." - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "skipValidation": { - "type": "boolean", - "default": false, - "description": "Do not perform any validation on existing project." - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like `@myorg/my-awesome-lib`." - }, - "platform": { - "type": "string", - "description": "Platform target for outputs.", - "enum": ["browser", "node", "neutral"], - "default": "node" - } - }, - "required": [], - "examplesFile": "```bash\nnx g @nrwl/esbuild:esbuild-project my-package\n```\n\n{% callout type=\"note\" title=\"Overwriting existing build option\" %}\nThe `esbuild-projet` generator validates that an existing `build` target isn't already defined for the project. If you are adding esbuild to a project with an existing `build` target, pass the `--skipValidation` option.\n{% /callout %}\n\nYou may also provide a custom main entry file, or a custom tsconfig file if the defaults don't work. By default, the generator will look for a main file matching `src/index.ts` or `src/main.ts`, and a tsconfig file matching `tsconfig.app.json` or `tsconfig.lib.json`.\n\n```bash\nnx g @nrwl/esbuild:esbuild-project my-package \\\n--main=packages/my-package/src/entry.ts \\\n--tsConfig=packages/my-package/tsconfig.custom.json\n```\n", - "presets": [] - }, - "description": "Add esbuild configuration to a project.", - "hidden": true, - "implementation": "/packages/esbuild/src/generators/esbuild-project/esbuild-project#esbuildProjectGenerator.ts", - "aliases": [], - "path": "/packages/esbuild/src/generators/esbuild-project/schema.json" - } - ], - "executors": [ - { - "name": "esbuild", - "implementation": "/packages/esbuild/src/executors/esbuild/esbuild.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "esbuild (experimental)", - "description": "Bundle a package for different platforms. Note: declaration (*.d.ts) file are not currently generated.", - "cli": "nx", - "type": "object", - "properties": { - "main": { - "type": "string", - "description": "The path to the entry file, relative to project.", - "alias": "entryFile", - "x-completion-type": "file", - "x-completion-glob": "**/*@(.js|.ts)" - }, - "outputPath": { - "type": "string", - "description": "The output path of the generated files.", - "x-completion-type": "directory" - }, - "outputFileName": { - "type": "string", - "description": "Name of the main output file. Defaults same basename as 'main' file." - }, - "tsConfig": { - "type": "string", - "description": "The path to tsconfig file.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "project": { - "type": "string", - "description": "The path to package.json file." - }, - "additionalEntryPoints": { - "type": "array", - "description": "List of additional entry points.", - "items": { "type": "string" }, - "default": [] - }, - "format": { - "type": "array", - "description": "List of module formats to output. Defaults to matching format from tsconfig (e.g. CJS for CommonJS, and ESM otherwise).", - "alias": "f", - "items": { "type": "string", "enum": ["esm", "cjs"] }, - "default": ["esm"] - }, - "watch": { - "type": "boolean", - "description": "Enable re-building when files change.", - "default": false - }, - "assets": { - "type": "array", - "description": "List of static assets.", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply `glob`. Defaults to the project root." - }, - "output": { - "type": "string", - "description": "Relative path within the output folder." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "deleteOutputPath": { - "type": "boolean", - "description": "Remove previous output before build.", - "alias": "clean", - "default": true - }, - "external": { - "type": "array", - "description": "Mark one or more module as external. Can use * wildcards, such as '*.png'.", - "items": { "type": "string" } - }, - "outputHashing": { - "type": "string", - "description": "Define the output filename cache-busting hashing mode.", - "default": "none", - "enum": ["none", "all"] - }, - "metafile": { - "type": "boolean", - "description": "Generate a meta.json file in the output folder that includes metadata about the build. This file can be analyzed by other tools.", - "default": false - }, - "sourcemap": { - "type": "boolean", - "alias": "sourceMap", - "description": "Generate sourcemap.", - "default": false - }, - "minify": { - "type": "boolean", - "description": "Minifies outputs.", - "default": false - }, - "platform": { - "type": "string", - "description": "Platform target for outputs.", - "enum": ["browser", "node", "neutral"], - "default": "node" - }, - "target": { - "type": "string", - "description": "The environment target for outputs.", - "default": "esnext" - }, - "skipTypeCheck": { - "type": "boolean", - "description": "Skip type-checking via TypeScript. Skipping type-checking speeds up the build but type errors are not caught.", - "default": false - }, - "thirdParty": { - "type": "boolean", - "description": "Includes third-party packages in the bundle (i.e. npm packages).", - "default": true - }, - "dependenciesFieldType": { - "type": "string", - "description": "When `bundleInternalProjectsOnly` is true, this option determines whether external packages should be in 'dependencies' or 'peerDependencies' field in the generated package.json file.", - "enum": ["dependencies", "peerDependencies"], - "default": "dependencies" - }, - "esbuildOptions": { - "type": "object", - "description": "Additional options to pass to esbuild. See https://esbuild.github.io/api/.", - "additionalProperties": true - } - }, - "required": ["tsConfig", "main", "outputPath"], - "definitions": { - "assetPattern": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply `glob`. Defaults to the project root." - }, - "output": { - "type": "string", - "description": "Relative path within the output folder." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "additionalProperties": true, - "examplesFile": "`/project.json`:\n\n```json\n{\n //...\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\"\n }\n }\n }\n}\n```\n\n```bash\nnx build \n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"CommonJS output\" %}\n\nThe CommonJS format is required in some environments, such as Electron applications. By default, `esbuild` will use the ESM format, which is recommended for Web and Node applications. You may also output to multiple formats.\n\n```bash\nnx build --format=cjs\nnx build --format=esm,cjs\nnx build # defaults to es# defaults to esm\n```\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"format\": [\"esm\", \"cjs\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"External packages\" %}\n\nYou can avoid packages from being bundled by providing the `external` option with a list of packages to skip.\n\nYou can also use `*` wildcard to match assets.\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"external\": [\"lodash\", \"*.png\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"Skip type checking\" %}\n\nType checking is the slowest part of the build. You may want to skip type checking during build and run it as another job in CI.\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"skipTypeCheck\": true\n}\n```\n\n{% /tab %}\n{% tab label=\"Additional esbuild options\" %}\n\nAdditional [esbuild options](https://esbuild.github.io/api/) can be passed using `esbuildOptions` in your project configuration.\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"esbuildOptions\": {\n \"legalComments\": \"inline\"\n \"banner\": {\n \".js\": \"// banner\"\n },\n \"footer\": {\n \".js\": \"// footer\"\n }\n }\n}\n```\n\n{% /tab %}\n{% tabs %}\n", - "presets": [] - }, - "description": "Bundle a package using EsBuild.", - "aliases": [], - "hidden": false, - "path": "/packages/esbuild/src/executors/esbuild/schema.json" - } - ] -} diff --git a/docs/generated/packages/esbuild/documents/overview.md b/docs/generated/packages/esbuild/documents/overview.md new file mode 100644 index 0000000000000..3323df1e44519 --- /dev/null +++ b/docs/generated/packages/esbuild/documents/overview.md @@ -0,0 +1,136 @@ +The Nx Plugin for [esbuild](https://esbuild.github.io/api/), an extremely fast JavaScript bundler. + +Why should you use this plugin? + +- _Fast_ builds using esbuild. +- Type-checking using TypeScript, which esbuild does not handle. +- Intelligent `package.json` output. +- Additional [assets](/packages/esbuild/executors/esbuild#assets) for the output. + +## Setting up esbuild + +To create a new workspace, run `npx create-nx-workspace@latest --preset=npm`. + +To add the esbuild plugin to an existing workspace, run the following: + +{% tabs %} +{% tab label="npm" %} + +```shell +npm install -D @nrwl/esbuild +``` + +{% /tab %} +{% tab label="yarn" %} + +```shell +yarn add -D @nrwl/esbuild +``` + +{% /tab %} +{% /tabs %} + +### Creating a new JS library + +You can add a new library that builds using esbuild with: + +```shell +nx g @nrwl/js:lib mylib --bundler=esbuild +``` + +This command will install the esbuild plugin if needed, and set `@nrwl/esbuild:esbuild` executor for the `build` target. + +### Adding esbuild target to existing libraries + +If you already have a JS project that you want to use esbuild for, run this command: + +```shell +nx g esbuild-project mylib +``` + +This generator validates there isn't an existing `build` target. If you want to overwrite the existing target you can pass the `--skipValidation` option. + +```shell +nx g esbuild-project mylib --skipValidation +``` + +## Using esbuild + +You can run builds with: + +```shell +nx build mylib +``` + +Replace `mylib` with the name or your project. This command works for both applications and libraries. + +### Copying assets + +Assets are non-JS and non-TS files, such as images, CSS, etc. You can add them to the project configuration as follows. + +```jsonc +"build": { + "executor": "@nrwl/esbuild:esbuild", + "options": { + //... + "assets": [ + { "input": "libs/mylib", "glob": "README.md", "output": "/" }, + { "input": "libs/mylib", "glob": "logo.png", "output": "/" }, + { "input": "libs/mylib", "glob": "docs/**/*.md", "output": "/docs" }, + //... + ] + } +} +``` + +Running `nx build mylib` outputs something like this. + +```text +dist/libs/mylib/ +├── README.md +├── docs +│ ├── CONTRIBUTING.md +│ └── TESTING.md +├── index.js +├── logo.png +└── package.json +``` + +### Generating a metafile + +A metafile can be generated by passing the `--metafile` option. This file contains information about the build that can be analyzed by other tools, such as [bundle buddy](https://www.bundle-buddy.com/esbuild). + +```shell +nx build mylib --metafile +``` + +This command will generate a `meta.json` file in the output directory. + +```text +dist/libs/mylib/ +├── README.md +├── index.js +├── meta.json +└── package.json +``` + +### Custom esbuild options + +Extra API options for esbuild can be passed in the `esbuildOptions` object for your project configuration. + +```jsonc +"build": { + "executor": "@nrwl/esbuild:esbuild", + "options": { + //... + "esbuildOptions": { + "banner": { ".js": "// banner" }, + "footer": { ".js": "// footer" } + } + } +} +``` + +## More Documentation + +- [Using JS](/packages/js) diff --git a/docs/generated/packages/esbuild/executors/esbuild.json b/docs/generated/packages/esbuild/executors/esbuild.json new file mode 100644 index 0000000000000..e5b5116ca72ec --- /dev/null +++ b/docs/generated/packages/esbuild/executors/esbuild.json @@ -0,0 +1,197 @@ +{ + "name": "esbuild", + "implementation": "/packages/esbuild/src/executors/esbuild/esbuild.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "esbuild (experimental)", + "description": "Bundle a package for different platforms. Note: declaration (*.d.ts) file are not currently generated.", + "cli": "nx", + "type": "object", + "properties": { + "main": { + "type": "string", + "description": "The path to the entry file, relative to project.", + "alias": "entryFile", + "x-completion-type": "file", + "x-completion-glob": "**/*@(.js|.ts)" + }, + "outputPath": { + "type": "string", + "description": "The output path of the generated files.", + "x-completion-type": "directory" + }, + "outputFileName": { + "type": "string", + "description": "Name of the main output file. Defaults same basename as 'main' file." + }, + "tsConfig": { + "type": "string", + "description": "The path to tsconfig file.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "project": { + "type": "string", + "description": "The path to package.json file." + }, + "additionalEntryPoints": { + "type": "array", + "description": "List of additional entry points.", + "items": { "type": "string" }, + "default": [] + }, + "format": { + "type": "array", + "description": "List of module formats to output. Defaults to matching format from tsconfig (e.g. CJS for CommonJS, and ESM otherwise).", + "alias": "f", + "items": { "type": "string", "enum": ["esm", "cjs"] }, + "default": ["esm"] + }, + "watch": { + "type": "boolean", + "description": "Enable re-building when files change.", + "default": false + }, + "assets": { + "type": "array", + "description": "List of static assets.", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply `glob`. Defaults to the project root." + }, + "output": { + "type": "string", + "description": "Relative path within the output folder." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "deleteOutputPath": { + "type": "boolean", + "description": "Remove previous output before build.", + "alias": "clean", + "default": true + }, + "external": { + "type": "array", + "description": "Mark one or more module as external. Can use * wildcards, such as '*.png'.", + "items": { "type": "string" } + }, + "outputHashing": { + "type": "string", + "description": "Define the output filename cache-busting hashing mode.", + "default": "none", + "enum": ["none", "all"] + }, + "metafile": { + "type": "boolean", + "description": "Generate a meta.json file in the output folder that includes metadata about the build. This file can be analyzed by other tools.", + "default": false + }, + "sourcemap": { + "type": "boolean", + "alias": "sourceMap", + "description": "Generate sourcemap.", + "default": false + }, + "minify": { + "type": "boolean", + "description": "Minifies outputs.", + "default": false + }, + "platform": { + "type": "string", + "description": "Platform target for outputs.", + "enum": ["browser", "node", "neutral"], + "default": "node" + }, + "target": { + "type": "string", + "description": "The environment target for outputs.", + "default": "esnext" + }, + "skipTypeCheck": { + "type": "boolean", + "description": "Skip type-checking via TypeScript. Skipping type-checking speeds up the build but type errors are not caught.", + "default": false + }, + "thirdParty": { + "type": "boolean", + "description": "Includes third-party packages in the bundle (i.e. npm packages).", + "default": true + }, + "dependenciesFieldType": { + "type": "string", + "description": "When `bundleInternalProjectsOnly` is true, this option determines whether external packages should be in 'dependencies' or 'peerDependencies' field in the generated package.json file.", + "enum": ["dependencies", "peerDependencies"], + "default": "dependencies" + }, + "esbuildOptions": { + "type": "object", + "description": "Additional options to pass to esbuild. See https://esbuild.github.io/api/.", + "additionalProperties": true + } + }, + "required": ["tsConfig", "main", "outputPath"], + "definitions": { + "assetPattern": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply `glob`. Defaults to the project root." + }, + "output": { + "type": "string", + "description": "Relative path within the output folder." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "additionalProperties": true, + "examplesFile": "`/project.json`:\n\n```json\n{\n //...\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\"\n }\n }\n }\n}\n```\n\n```bash\nnx build \n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"CommonJS output\" %}\n\nThe CommonJS format is required in some environments, such as Electron applications. By default, `esbuild` will use the ESM format, which is recommended for Web and Node applications. You may also output to multiple formats.\n\n```bash\nnx build --format=cjs\nnx build --format=esm,cjs\nnx build # defaults to es# defaults to esm\n```\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"format\": [\"esm\", \"cjs\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"External packages\" %}\n\nYou can avoid packages from being bundled by providing the `external` option with a list of packages to skip.\n\nYou can also use `*` wildcard to match assets.\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"external\": [\"lodash\", \"*.png\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"Skip type checking\" %}\n\nType checking is the slowest part of the build. You may want to skip type checking during build and run it as another job in CI.\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"skipTypeCheck\": true\n}\n```\n\n{% /tab %}\n{% tab label=\"Additional esbuild options\" %}\n\nAdditional [esbuild options](https://esbuild.github.io/api/) can be passed using `esbuildOptions` in your project configuration.\n\n```json\n\"build\": {\n \"executor\": \"@nrwl/esbuild:esbuild\",\n \"options\": {\n \"main\": \"\",\n \"tsConfig\": \"/tsconfig.app.json\",\n \"outputPath\": \"dist/\",\n \"esbuildOptions\": {\n \"legalComments\": \"inline\"\n \"banner\": {\n \".js\": \"// banner\"\n },\n \"footer\": {\n \".js\": \"// footer\"\n }\n }\n}\n```\n\n{% /tab %}\n{% tabs %}\n", + "presets": [] + }, + "description": "Bundle a package using EsBuild.", + "aliases": [], + "hidden": false, + "path": "/packages/esbuild/src/executors/esbuild/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/esbuild/generators/esbuild-project.json b/docs/generated/packages/esbuild/generators/esbuild-project.json new file mode 100644 index 0000000000000..6a2260a7b0818 --- /dev/null +++ b/docs/generated/packages/esbuild/generators/esbuild-project.json @@ -0,0 +1,64 @@ +{ + "name": "esbuild-project", + "factory": "./src/generators/esbuild-project/esbuild-project#esbuildProjectGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxEsBuildProject", + "cli": "nx", + "title": "Add esbuild configuration to a project", + "description": "Add esbuild configuration to a project.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "$default": { "$source": "argv", "index": 0 }, + "x-dropdown": "project", + "x-prompt": "What is the name of the project to set up a esbuild for?" + }, + "main": { + "type": "string", + "description": "Path relative to the workspace root for the main entry file. Defaults to `/src/main.ts` or `src/index.ts`, whichever is found.", + "alias": "entryFile" + }, + "tsConfig": { + "type": "string", + "description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to `/tsconfig.app.json` or `/tsconfig.lib.json`, whichever is found." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "skipValidation": { + "type": "boolean", + "default": false, + "description": "Do not perform any validation on existing project." + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like `@myorg/my-awesome-lib`." + }, + "platform": { + "type": "string", + "description": "Platform target for outputs.", + "enum": ["browser", "node", "neutral"], + "default": "node" + } + }, + "required": [], + "examplesFile": "```bash\nnx g @nrwl/esbuild:esbuild-project my-package\n```\n\n{% callout type=\"note\" title=\"Overwriting existing build option\" %}\nThe `esbuild-projet` generator validates that an existing `build` target isn't already defined for the project. If you are adding esbuild to a project with an existing `build` target, pass the `--skipValidation` option.\n{% /callout %}\n\nYou may also provide a custom main entry file, or a custom tsconfig file if the defaults don't work. By default, the generator will look for a main file matching `src/index.ts` or `src/main.ts`, and a tsconfig file matching `tsconfig.app.json` or `tsconfig.lib.json`.\n\n```bash\nnx g @nrwl/esbuild:esbuild-project my-package \\\n--main=packages/my-package/src/entry.ts \\\n--tsConfig=packages/my-package/tsconfig.custom.json\n```\n", + "presets": [] + }, + "description": "Add esbuild configuration to a project.", + "hidden": true, + "implementation": "/packages/esbuild/src/generators/esbuild-project/esbuild-project#esbuildProjectGenerator.ts", + "aliases": [], + "path": "/packages/esbuild/src/generators/esbuild-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/esbuild/generators/init.json b/docs/generated/packages/esbuild/generators/init.json new file mode 100644 index 0000000000000..d29ae6839ae80 --- /dev/null +++ b/docs/generated/packages/esbuild/generators/init.json @@ -0,0 +1,33 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#esbuildInitGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxWebpackInit", + "cli": "nx", + "title": "Init Webpack Plugin", + "description": "Init Webpack Plugin.", + "type": "object", + "properties": { + "compiler": { + "type": "string", + "enum": ["babel", "swc", "tsc"], + "description": "The compiler to initialize for.", + "default": "babel" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/esbuild` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/esbuild/src/generators/init/init#esbuildInitGenerator.ts", + "path": "/packages/esbuild/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/eslint-plugin-nx.json b/docs/generated/packages/eslint-plugin-nx.json deleted file mode 100644 index c63101f5cc3d1..0000000000000 --- a/docs/generated/packages/eslint-plugin-nx.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "eslint-plugin-nx", - "packageName": "@nrwl/eslint-plugin-nx", - "description": "The ESLint Plugin for Nx contains a collection of recommended ESLint rule configurations wrapped as ESLint plugins and an Nx specific enforce-module-boundaries rule.", - "root": "/packages/eslint-plugin-nx", - "source": "/packages/eslint-plugin-nx/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/eslint-plugin-nx", - "file": "shared/eslint-plugin-nx", - "content": "A plugin containing a collection of recommended ESLint rule configurations wrapped as ESLint plugins and an Nx specific [enforce-module-boundaries](#enforce-module-boundaries) rule.\n\n## Setting Up ESLint Plugin\n\n### Installation\n\nIn any Nx workspace, you can install `@nrwl/eslint-plugin-nx` by running the following commands if the package is not already installed:\n\n{% tabs %}\n{%tab label=\"npm\"%}\n\n```shell\nnpm i --save-dev @nrwl/eslint-plugin-nx\n```\n\n{% /tab %}\n{%tab label=\"yarn\"%}\n\n```shell\nyarn add --dev @nrwl/eslint-plugin-nx\n```\n\n{% /tab %}\n{% /tabs %}\n\n## ESLint plugins\n\nThe plugin contains the following rule configurations divided into sub-plugins.\n\n### JavaScript\n\nThe `@nrwl/nx/javascript` ESLint plugin contains best practices when using JavaScript.\n\n### TypeScript\n\nThe `@nrwl/nx/typescript` ESLint plugin contains best practices when using TypeSript.\n\n### Angular\n\nContains configurations matching best practices when using Angular framework:\n\n- @nrwl/nx/angular\n- @nrwl/nx/angular-template\n\n### React\n\nContains configurations matching best practices when using React framework:\n\n- @nrwl/nx/react-base\n- @nrwl/nx/react-jsx\n- @nrwl/nx/react-typescript\n\nYou can also use `@nrwl/nx/react` which includes all three `@nrwl/nx/react-*` plugins\n\n## enforce-module-boundaries\n\nThe `@nrwl/nx/enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. By enforcing strict boundaries it helps keep prevent unplanned cross-dependencies.\n\n### Usage\n\nYou can use `enforce-module-boundaries` rule by adding it to your ESLint rules configuration:\n\n```jsonc\n{\n // ... more ESLint config here\n \"overrides\": [\n {\n \"files\": [\"*.ts\", \"*.tsx\", \"*.js\", \"*.jsx\"],\n \"rules\": {\n \"@nrwl/nx/enforce-module-boundaries\": [\n \"error\",\n {\n // ...rule specific configuration\n }\n ]\n }\n }\n // ... more ESLint overrides here\n ]\n}\n```\n\nRead more about proper usage of this rule:\n\n- [Enforce Project Boundaries](/core-features/enforce-project-boundaries)\n- [Ban Dependencies with Certain Tags](/recipes/other/ban-dependencies-with-tags)\n- [Tag in Multiple Dimensions](/recipes/other/tag-multiple-dimensions)\n- [Ban External Imports](/recipes/other/ban-external-imports)\n- [Tags Allow List](/recipes/other/tags-allow-list)\n- [Taming Code Organization with Module Boundaries in Nx](https://blog.nrwl.io/mastering-the-project-boundaries-in-nx-f095852f5bf4)\n" - } - ], - "generators": [], - "executors": [] -} diff --git a/docs/generated/packages/eslint-plugin-nx/documents/overview.md b/docs/generated/packages/eslint-plugin-nx/documents/overview.md new file mode 100644 index 0000000000000..f5bf1167ff267 --- /dev/null +++ b/docs/generated/packages/eslint-plugin-nx/documents/overview.md @@ -0,0 +1,90 @@ +A plugin containing a collection of recommended ESLint rule configurations wrapped as ESLint plugins and an Nx specific [enforce-module-boundaries](#enforce-module-boundaries) rule. + +## Setting Up ESLint Plugin + +### Installation + +In any Nx workspace, you can install `@nrwl/eslint-plugin-nx` by running the following commands if the package is not already installed: + +{% tabs %} +{%tab label="npm"%} + +```shell +npm i --save-dev @nrwl/eslint-plugin-nx +``` + +{% /tab %} +{%tab label="yarn"%} + +```shell +yarn add --dev @nrwl/eslint-plugin-nx +``` + +{% /tab %} +{% /tabs %} + +## ESLint plugins + +The plugin contains the following rule configurations divided into sub-plugins. + +### JavaScript + +The `@nrwl/nx/javascript` ESLint plugin contains best practices when using JavaScript. + +### TypeScript + +The `@nrwl/nx/typescript` ESLint plugin contains best practices when using TypeSript. + +### Angular + +Contains configurations matching best practices when using Angular framework: + +- @nrwl/nx/angular +- @nrwl/nx/angular-template + +### React + +Contains configurations matching best practices when using React framework: + +- @nrwl/nx/react-base +- @nrwl/nx/react-jsx +- @nrwl/nx/react-typescript + +You can also use `@nrwl/nx/react` which includes all three `@nrwl/nx/react-*` plugins + +## enforce-module-boundaries + +The `@nrwl/nx/enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. By enforcing strict boundaries it helps keep prevent unplanned cross-dependencies. + +### Usage + +You can use `enforce-module-boundaries` rule by adding it to your ESLint rules configuration: + +```jsonc +{ + // ... more ESLint config here + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ + "error", + { + // ...rule specific configuration + } + ] + } + } + // ... more ESLint overrides here + ] +} +``` + +Read more about proper usage of this rule: + +- [Enforce Project Boundaries](/core-features/enforce-project-boundaries) +- [Ban Dependencies with Certain Tags](/recipes/other/ban-dependencies-with-tags) +- [Tag in Multiple Dimensions](/recipes/other/tag-multiple-dimensions) +- [Ban External Imports](/recipes/other/ban-external-imports) +- [Tags Allow List](/recipes/other/tags-allow-list) +- [Taming Code Organization with Module Boundaries in Nx](https://blog.nrwl.io/mastering-the-project-boundaries-in-nx-f095852f5bf4) diff --git a/docs/generated/packages/expo.json b/docs/generated/packages/expo.json deleted file mode 100644 index 22da4136a3978..0000000000000 --- a/docs/generated/packages/expo.json +++ /dev/null @@ -1,1324 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "expo", - "packageName": "@nrwl/expo", - "description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.", - "root": "/packages/expo", - "source": "/packages/expo/src", - "documentation": [], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#expoInitGenerator", - "schema": { - "cli": "nx", - "$id": "NxExpoInit", - "$schema": "http://json-schema.org/schema", - "description": "Add Nx Expo Schematics.", - "type": "object", - "properties": { - "unitTestRunner": { - "description": "Adds the specified unit test runner", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "skipFormat": { - "description": "Skip formatting files", - "type": "boolean", - "default": false - }, - "e2eTestRunner": { - "description": "Adds the specified e2e test runner", - "type": "string", - "enum": ["detox", "none"], - "default": "detox" - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the @nrwl/expo plugin", - "hidden": true, - "implementation": "/packages/expo/src/generators/init/init#expoInitGenerator.ts", - "aliases": [], - "path": "/packages/expo/src/generators/init/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application#expoApplicationGenerator", - "schema": { - "cli": "nx", - "$id": "NxExpoApplication", - "$schema": "http://json-schema.org/schema", - "description": "Create an Expo Application for Nx.", - "examples": [ - { - "command": "g app myapp --directory=nested", - "description": "Generate apps/nested/myapp" - }, - { - "command": "g app myapp --classComponent", - "description": "Use class components instead of functional components" - } - ], - "type": "object", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the application?" - }, - "displayName": { - "description": "The display name to show in the application. Defaults to name.", - "type": "string" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "skipFormat": { - "description": "Skip formatting files", - "type": "boolean", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting)", - "alias": "t" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files", - "default": false - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", - "default": false - }, - "e2eTestRunner": { - "description": "Adds the specified e2e test runner", - "type": "string", - "enum": ["detox", "none"], - "default": "detox" - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - } - }, - "required": ["name"], - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create an application", - "implementation": "/packages/expo/src/generators/application/application#expoApplicationGenerator.ts", - "hidden": false, - "path": "/packages/expo/src/generators/application/schema.json" - }, - { - "name": "library", - "factory": "./src/generators/library/library#expoLibraryGenerator", - "schema": { - "cli": "nx", - "$id": "NxExpoLibrary", - "$schema": "http://json-schema.org/schema", - "description": "Create a Expo Library for Nx.", - "type": "object", - "examples": [ - { - "command": "g lib mylib --directory=myapp", - "description": "Generate libs/myapp/mylib" - } - ], - "properties": { - "name": { - "type": "string", - "description": "Library name", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "type": "string", - "description": "A directory where the lib is placed." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting).", - "alias": "t" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update tsconfig.json for development experience." - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. App.tsx).", - "alias": "P", - "default": false - }, - "publishable": { - "type": "boolean", - "description": "Create a publishable library." - }, - "buildable": { - "type": "boolean", - "default": false, - "description": "Generate a buildable library." - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like @myorg/my-awesome-lib" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "globalCss": { - "type": "boolean", - "description": "When true, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is '*.css' rather than '*.module.css').", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Whether to enable tsconfig strict mode or not.", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", - "default": false - } - }, - "required": ["name"], - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Create a library", - "implementation": "/packages/expo/src/generators/library/library#expoLibraryGenerator.ts", - "hidden": false, - "path": "/packages/expo/src/generators/library/schema.json" - }, - { - "name": "component", - "factory": "./src/generators/component/component#expoComponentGenerator", - "schema": { - "cli": "nx", - "$id": "NxExpoComponent", - "$schema": "http://json-schema.org/schema", - "description": "Create a Expo Component for Nx.", - "type": "object", - "examples": [ - { - "command": "g component my-component --project=mylib", - "description": "Generate a component in the mylib library" - }, - { - "command": "g component my-component --project=mylib --classComponent", - "description": "Generate a class component in the mylib library" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for this component?" - }, - "name": { - "type": "string", - "description": "The name of the component.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the component?" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTests": { - "type": "boolean", - "description": "When true, does not create \"spec.ts\" test files for the new component.", - "default": false - }, - "directory": { - "type": "string", - "description": "Create the component under this directory (can be nested)." - }, - "flat": { - "type": "boolean", - "description": "Create component at the source root rather than its own directory.", - "default": false - }, - "export": { - "type": "boolean", - "description": "When true, the component is exported from the project index.ts (if it exists).", - "alias": "e", - "default": false, - "x-prompt": "Should this component be exported in the project?" - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. App.tsx).", - "alias": "P", - "default": false - }, - "classComponent": { - "type": "boolean", - "alias": "C", - "description": "Use class components instead of functional component.", - "default": false - } - }, - "required": ["name", "project"], - "presets": [] - }, - "description": "Create a component", - "aliases": ["c"], - "implementation": "/packages/expo/src/generators/component/component#expoComponentGenerator.ts", - "hidden": false, - "path": "/packages/expo/src/generators/component/schema.json" - } - ], - "executors": [ - { - "name": "update", - "implementation": "/packages/expo/src/executors/update/update.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoEasUpdate", - "cli": "nx", - "title": "Expo EAS Update executor", - "description": "Start an EAS update for your expo project.", - "type": "object", - "properties": { - "branch": { - "type": "string", - "description": "Branch to publish the update group on" - }, - "message": { - "type": "string", - "description": "A short message describing the update" - }, - "republish": { - "type": "boolean", - "description": "Enable JSON output, non-JSON messages will be printed to stderr", - "default": false - }, - "group": { - "type": "string", - "description": "Update group to republish" - }, - "inputDir": { - "type": "string", - "description": "Location of the bundle" - }, - "skipBundler": { - "type": "boolean", - "description": "Skip running Expo CLI to bundle the app before publishing", - "default": false - }, - "platform": { - "enum": ["ios", "android", "all"], - "alias": "p", - "description": "The platform to build the app, example values: ios, android, all.", - "default": "all" - }, - "json": { - "type": "boolean", - "description": "Enable JSON output, non-JSON messages will be printed to stderr", - "default": false - }, - "auto": { - "type": "boolean", - "description": "Use the current git branch and commit message for the EAS branch and update message", - "default": false - }, - "privateKeyPath": { - "type": "string", - "description": "File containing the PEM-encoded private key corresponding to the certificate in expo-updates' configuration. Defaults to a file named \"private-key.pem\" in the certificate's directory." - }, - "nonInteractive": { - "type": "boolean", - "description": "Run command in non-interactive mode", - "default": false - } - }, - "required": [], - "presets": [] - }, - "description": "Start an EAS update for your expo project", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/update/schema.json" - }, - { - "name": "build", - "implementation": "/packages/expo/src/executors/build/build.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoEasBuild", - "cli": "nx", - "title": "Expo EAS Build executor", - "description": "Start an EAS build for your expo project.", - "type": "object", - "properties": { - "platform": { - "enum": ["ios", "android", "all"], - "alias": "p", - "description": "The platform to build the app, example values: ios, android, all." - }, - "json": { - "type": "boolean", - "description": "Enable JSON output, non-JSON messages will be printed to stderr", - "default": false - }, - "profile": { - "type": "string", - "description": "Name of the build profile from eas.json. Defaults to \"production\" if defined in eas.json.", - "examples": ["PROFILE_NAME"] - }, - "nonInteractive": { - "type": "boolean", - "description": "Run command in non-interactive mode", - "default": false - }, - "local": { - "type": "boolean", - "description": "Run build locally [experimental]", - "default": false - }, - "wait": { - "type": "boolean", - "description": "Wait for build(s) to complete", - "default": true - }, - "clearCache": { - "type": "boolean", - "description": "Clear cache before the build", - "default": false - }, - "autoSubmit": { - "type": "boolean", - "description": "Submit on build complete using the submit profile with the same name as the build profile", - "default": false - }, - "autoSubmitWithProfile": { - "type": "string", - "description": "Submit on build complete using the submit profile with provided name", - "examples": ["PROFILE_NAME"] - } - }, - "required": [], - "presets": [] - }, - "description": "Start an EAS build for your expo project", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/build/schema.json" - }, - { - "name": "build-list", - "implementation": "/packages/expo/src/executors/build-list/build-list.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoEasBuildList", - "cli": "nx", - "title": "Expo EAS Build List executor", - "description": "List all EAS builds for your Expo project.", - "type": "object", - "properties": { - "platform": { - "enum": ["ios", "android", "all"], - "alias": "p", - "description": "The platform to build the app, example values: ios, android, all." - }, - "json": { - "type": "boolean", - "description": "Enable JSON output, non-JSON messages will be printed to stderr" - }, - "nonInteractive": { - "type": "boolean", - "description": "Run the command in non-interactive mode." - }, - "status": { - "enum": [ - "new", - "in-queue", - "in-progress", - "errored", - "finished", - "canceled" - ], - "description": "Status of EAS build" - }, - "distribution": { - "enum": ["store", "internal", "simulator"], - "description": "Distribution of EAS build" - }, - "channel": { - "type": "string", - "description": "Channel of EAS build" - }, - "appVersion": { - "type": "string", - "description": "App version of EAS build" - }, - "appBuildVersion": { - "type": "string", - "description": "App build version of EAS build" - }, - "sdkVersion": { - "type": "string", - "description": "SDK version of EAS build" - }, - "runtimeVersion": { - "type": "string", - "description": "Runtime version of EAS build" - }, - "appIdentifier": { - "type": "string", - "description": "App identifier of EAS build" - }, - "buildProfile": { - "type": "string", - "description": "Build profile of EAS build" - }, - "gitCommitHash": { - "type": "string", - "description": "Git commit hash of EAS build" - }, - "limit": { - "type": "number", - "description": "Limit of numbers to list EAS builds" - } - }, - "required": [], - "presets": [] - }, - "description": "List all EAS builds for your Expo project", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/build-list/schema.json" - }, - { - "name": "download", - "implementation": "/packages/expo/src/executors/download/download.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoDownloadEasBuild", - "cli": "nx", - "title": "Download EAS Build executor", - "description": "Download an EAS build.", - "type": "object", - "properties": { - "platform": { - "enum": ["ios", "android"], - "alias": "p", - "description": "The platform to build the app, example values: ios, android, all." - }, - "distribution": { - "enum": ["store", "internal", "simulator"], - "description": "Distribution of EAS build" - }, - "channel": { - "type": "string", - "description": "Channel of EAS build" - }, - "appVersion": { - "type": "string", - "description": "App version of EAS build" - }, - "appBuildVersion": { - "type": "string", - "description": "App build version of EAS build" - }, - "sdkVersion": { - "type": "string", - "description": "SDK version of EAS build" - }, - "runtimeVersion": { - "type": "string", - "description": "Runtime version of EAS build" - }, - "appIdentifier": { - "type": "string", - "description": "App identifier of EAS build" - }, - "buildProfile": { - "type": "string", - "description": "Build profile of EAS build" - }, - "gitCommitHash": { - "type": "string", - "description": "Git commit hash of EAS build" - }, - "output": { - "type": "string", - "description": "Output directory for the download build" - } - }, - "required": ["output"], - "presets": [] - }, - "description": "Download an EAS build", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/download/schema.json" - }, - { - "name": "build-ios", - "implementation": "/packages/expo/src/executors/build-ios/build-ios.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildIOS", - "cli": "nx", - "title": "Expo iOS Build executor", - "description": "Build and sign a standalone IPA for the Apple App Store.", - "type": "object", - "properties": { - "clearCredentials": { - "type": "boolean", - "description": "Clear all credentials stored on Expo servers.", - "alias": "c" - }, - "clearDistCert": { - "type": "boolean", - "description": "Remove Distribution Certificate stored on Expo servers." - }, - "clearPushKey": { - "type": "boolean", - "description": "Remove Push Notifications Key stored on Expo servers." - }, - "clearPushCert": { - "type": "boolean", - "description": "Remove Push Notifications Certificate stored on Expo servers. Use of Push Notifications Certificates is deprecated." - }, - "clearProvisioningProfile": { - "type": "boolean", - "description": "Remove Provisioning Profile stored on Expo servers." - }, - "revokeCredentials": { - "type": "boolean", - "description": "Revoke credentials on developer.apple.com, select appropriate using --clear-* options.", - "alias": "r" - }, - "appleId": { - "type": "string", - "description": "Apple ID username (please also set the Apple ID password as EXPO_APPLE_PASSWORD environment variable)." - }, - "type": { - "enum": ["archive", "simulator"], - "description": "Type of build: [archive⎮simulator].", - "alias": "t" - }, - "releaseChannel": { - "type": "string", - "description": "Pull from specified release channel." - }, - "noPublish": { - "type": "boolean", - "description": "Disable automatic publishing before building." - }, - "noWait": { - "type": "boolean", - "description": "Exit immediately after scheduling build." - }, - "teamId": { "type": "string", "description": "Apple Team ID." }, - "distP12Path": { - "type": "string", - "description": "Path to your Distribution Certificate P12 (set password as EXPO_IOS_DIST_P12_PASSWORD environment variable)." - }, - "pushP8Path": { - "type": "string", - "description": "Path to your Push Key .p8 file." - }, - "provisioningProfilePath": { - "type": "string", - "description": "Path to your Provisioning Profile." - }, - "publicUrl": { - "type": "string", - "description": "The URL of an externally hosted manifest (for self-hosted apps)." - }, - "skipCredentialsCheck": { - "type": "boolean", - "description": "Skip checking credentials." - }, - "skipWorkflowCheck": { - "type": "boolean", - "description": "Skip warning about build service bare workflow limitations." - }, - "sync": { - "type": "boolean", - "description": "Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.", - "default": true - } - }, - "required": [], - "presets": [] - }, - "description": "Build and sign a standalone IPA for the Apple App Store", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/build-ios/schema.json" - }, - { - "name": "build-android", - "implementation": "/packages/expo/src/executors/build-android/build-android.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildAndroid", - "cli": "nx", - "title": "Expo Android Build executor", - "description": "Build and sign a standalone APK or App Bundle for the Google Play Store.", - "type": "object", - "properties": { - "clearCredentials": { - "type": "boolean", - "description": "Clear all credentials stored on Expo servers.", - "alias": "c" - }, - "type": { - "enum": ["app-bundle", "apk"], - "description": "Type of build: [app-bundle⎮apk].", - "alias": "t" - }, - "releaseChannel": { - "type": "string", - "description": "Pull from specified release channel." - }, - "noPublish": { - "type": "boolean", - "description": "Disable automatic publishing before building." - }, - "noWait": { - "type": "boolean", - "description": "Exit immediately after scheduling build." - }, - "keystorePath": { - "type": "string", - "description": "Path to your Keystore: *.jks." - }, - "keystoreAlias": { - "type": "string", - "description": "Keystore Alias" - }, - "publicUrl": { - "type": "string", - "description": "The URL of an externally hosted manifest (for self-hosted apps)." - }, - "skipWorkflowCheck": { - "type": "boolean", - "description": "Skip warning about build service bare workflow limitations." - }, - "sync": { - "type": "boolean", - "description": "Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.", - "default": true - } - }, - "required": [], - "presets": [] - }, - "description": "Build and sign a standalone APK or App Bundle for the Google Play Store", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/build-android/schema.json" - }, - { - "name": "build-web", - "implementation": "/packages/expo/src/executors/build-web/build-web.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildWeb", - "cli": "nx", - "title": "Expo web Build executor", - "description": "Build the web app for production.", - "type": "object", - "properties": { - "clear": { - "type": "boolean", - "description": "Clear all cached build files and assets.", - "alias": "c" - }, - "noPwa": { - "type": "boolean", - "description": "Prevent webpack from generating the manifest.json and injecting meta into the index.html head." - }, - "dev": { - "type": "boolean", - "description": "Turns dev flag on before bundling" - } - }, - "required": [], - "presets": [] - }, - "description": "Build the web app for production", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/build-web/schema.json" - }, - { - "name": "build-status", - "implementation": "/packages/expo/src/executors/build-status/build-status.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildStatus", - "cli": "nx", - "title": "Expo web Build executor", - "description": "Get the status of the latest build for the project.", - "type": "object", - "properties": { - "publicUrl": { - "type": "string", - "description": "The URL of an externally hosted manifest (for self-hosted apps)." - } - }, - "required": [], - "presets": [] - }, - "description": "Get the status of the latest build for the project", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/build-status/schema.json" - }, - { - "name": "publish", - "implementation": "/packages/expo/src/executors/publish/publish.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoPublish", - "$schema": "http://json-schema.org/schema", - "title": "Publish for Expo", - "description": "Deploy a project to Expo hosting.", - "type": "object", - "properties": { - "quiet": { - "type": "boolean", - "description": "Suppress verbose output from the Metro bundler", - "default": false, - "alias": "q" - }, - "sendTo": { - "type": "string", - "description": "A phone number or email address to send a link to", - "alias": "s" - }, - "clear": { - "type": "boolean", - "description": "Clear the Metro bundler cache", - "default": false, - "alias": "c" - }, - "target": { - "enum": ["managed", "bare"], - "default": "managed", - "description": "Target environment for which this publish is intended. Options are managed or bare.", - "alias": "t" - }, - "maxWorkers": { - "type": "number", - "description": "Maximum number of tasks to allow Metro to spawn" - }, - "releaseChannel": { - "type": "string", - "description": "The release channel to publish to. Default is 'default'.", - "default": "default" - } - }, - "presets": [] - }, - "description": "Deploy a project to Expo hosting", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/publish/schema.json" - }, - { - "name": "publish-set", - "implementation": "/packages/expo/src/executors/publish-set/publish-set.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoPublishSet", - "$schema": "http://json-schema.org/schema", - "title": "Set Publish Channel for Expo", - "description": "Specify the channel to serve a published release.", - "type": "object", - "properties": { - "releaseChannel": { - "type": "string", - "description": "The release channel to publish to." - }, - "publishId": { - "type": "string", - "description": "The id of the published release to serve from the channel." - } - }, - "required": ["releaseChannel", "publishId"], - "presets": [] - }, - "description": "Specify the channel to serve a published release", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/publish-set/schema.json" - }, - { - "name": "rollback", - "implementation": "/packages/expo/src/executors/rollback/rollback.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoRollback", - "$schema": "http://json-schema.org/schema", - "title": "Rollback Publish Command for Expo", - "description": "Undo an update to a channel.", - "type": "object", - "properties": { - "releaseChannel": { - "type": "string", - "description": "The release channel to publish to." - }, - "sdkVersion": { - "type": "string", - "description": "The sdk version to rollback." - }, - "platform": { - "enum": ["ios", "android"], - "description": "The platform to rollback." - } - }, - "required": ["releaseChannel", "sdkVersion"], - "presets": [] - }, - "description": "Undo an update to a channel", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/rollback/schema.json" - }, - { - "name": "run", - "implementation": "/packages/expo/src/executors/run/run.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoRun", - "$schema": "http://json-schema.org/schema", - "title": "Run iOS or Android application", - "description": "Run Expo target options.", - "type": "object", - "properties": { - "platform": { - "description": "Platform to run for (ios, android).", - "enum": ["ios", "android"], - "default": "ios", - "alias": "p" - }, - "xcodeConfiguration": { - "type": "string", - "description": "(iOS) Xcode configuration to use. Debug or Release", - "default": "Debug" - }, - "scheme": { - "type": "string", - "description": "(iOS) Explicitly set the Xcode scheme to use" - }, - "variant": { - "type": "string", - "description": "(Android) Specify your app's build variant (e.g. debug, release).", - "default": "debug" - }, - "device": { - "type": "string", - "description": "Device name or UDID to build the app on. The value is not required if you have a single device connected.", - "alias": "d" - }, - "sync": { - "type": "boolean", - "description": "Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.", - "default": true - }, - "port": { - "type": "number", - "description": "Port to start the Metro bundler on", - "default": 8081, - "alias": "p" - }, - "bundler": { - "type": "boolean", - "description": "Whether to skip starting the Metro bundler. True to start it, false to skip it." - }, - "install": { - "type": "boolean", - "description": "Should install missing dependencies before building." - }, - "buildCache": { - "type": "boolean", - "description": "Should use derived data for builds." - } - }, - "required": ["platform"], - "presets": [] - }, - "description": "Run the Android app binary locally or run the iOS app binary locally", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/run/schema.json" - }, - { - "name": "start", - "implementation": "/packages/expo/src/executors/start/start.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoStart", - "$schema": "http://json-schema.org/schema", - "title": "Packager Server for Expo", - "description": "Packager Server target options.", - "type": "object", - "properties": { - "forceManifestType": { - "type": "string", - "description": "Override auto detection of manifest type.", - "enum": ["expo-updates", "classic"] - }, - "privateKeyPath": { - "type": "string", - "description": "Path to private key for code signing. Default: 'private-key.pem' in the same directory as the certificate specified by the expo-updates configuration in app.json." - }, - "port": { - "type": "number", - "description": "Port to start the native Metro bundler on (does not apply to web or tunnel)", - "default": 19000, - "alias": "p" - }, - "clear": { - "type": "boolean", - "description": "Clear the Metro bundler cache", - "alias": "c" - }, - "maxWorkers": { - "type": "number", - "description": "Maximum number of tasks to allow Metro to spawn" - }, - "dev": { - "type": "boolean", - "description": "Turn development mode on or off" - }, - "devClient": { - "type": "boolean", - "description": "Experimental: Starts the bundler for use with the expo-development-client" - }, - "minify": { - "type": "boolean", - "description": "Whether or not to minify code" - }, - "https": { - "type": "boolean", - "description": "To start webpack with https or http protocol" - }, - "scheme": { - "type": "string", - "description": "Custom URI protocol to use with a development build" - }, - "android": { - "type": "boolean", - "description": "Opens your app in Expo Go on a connected Android device", - "alias": "a" - }, - "ios": { - "type": "boolean", - "description": "Opens your app in Expo Go in a currently running iOS simulator on your computer", - "alias": "i" - }, - "web": { - "type": "boolean", - "description": " Opens your app in a web browser", - "alias": "w" - }, - "host": { - "type": "string", - "description": "lan (default), tunnel, localhost. Type of host to use. lan uses the local network; tunnel ues any network by tunnel through ngrok; localhost connects to the dev server over localhost.", - "enum": ["localhost", "lan", "tunnel"] - }, - "tunnel": { - "type": "boolean", - "description": "Same as --host tunnel" - }, - "lan": { "type": "boolean", "description": "Same as --host lan" }, - "localhost": { - "type": "boolean", - "description": "Same as --host localhost" - }, - "offline": { - "type": "boolean", - "description": "Allows this command to run while offline" - }, - "sentTo": { - "type": "string", - "description": "An email address to send a link to", - "alias": "s", - "x-deprecated": true - }, - "webpack": { - "type": "boolean", - "description": "Start a Webpack dev server for the web app.", - "x-deprecated": true - } - }, - "presets": [] - }, - "description": "Start a local dev server for the app or start a Webpack dev server for the web app", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/start/schema.json" - }, - { - "name": "sync-deps", - "implementation": "/packages/expo/src/executors/sync-deps/sync-deps.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoSyncDeps", - "$schema": "http://json-schema.org/schema", - "title": "Sync Deps for Expo", - "description": "Updates package.json with project dependencies.", - "type": "object", - "properties": { - "include": { - "type": "array", - "items": { "type": "string" }, - "default": [], - "description": "An array of additional npm packages to include." - }, - "exclude": { - "type": "array", - "items": { "type": "string" }, - "default": [], - "description": "An array of npm packages to exclude." - } - }, - "presets": [] - }, - "description": "Syncs dependencies to package.json (required for autolinking).", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/sync-deps/schema.json" - }, - { - "name": "ensure-symlink", - "implementation": "/packages/expo/src/executors/ensure-symlink/ensure-symlink.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoEnsureSymlink", - "$schema": "http://json-schema.org/schema", - "title": "Ensure Symlink for Expo", - "description": "Ensure workspace node_modules is symlink under app's node_modules folder.", - "type": "object", - "properties": {}, - "presets": [] - }, - "description": "Ensure workspace node_modules is symlink under app's node_modules folder.", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/ensure-symlink/schema.json" - }, - { - "name": "prebuild", - "implementation": "/packages/expo/src/executors/prebuild/prebuild.impl.ts", - "schema": { - "cli": "nx", - "version": 2, - "outputCapture": "direct-nodejs", - "$id": "NxExpoPrebuild", - "$schema": "http://json-schema.org/schema", - "title": "Expo Prebuild", - "description": "Create native iOS and Android project files for building natively.", - "type": "object", - "properties": { - "install": { - "type": "boolean", - "description": "Installing npm packages and CocoaPods.", - "default": false - }, - "platform": { - "description": "Platforms to sync", - "default": "all", - "enum": ["ios", "android", "all"], - "alias": "p" - }, - "template": { - "type": "string", - "description": "Project template to clone from. File path pointing to a local tar file or a github repo" - } - }, - "presets": [] - }, - "description": "Create native iOS and Android project files for building natively.", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/prebuild/schema.json" - }, - { - "name": "install", - "implementation": "/packages/expo/src/executors/install/install.impl.ts", - "schema": { - "cli": "nx", - "version": 2, - "outputCapture": "direct-nodejs", - "$id": "NxExpoInstall", - "$schema": "http://json-schema.org/schema", - "title": "Expo Install", - "description": "Install a module or other package to a project.", - "type": "object", - "properties": { - "packages": { - "type": "array", - "items": { "type": "string" }, - "default": [], - "description": "The names of packages to install", - "$default": { "$source": "argv", "index": 0 } - }, - "check": { - "type": "boolean", - "description": "Check which installed packages need to be updated", - "default": true - }, - "fix": { - "type": "boolean", - "description": "Automatically update any invalid package versions", - "default": false - } - }, - "presets": [] - }, - "description": "Install a module or other package to a project.", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/install/schema.json" - }, - { - "name": "export", - "implementation": "/packages/expo/src/executors/export/export.impl.ts", - "schema": { - "cli": "nx", - "version": 2, - "outputCapture": "direct-nodejs", - "$id": "NxExpoExport", - "$schema": "http://json-schema.org/schema", - "title": "Expo Export", - "description": "Export the JavaScript and assets for your app using Metro/webpack bundler.", - "type": "object", - "properties": { - "platform": { - "description": "Choose the platform to compile for", - "enum": ["ios", "android", "all", "web"], - "alias": "p" - }, - "dev": { - "type": "boolean", - "description": "Bundle for development environments without minifying code or stripping the __DEV__ boolean. Configure static files for developing locally using a non-https server." - }, - "clear": { - "type": "boolean", - "description": "Clear the bundler cache before exporting" - }, - "outputDir": { - "type": "string", - "description": "The directory to export the static files to. Default: dist" - }, - "maxWorkers": { - "type": "number", - "description": "Maximum number of tasks to allow Metro to spawn" - }, - "dumpAssetmap": { - "type": "string", - "description": "Dump the asset map for further processing" - }, - "dumpSourcemap": { - "type": "string", - "description": "Dump the source map for debugging the JS bundle" - }, - "bundler": { - "enum": ["metro", "webpack"], - "description": "Choose the bundler to compile for", - "default": "metro" - } - }, - "required": ["bundler"], - "presets": [] - }, - "description": "Export the JavaScript and assets for your app using Metro/webpack bundler", - "aliases": [], - "hidden": false, - "path": "/packages/expo/src/executors/export/schema.json" - } - ] -} diff --git a/docs/generated/packages/expo/executors/build-android.json b/docs/generated/packages/expo/executors/build-android.json new file mode 100644 index 0000000000000..0506aa66d3029 --- /dev/null +++ b/docs/generated/packages/expo/executors/build-android.json @@ -0,0 +1,63 @@ +{ + "name": "build-android", + "implementation": "/packages/expo/src/executors/build-android/build-android.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoBuildAndroid", + "cli": "nx", + "title": "Expo Android Build executor", + "description": "Build and sign a standalone APK or App Bundle for the Google Play Store.", + "type": "object", + "properties": { + "clearCredentials": { + "type": "boolean", + "description": "Clear all credentials stored on Expo servers.", + "alias": "c" + }, + "type": { + "enum": ["app-bundle", "apk"], + "description": "Type of build: [app-bundle⎮apk].", + "alias": "t" + }, + "releaseChannel": { + "type": "string", + "description": "Pull from specified release channel." + }, + "noPublish": { + "type": "boolean", + "description": "Disable automatic publishing before building." + }, + "noWait": { + "type": "boolean", + "description": "Exit immediately after scheduling build." + }, + "keystorePath": { + "type": "string", + "description": "Path to your Keystore: *.jks." + }, + "keystoreAlias": { "type": "string", "description": "Keystore Alias" }, + "publicUrl": { + "type": "string", + "description": "The URL of an externally hosted manifest (for self-hosted apps)." + }, + "skipWorkflowCheck": { + "type": "boolean", + "description": "Skip warning about build service bare workflow limitations." + }, + "sync": { + "type": "boolean", + "description": "Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.", + "default": true + } + }, + "required": [], + "presets": [] + }, + "description": "Build and sign a standalone APK or App Bundle for the Google Play Store", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/build-android/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/build-ios.json b/docs/generated/packages/expo/executors/build-ios.json new file mode 100644 index 0000000000000..60b24e7482bb1 --- /dev/null +++ b/docs/generated/packages/expo/executors/build-ios.json @@ -0,0 +1,100 @@ +{ + "name": "build-ios", + "implementation": "/packages/expo/src/executors/build-ios/build-ios.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoBuildIOS", + "cli": "nx", + "title": "Expo iOS Build executor", + "description": "Build and sign a standalone IPA for the Apple App Store.", + "type": "object", + "properties": { + "clearCredentials": { + "type": "boolean", + "description": "Clear all credentials stored on Expo servers.", + "alias": "c" + }, + "clearDistCert": { + "type": "boolean", + "description": "Remove Distribution Certificate stored on Expo servers." + }, + "clearPushKey": { + "type": "boolean", + "description": "Remove Push Notifications Key stored on Expo servers." + }, + "clearPushCert": { + "type": "boolean", + "description": "Remove Push Notifications Certificate stored on Expo servers. Use of Push Notifications Certificates is deprecated." + }, + "clearProvisioningProfile": { + "type": "boolean", + "description": "Remove Provisioning Profile stored on Expo servers." + }, + "revokeCredentials": { + "type": "boolean", + "description": "Revoke credentials on developer.apple.com, select appropriate using --clear-* options.", + "alias": "r" + }, + "appleId": { + "type": "string", + "description": "Apple ID username (please also set the Apple ID password as EXPO_APPLE_PASSWORD environment variable)." + }, + "type": { + "enum": ["archive", "simulator"], + "description": "Type of build: [archive⎮simulator].", + "alias": "t" + }, + "releaseChannel": { + "type": "string", + "description": "Pull from specified release channel." + }, + "noPublish": { + "type": "boolean", + "description": "Disable automatic publishing before building." + }, + "noWait": { + "type": "boolean", + "description": "Exit immediately after scheduling build." + }, + "teamId": { "type": "string", "description": "Apple Team ID." }, + "distP12Path": { + "type": "string", + "description": "Path to your Distribution Certificate P12 (set password as EXPO_IOS_DIST_P12_PASSWORD environment variable)." + }, + "pushP8Path": { + "type": "string", + "description": "Path to your Push Key .p8 file." + }, + "provisioningProfilePath": { + "type": "string", + "description": "Path to your Provisioning Profile." + }, + "publicUrl": { + "type": "string", + "description": "The URL of an externally hosted manifest (for self-hosted apps)." + }, + "skipCredentialsCheck": { + "type": "boolean", + "description": "Skip checking credentials." + }, + "skipWorkflowCheck": { + "type": "boolean", + "description": "Skip warning about build service bare workflow limitations." + }, + "sync": { + "type": "boolean", + "description": "Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.", + "default": true + } + }, + "required": [], + "presets": [] + }, + "description": "Build and sign a standalone IPA for the Apple App Store", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/build-ios/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/build-list.json b/docs/generated/packages/expo/executors/build-list.json new file mode 100644 index 0000000000000..382d993348a2d --- /dev/null +++ b/docs/generated/packages/expo/executors/build-list.json @@ -0,0 +1,84 @@ +{ + "name": "build-list", + "implementation": "/packages/expo/src/executors/build-list/build-list.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoEasBuildList", + "cli": "nx", + "title": "Expo EAS Build List executor", + "description": "List all EAS builds for your Expo project.", + "type": "object", + "properties": { + "platform": { + "enum": ["ios", "android", "all"], + "alias": "p", + "description": "The platform to build the app, example values: ios, android, all." + }, + "json": { + "type": "boolean", + "description": "Enable JSON output, non-JSON messages will be printed to stderr" + }, + "nonInteractive": { + "type": "boolean", + "description": "Run the command in non-interactive mode." + }, + "status": { + "enum": [ + "new", + "in-queue", + "in-progress", + "errored", + "finished", + "canceled" + ], + "description": "Status of EAS build" + }, + "distribution": { + "enum": ["store", "internal", "simulator"], + "description": "Distribution of EAS build" + }, + "channel": { "type": "string", "description": "Channel of EAS build" }, + "appVersion": { + "type": "string", + "description": "App version of EAS build" + }, + "appBuildVersion": { + "type": "string", + "description": "App build version of EAS build" + }, + "sdkVersion": { + "type": "string", + "description": "SDK version of EAS build" + }, + "runtimeVersion": { + "type": "string", + "description": "Runtime version of EAS build" + }, + "appIdentifier": { + "type": "string", + "description": "App identifier of EAS build" + }, + "buildProfile": { + "type": "string", + "description": "Build profile of EAS build" + }, + "gitCommitHash": { + "type": "string", + "description": "Git commit hash of EAS build" + }, + "limit": { + "type": "number", + "description": "Limit of numbers to list EAS builds" + } + }, + "required": [], + "presets": [] + }, + "description": "List all EAS builds for your Expo project", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/build-list/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/build-status.json b/docs/generated/packages/expo/executors/build-status.json new file mode 100644 index 0000000000000..beb07ec59ccd4 --- /dev/null +++ b/docs/generated/packages/expo/executors/build-status.json @@ -0,0 +1,27 @@ +{ + "name": "build-status", + "implementation": "/packages/expo/src/executors/build-status/build-status.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoBuildStatus", + "cli": "nx", + "title": "Expo web Build executor", + "description": "Get the status of the latest build for the project.", + "type": "object", + "properties": { + "publicUrl": { + "type": "string", + "description": "The URL of an externally hosted manifest (for self-hosted apps)." + } + }, + "required": [], + "presets": [] + }, + "description": "Get the status of the latest build for the project", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/build-status/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/build-web.json b/docs/generated/packages/expo/executors/build-web.json new file mode 100644 index 0000000000000..234457916b2d6 --- /dev/null +++ b/docs/generated/packages/expo/executors/build-web.json @@ -0,0 +1,36 @@ +{ + "name": "build-web", + "implementation": "/packages/expo/src/executors/build-web/build-web.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoBuildWeb", + "cli": "nx", + "title": "Expo web Build executor", + "description": "Build the web app for production.", + "type": "object", + "properties": { + "clear": { + "type": "boolean", + "description": "Clear all cached build files and assets.", + "alias": "c" + }, + "noPwa": { + "type": "boolean", + "description": "Prevent webpack from generating the manifest.json and injecting meta into the index.html head." + }, + "dev": { + "type": "boolean", + "description": "Turns dev flag on before bundling" + } + }, + "required": [], + "presets": [] + }, + "description": "Build the web app for production", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/build-web/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/build.json b/docs/generated/packages/expo/executors/build.json new file mode 100644 index 0000000000000..893dc89c42667 --- /dev/null +++ b/docs/generated/packages/expo/executors/build.json @@ -0,0 +1,68 @@ +{ + "name": "build", + "implementation": "/packages/expo/src/executors/build/build.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoEasBuild", + "cli": "nx", + "title": "Expo EAS Build executor", + "description": "Start an EAS build for your expo project.", + "type": "object", + "properties": { + "platform": { + "enum": ["ios", "android", "all"], + "alias": "p", + "description": "The platform to build the app, example values: ios, android, all." + }, + "json": { + "type": "boolean", + "description": "Enable JSON output, non-JSON messages will be printed to stderr", + "default": false + }, + "profile": { + "type": "string", + "description": "Name of the build profile from eas.json. Defaults to \"production\" if defined in eas.json.", + "examples": ["PROFILE_NAME"] + }, + "nonInteractive": { + "type": "boolean", + "description": "Run command in non-interactive mode", + "default": false + }, + "local": { + "type": "boolean", + "description": "Run build locally [experimental]", + "default": false + }, + "wait": { + "type": "boolean", + "description": "Wait for build(s) to complete", + "default": true + }, + "clearCache": { + "type": "boolean", + "description": "Clear cache before the build", + "default": false + }, + "autoSubmit": { + "type": "boolean", + "description": "Submit on build complete using the submit profile with the same name as the build profile", + "default": false + }, + "autoSubmitWithProfile": { + "type": "string", + "description": "Submit on build complete using the submit profile with provided name", + "examples": ["PROFILE_NAME"] + } + }, + "required": [], + "presets": [] + }, + "description": "Start an EAS build for your expo project", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/build/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/download.json b/docs/generated/packages/expo/executors/download.json new file mode 100644 index 0000000000000..1cc6f71bd494c --- /dev/null +++ b/docs/generated/packages/expo/executors/download.json @@ -0,0 +1,65 @@ +{ + "name": "download", + "implementation": "/packages/expo/src/executors/download/download.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoDownloadEasBuild", + "cli": "nx", + "title": "Download EAS Build executor", + "description": "Download an EAS build.", + "type": "object", + "properties": { + "platform": { + "enum": ["ios", "android"], + "alias": "p", + "description": "The platform to build the app, example values: ios, android, all." + }, + "distribution": { + "enum": ["store", "internal", "simulator"], + "description": "Distribution of EAS build" + }, + "channel": { "type": "string", "description": "Channel of EAS build" }, + "appVersion": { + "type": "string", + "description": "App version of EAS build" + }, + "appBuildVersion": { + "type": "string", + "description": "App build version of EAS build" + }, + "sdkVersion": { + "type": "string", + "description": "SDK version of EAS build" + }, + "runtimeVersion": { + "type": "string", + "description": "Runtime version of EAS build" + }, + "appIdentifier": { + "type": "string", + "description": "App identifier of EAS build" + }, + "buildProfile": { + "type": "string", + "description": "Build profile of EAS build" + }, + "gitCommitHash": { + "type": "string", + "description": "Git commit hash of EAS build" + }, + "output": { + "type": "string", + "description": "Output directory for the download build" + } + }, + "required": ["output"], + "presets": [] + }, + "description": "Download an EAS build", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/download/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/ensure-symlink.json b/docs/generated/packages/expo/executors/ensure-symlink.json new file mode 100644 index 0000000000000..8beee82479276 --- /dev/null +++ b/docs/generated/packages/expo/executors/ensure-symlink.json @@ -0,0 +1,21 @@ +{ + "name": "ensure-symlink", + "implementation": "/packages/expo/src/executors/ensure-symlink/ensure-symlink.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxExpoEnsureSymlink", + "$schema": "http://json-schema.org/schema", + "title": "Ensure Symlink for Expo", + "description": "Ensure workspace node_modules is symlink under app's node_modules folder.", + "type": "object", + "properties": {}, + "presets": [] + }, + "description": "Ensure workspace node_modules is symlink under app's node_modules folder.", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/ensure-symlink/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/export.json b/docs/generated/packages/expo/executors/export.json new file mode 100644 index 0000000000000..0323687d6be16 --- /dev/null +++ b/docs/generated/packages/expo/executors/export.json @@ -0,0 +1,57 @@ +{ + "name": "export", + "implementation": "/packages/expo/src/executors/export/export.impl.ts", + "schema": { + "cli": "nx", + "version": 2, + "outputCapture": "direct-nodejs", + "$id": "NxExpoExport", + "$schema": "http://json-schema.org/schema", + "title": "Expo Export", + "description": "Export the JavaScript and assets for your app using Metro/webpack bundler.", + "type": "object", + "properties": { + "platform": { + "description": "Choose the platform to compile for", + "enum": ["ios", "android", "all", "web"], + "alias": "p" + }, + "dev": { + "type": "boolean", + "description": "Bundle for development environments without minifying code or stripping the __DEV__ boolean. Configure static files for developing locally using a non-https server." + }, + "clear": { + "type": "boolean", + "description": "Clear the bundler cache before exporting" + }, + "outputDir": { + "type": "string", + "description": "The directory to export the static files to. Default: dist" + }, + "maxWorkers": { + "type": "number", + "description": "Maximum number of tasks to allow Metro to spawn" + }, + "dumpAssetmap": { + "type": "string", + "description": "Dump the asset map for further processing" + }, + "dumpSourcemap": { + "type": "string", + "description": "Dump the source map for debugging the JS bundle" + }, + "bundler": { + "enum": ["metro", "webpack"], + "description": "Choose the bundler to compile for", + "default": "metro" + } + }, + "required": ["bundler"], + "presets": [] + }, + "description": "Export the JavaScript and assets for your app using Metro/webpack bundler", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/export/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/install.json b/docs/generated/packages/expo/executors/install.json new file mode 100644 index 0000000000000..054c8e34f0615 --- /dev/null +++ b/docs/generated/packages/expo/executors/install.json @@ -0,0 +1,39 @@ +{ + "name": "install", + "implementation": "/packages/expo/src/executors/install/install.impl.ts", + "schema": { + "cli": "nx", + "version": 2, + "outputCapture": "direct-nodejs", + "$id": "NxExpoInstall", + "$schema": "http://json-schema.org/schema", + "title": "Expo Install", + "description": "Install a module or other package to a project.", + "type": "object", + "properties": { + "packages": { + "type": "array", + "items": { "type": "string" }, + "default": [], + "description": "The names of packages to install", + "$default": { "$source": "argv", "index": 0 } + }, + "check": { + "type": "boolean", + "description": "Check which installed packages need to be updated", + "default": true + }, + "fix": { + "type": "boolean", + "description": "Automatically update any invalid package versions", + "default": false + } + }, + "presets": [] + }, + "description": "Install a module or other package to a project.", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/install/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/prebuild.json b/docs/generated/packages/expo/executors/prebuild.json new file mode 100644 index 0000000000000..a83d73e05eb04 --- /dev/null +++ b/docs/generated/packages/expo/executors/prebuild.json @@ -0,0 +1,37 @@ +{ + "name": "prebuild", + "implementation": "/packages/expo/src/executors/prebuild/prebuild.impl.ts", + "schema": { + "cli": "nx", + "version": 2, + "outputCapture": "direct-nodejs", + "$id": "NxExpoPrebuild", + "$schema": "http://json-schema.org/schema", + "title": "Expo Prebuild", + "description": "Create native iOS and Android project files for building natively.", + "type": "object", + "properties": { + "install": { + "type": "boolean", + "description": "Installing npm packages and CocoaPods.", + "default": false + }, + "platform": { + "description": "Platforms to sync", + "default": "all", + "enum": ["ios", "android", "all"], + "alias": "p" + }, + "template": { + "type": "string", + "description": "Project template to clone from. File path pointing to a local tar file or a github repo" + } + }, + "presets": [] + }, + "description": "Create native iOS and Android project files for building natively.", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/prebuild/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/publish-set.json b/docs/generated/packages/expo/executors/publish-set.json new file mode 100644 index 0000000000000..cf7475c76f9bd --- /dev/null +++ b/docs/generated/packages/expo/executors/publish-set.json @@ -0,0 +1,31 @@ +{ + "name": "publish-set", + "implementation": "/packages/expo/src/executors/publish-set/publish-set.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxExpoPublishSet", + "$schema": "http://json-schema.org/schema", + "title": "Set Publish Channel for Expo", + "description": "Specify the channel to serve a published release.", + "type": "object", + "properties": { + "releaseChannel": { + "type": "string", + "description": "The release channel to publish to." + }, + "publishId": { + "type": "string", + "description": "The id of the published release to serve from the channel." + } + }, + "required": ["releaseChannel", "publishId"], + "presets": [] + }, + "description": "Specify the channel to serve a published release", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/publish-set/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/publish.json b/docs/generated/packages/expo/executors/publish.json new file mode 100644 index 0000000000000..c7c8e7f01a727 --- /dev/null +++ b/docs/generated/packages/expo/executors/publish.json @@ -0,0 +1,54 @@ +{ + "name": "publish", + "implementation": "/packages/expo/src/executors/publish/publish.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxExpoPublish", + "$schema": "http://json-schema.org/schema", + "title": "Publish for Expo", + "description": "Deploy a project to Expo hosting.", + "type": "object", + "properties": { + "quiet": { + "type": "boolean", + "description": "Suppress verbose output from the Metro bundler", + "default": false, + "alias": "q" + }, + "sendTo": { + "type": "string", + "description": "A phone number or email address to send a link to", + "alias": "s" + }, + "clear": { + "type": "boolean", + "description": "Clear the Metro bundler cache", + "default": false, + "alias": "c" + }, + "target": { + "enum": ["managed", "bare"], + "default": "managed", + "description": "Target environment for which this publish is intended. Options are managed or bare.", + "alias": "t" + }, + "maxWorkers": { + "type": "number", + "description": "Maximum number of tasks to allow Metro to spawn" + }, + "releaseChannel": { + "type": "string", + "description": "The release channel to publish to. Default is 'default'.", + "default": "default" + } + }, + "presets": [] + }, + "description": "Deploy a project to Expo hosting", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/publish/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/rollback.json b/docs/generated/packages/expo/executors/rollback.json new file mode 100644 index 0000000000000..807a76f71d49a --- /dev/null +++ b/docs/generated/packages/expo/executors/rollback.json @@ -0,0 +1,35 @@ +{ + "name": "rollback", + "implementation": "/packages/expo/src/executors/rollback/rollback.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxExpoRollback", + "$schema": "http://json-schema.org/schema", + "title": "Rollback Publish Command for Expo", + "description": "Undo an update to a channel.", + "type": "object", + "properties": { + "releaseChannel": { + "type": "string", + "description": "The release channel to publish to." + }, + "sdkVersion": { + "type": "string", + "description": "The sdk version to rollback." + }, + "platform": { + "enum": ["ios", "android"], + "description": "The platform to rollback." + } + }, + "required": ["releaseChannel", "sdkVersion"], + "presets": [] + }, + "description": "Undo an update to a channel", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/rollback/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/run.json b/docs/generated/packages/expo/executors/run.json new file mode 100644 index 0000000000000..91028eb0c908b --- /dev/null +++ b/docs/generated/packages/expo/executors/run.json @@ -0,0 +1,71 @@ +{ + "name": "run", + "implementation": "/packages/expo/src/executors/run/run.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxExpoRun", + "$schema": "http://json-schema.org/schema", + "title": "Run iOS or Android application", + "description": "Run Expo target options.", + "type": "object", + "properties": { + "platform": { + "description": "Platform to run for (ios, android).", + "enum": ["ios", "android"], + "default": "ios", + "alias": "p" + }, + "xcodeConfiguration": { + "type": "string", + "description": "(iOS) Xcode configuration to use. Debug or Release", + "default": "Debug" + }, + "scheme": { + "type": "string", + "description": "(iOS) Explicitly set the Xcode scheme to use" + }, + "variant": { + "type": "string", + "description": "(Android) Specify your app's build variant (e.g. debug, release).", + "default": "debug" + }, + "device": { + "type": "string", + "description": "Device name or UDID to build the app on. The value is not required if you have a single device connected.", + "alias": "d" + }, + "sync": { + "type": "boolean", + "description": "Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.", + "default": true + }, + "port": { + "type": "number", + "description": "Port to start the Metro bundler on", + "default": 8081, + "alias": "p" + }, + "bundler": { + "type": "boolean", + "description": "Whether to skip starting the Metro bundler. True to start it, false to skip it." + }, + "install": { + "type": "boolean", + "description": "Should install missing dependencies before building." + }, + "buildCache": { + "type": "boolean", + "description": "Should use derived data for builds." + } + }, + "required": ["platform"], + "presets": [] + }, + "description": "Run the Android app binary locally or run the iOS app binary locally", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/run/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/start.json b/docs/generated/packages/expo/executors/start.json new file mode 100644 index 0000000000000..edb34133cf353 --- /dev/null +++ b/docs/generated/packages/expo/executors/start.json @@ -0,0 +1,107 @@ +{ + "name": "start", + "implementation": "/packages/expo/src/executors/start/start.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxExpoStart", + "$schema": "http://json-schema.org/schema", + "title": "Packager Server for Expo", + "description": "Packager Server target options.", + "type": "object", + "properties": { + "forceManifestType": { + "type": "string", + "description": "Override auto detection of manifest type.", + "enum": ["expo-updates", "classic"] + }, + "privateKeyPath": { + "type": "string", + "description": "Path to private key for code signing. Default: 'private-key.pem' in the same directory as the certificate specified by the expo-updates configuration in app.json." + }, + "port": { + "type": "number", + "description": "Port to start the native Metro bundler on (does not apply to web or tunnel)", + "default": 19000, + "alias": "p" + }, + "clear": { + "type": "boolean", + "description": "Clear the Metro bundler cache", + "alias": "c" + }, + "maxWorkers": { + "type": "number", + "description": "Maximum number of tasks to allow Metro to spawn" + }, + "dev": { + "type": "boolean", + "description": "Turn development mode on or off" + }, + "devClient": { + "type": "boolean", + "description": "Experimental: Starts the bundler for use with the expo-development-client" + }, + "minify": { + "type": "boolean", + "description": "Whether or not to minify code" + }, + "https": { + "type": "boolean", + "description": "To start webpack with https or http protocol" + }, + "scheme": { + "type": "string", + "description": "Custom URI protocol to use with a development build" + }, + "android": { + "type": "boolean", + "description": "Opens your app in Expo Go on a connected Android device", + "alias": "a" + }, + "ios": { + "type": "boolean", + "description": "Opens your app in Expo Go in a currently running iOS simulator on your computer", + "alias": "i" + }, + "web": { + "type": "boolean", + "description": " Opens your app in a web browser", + "alias": "w" + }, + "host": { + "type": "string", + "description": "lan (default), tunnel, localhost. Type of host to use. lan uses the local network; tunnel ues any network by tunnel through ngrok; localhost connects to the dev server over localhost.", + "enum": ["localhost", "lan", "tunnel"] + }, + "tunnel": { "type": "boolean", "description": "Same as --host tunnel" }, + "lan": { "type": "boolean", "description": "Same as --host lan" }, + "localhost": { + "type": "boolean", + "description": "Same as --host localhost" + }, + "offline": { + "type": "boolean", + "description": "Allows this command to run while offline" + }, + "sentTo": { + "type": "string", + "description": "An email address to send a link to", + "alias": "s", + "x-deprecated": true + }, + "webpack": { + "type": "boolean", + "description": "Start a Webpack dev server for the web app.", + "x-deprecated": true + } + }, + "presets": [] + }, + "description": "Start a local dev server for the app or start a Webpack dev server for the web app", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/start/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/sync-deps.json b/docs/generated/packages/expo/executors/sync-deps.json new file mode 100644 index 0000000000000..2b01e61b31ed2 --- /dev/null +++ b/docs/generated/packages/expo/executors/sync-deps.json @@ -0,0 +1,34 @@ +{ + "name": "sync-deps", + "implementation": "/packages/expo/src/executors/sync-deps/sync-deps.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxExpoSyncDeps", + "$schema": "http://json-schema.org/schema", + "title": "Sync Deps for Expo", + "description": "Updates package.json with project dependencies.", + "type": "object", + "properties": { + "include": { + "type": "array", + "items": { "type": "string" }, + "default": [], + "description": "An array of additional npm packages to include." + }, + "exclude": { + "type": "array", + "items": { "type": "string" }, + "default": [], + "description": "An array of npm packages to exclude." + } + }, + "presets": [] + }, + "description": "Syncs dependencies to package.json (required for autolinking).", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/sync-deps/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/executors/update.json b/docs/generated/packages/expo/executors/update.json new file mode 100644 index 0000000000000..85f47fcc738c2 --- /dev/null +++ b/docs/generated/packages/expo/executors/update.json @@ -0,0 +1,68 @@ +{ + "name": "update", + "implementation": "/packages/expo/src/executors/update/update.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "$id": "NxExpoEasUpdate", + "cli": "nx", + "title": "Expo EAS Update executor", + "description": "Start an EAS update for your expo project.", + "type": "object", + "properties": { + "branch": { + "type": "string", + "description": "Branch to publish the update group on" + }, + "message": { + "type": "string", + "description": "A short message describing the update" + }, + "republish": { + "type": "boolean", + "description": "Enable JSON output, non-JSON messages will be printed to stderr", + "default": false + }, + "group": { "type": "string", "description": "Update group to republish" }, + "inputDir": { "type": "string", "description": "Location of the bundle" }, + "skipBundler": { + "type": "boolean", + "description": "Skip running Expo CLI to bundle the app before publishing", + "default": false + }, + "platform": { + "enum": ["ios", "android", "all"], + "alias": "p", + "description": "The platform to build the app, example values: ios, android, all.", + "default": "all" + }, + "json": { + "type": "boolean", + "description": "Enable JSON output, non-JSON messages will be printed to stderr", + "default": false + }, + "auto": { + "type": "boolean", + "description": "Use the current git branch and commit message for the EAS branch and update message", + "default": false + }, + "privateKeyPath": { + "type": "string", + "description": "File containing the PEM-encoded private key corresponding to the certificate in expo-updates' configuration. Defaults to a file named \"private-key.pem\" in the certificate's directory." + }, + "nonInteractive": { + "type": "boolean", + "description": "Run command in non-interactive mode", + "default": false + } + }, + "required": [], + "presets": [] + }, + "description": "Start an EAS update for your expo project", + "aliases": [], + "hidden": false, + "path": "/packages/expo/src/executors/update/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/expo/generators/application.json b/docs/generated/packages/expo/generators/application.json new file mode 100644 index 0000000000000..b0761662b0707 --- /dev/null +++ b/docs/generated/packages/expo/generators/application.json @@ -0,0 +1,88 @@ +{ + "name": "application", + "factory": "./src/generators/application/application#expoApplicationGenerator", + "schema": { + "cli": "nx", + "$id": "NxExpoApplication", + "$schema": "http://json-schema.org/schema", + "description": "Create an Expo Application for Nx.", + "examples": [ + { + "command": "g app myapp --directory=nested", + "description": "Generate apps/nested/myapp" + }, + { + "command": "g app myapp --classComponent", + "description": "Use class components instead of functional components" + } + ], + "type": "object", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the application?" + }, + "displayName": { + "description": "The display name to show in the application. Defaults to name.", + "type": "string" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "skipFormat": { + "description": "Skip formatting files", + "type": "boolean", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting)", + "alias": "t" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files", + "default": false + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", + "default": false + }, + "e2eTestRunner": { + "description": "Adds the specified e2e test runner", + "type": "string", + "enum": ["detox", "none"], + "default": "detox" + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + } + }, + "required": ["name"], + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create an application", + "implementation": "/packages/expo/src/generators/application/application#expoApplicationGenerator.ts", + "hidden": false, + "path": "/packages/expo/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/expo/generators/component.json b/docs/generated/packages/expo/generators/component.json new file mode 100644 index 0000000000000..2acc4057a31cc --- /dev/null +++ b/docs/generated/packages/expo/generators/component.json @@ -0,0 +1,87 @@ +{ + "name": "component", + "factory": "./src/generators/component/component#expoComponentGenerator", + "schema": { + "cli": "nx", + "$id": "NxExpoComponent", + "$schema": "http://json-schema.org/schema", + "description": "Create a Expo Component for Nx.", + "type": "object", + "examples": [ + { + "command": "g component my-component --project=mylib", + "description": "Generate a component in the mylib library" + }, + { + "command": "g component my-component --project=mylib --classComponent", + "description": "Generate a class component in the mylib library" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for this component?" + }, + "name": { + "type": "string", + "description": "The name of the component.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the component?" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTests": { + "type": "boolean", + "description": "When true, does not create \"spec.ts\" test files for the new component.", + "default": false + }, + "directory": { + "type": "string", + "description": "Create the component under this directory (can be nested)." + }, + "flat": { + "type": "boolean", + "description": "Create component at the source root rather than its own directory.", + "default": false + }, + "export": { + "type": "boolean", + "description": "When true, the component is exported from the project index.ts (if it exists).", + "alias": "e", + "default": false, + "x-prompt": "Should this component be exported in the project?" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. App.tsx).", + "alias": "P", + "default": false + }, + "classComponent": { + "type": "boolean", + "alias": "C", + "description": "Use class components instead of functional component.", + "default": false + } + }, + "required": ["name", "project"], + "presets": [] + }, + "description": "Create a component", + "aliases": ["c"], + "implementation": "/packages/expo/src/generators/component/component#expoComponentGenerator.ts", + "hidden": false, + "path": "/packages/expo/src/generators/component/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/expo/generators/init.json b/docs/generated/packages/expo/generators/init.json new file mode 100644 index 0000000000000..8ffa3bacb4635 --- /dev/null +++ b/docs/generated/packages/expo/generators/init.json @@ -0,0 +1,38 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#expoInitGenerator", + "schema": { + "cli": "nx", + "$id": "NxExpoInit", + "$schema": "http://json-schema.org/schema", + "description": "Add Nx Expo Schematics.", + "type": "object", + "properties": { + "unitTestRunner": { + "description": "Adds the specified unit test runner", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "skipFormat": { + "description": "Skip formatting files", + "type": "boolean", + "default": false + }, + "e2eTestRunner": { + "description": "Adds the specified e2e test runner", + "type": "string", + "enum": ["detox", "none"], + "default": "detox" + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the @nrwl/expo plugin", + "hidden": true, + "implementation": "/packages/expo/src/generators/init/init#expoInitGenerator.ts", + "aliases": [], + "path": "/packages/expo/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/expo/generators/library.json b/docs/generated/packages/expo/generators/library.json new file mode 100644 index 0000000000000..0948ab4f7ff69 --- /dev/null +++ b/docs/generated/packages/expo/generators/library.json @@ -0,0 +1,105 @@ +{ + "name": "library", + "factory": "./src/generators/library/library#expoLibraryGenerator", + "schema": { + "cli": "nx", + "$id": "NxExpoLibrary", + "$schema": "http://json-schema.org/schema", + "description": "Create a Expo Library for Nx.", + "type": "object", + "examples": [ + { + "command": "g lib mylib --directory=myapp", + "description": "Generate libs/myapp/mylib" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Library name", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "type": "string", + "description": "A directory where the lib is placed." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting).", + "alias": "t" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update tsconfig.json for development experience." + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. App.tsx).", + "alias": "P", + "default": false + }, + "publishable": { + "type": "boolean", + "description": "Create a publishable library." + }, + "buildable": { + "type": "boolean", + "default": false, + "description": "Generate a buildable library." + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like @myorg/my-awesome-lib" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "globalCss": { + "type": "boolean", + "description": "When true, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is '*.css' rather than '*.module.css').", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Whether to enable tsconfig strict mode or not.", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", + "default": false + } + }, + "required": ["name"], + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Create a library", + "implementation": "/packages/expo/src/generators/library/library#expoLibraryGenerator.ts", + "hidden": false, + "path": "/packages/expo/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/express.json b/docs/generated/packages/express.json deleted file mode 100644 index 2ff218ce110de..0000000000000 --- a/docs/generated/packages/express.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "express", - "packageName": "@nrwl/express", - "description": "The Nx Plugin for Express contains executors and generators for allowing your workspace to create powerful Express Node applications and APIs.", - "root": "/packages/express", - "source": "/packages/express/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/express", - "file": "shared/express-plugin", - "content": "[Express](https://expressjs.com/) is mature, minimal, and an open source web framework for making web applications and\napis.\n\n## Setting Up Express\n\nTo create a new workspace with Express, run the following command:\n\n```shell\n npx create-nx-workspace --preset=express\n```\n\n### Adding Express to an Existing Project\n\nInstall the express plugin\n\n{% tabs %}\n{%tab label=\"npm\"%}\n\n```shell\nnpm i --save-dev @nrwl/express\n```\n\n{% /tab %}\n{%tab label=\"yarn\"%}\n\n```shell\nyarn add --dev @nrwl/express\n```\n\n{% /tab %}\n{% /tabs %}\n\n## Creating Applications\n\nAdd a new application to your workspace with the following command:\n\n```shell\nnx g @nrwl/express:app my-app\n```\n\nServe the application by running\n\n```shell\nnx serve my-app\n```\n\nThis starts the application on localhost:3333/api by default.\n\n> Express does not come with any library generators, but you can leverage the[`@nrwl/js`](/packages/js#create-libraries) plugin to generate a Node.js library for your express application.\n\n### Application Proxies\n\nThe Express application generator has an option to configure other projects in the workspace to proxy API requests. This\ncan be done by passing the `--frontendProject` with the project name you wish to enable proxy support for.\n\n```shell\nnx g @nrwl/express:app --frontendProject my-react-app\n```\n\n## Using Express\n\n### Testing Projects\n\nYou can run unit tests with:\n\n```shell\nnx test \n```\n\n### Building Projects\n\nExpress projects can be built with:\n\n```shell\nnx build \n```\n\nBuild artifacts will be found in the `dist` directory under `apps/` by default. Customize the build\nconfiguration by editing `outputPath` in the [project configuration](/reference/project-configuration).\n\n### Waiting for Other Tasks\n\nYou can wait for other tasks to run before serving the express app which can be handy for spinning up various services\nthe application depends on— for example, other apis in a microservice.\n\nSetting the `waitUntilTargets` option with an array of targets (format: `\"project:target\"`) executes those tasks\nbefore serving the Express application.\n\n## More Documentation\n\n- [Using Jest](/packages/jest)\n- [@nrwl/js](/packages/js)\n- [Express](https://expressjs.com/)\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#initGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxExpressInit", - "title": "Init Express Plugin", - "description": "Init Express Plugin.", - "type": "object", - "properties": { - "unitTestRunner": { - "description": "Adds the specified unit test runner.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/express` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/express/src/generators/init/init#initGenerator.ts", - "path": "/packages/express/src/generators/init/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application#applicationGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "SchematicsNxExpressApp", - "title": "Nx Application Options Schema", - "description": "Nx Application Options Schema.", - "type": "object", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the node application?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting)." - }, - "frontendProject": { - "type": "string", - "description": "Frontend project that needs to access this application. This sets up proxy configuration." - }, - "babelJest": { - "type": "boolean", - "description": "Use `babel` instead `ts-jest`.", - "default": false - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case file names.", - "alias": "P", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - } - }, - "required": [], - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create an Express application.", - "implementation": "/packages/express/src/generators/application/application#applicationGenerator.ts", - "hidden": false, - "path": "/packages/express/src/generators/application/schema.json" - } - ], - "executors": [] -} diff --git a/docs/generated/packages/express/documents/overview.md b/docs/generated/packages/express/documents/overview.md new file mode 100644 index 0000000000000..e26cc61b983ad --- /dev/null +++ b/docs/generated/packages/express/documents/overview.md @@ -0,0 +1,93 @@ +[Express](https://expressjs.com/) is mature, minimal, and an open source web framework for making web applications and +apis. + +## Setting Up Express + +To create a new workspace with Express, run the following command: + +```shell + npx create-nx-workspace --preset=express +``` + +### Adding Express to an Existing Project + +Install the express plugin + +{% tabs %} +{%tab label="npm"%} + +```shell +npm i --save-dev @nrwl/express +``` + +{% /tab %} +{%tab label="yarn"%} + +```shell +yarn add --dev @nrwl/express +``` + +{% /tab %} +{% /tabs %} + +## Creating Applications + +Add a new application to your workspace with the following command: + +```shell +nx g @nrwl/express:app my-app +``` + +Serve the application by running + +```shell +nx serve my-app +``` + +This starts the application on localhost:3333/api by default. + +> Express does not come with any library generators, but you can leverage the[`@nrwl/js`](/packages/js#create-libraries) plugin to generate a Node.js library for your express application. + +### Application Proxies + +The Express application generator has an option to configure other projects in the workspace to proxy API requests. This +can be done by passing the `--frontendProject` with the project name you wish to enable proxy support for. + +```shell +nx g @nrwl/express:app --frontendProject my-react-app +``` + +## Using Express + +### Testing Projects + +You can run unit tests with: + +```shell +nx test +``` + +### Building Projects + +Express projects can be built with: + +```shell +nx build +``` + +Build artifacts will be found in the `dist` directory under `apps/` by default. Customize the build +configuration by editing `outputPath` in the [project configuration](/reference/project-configuration). + +### Waiting for Other Tasks + +You can wait for other tasks to run before serving the express app which can be handy for spinning up various services +the application depends on— for example, other apis in a microservice. + +Setting the `waitUntilTargets` option with an array of targets (format: `"project:target"`) executes those tasks +before serving the Express application. + +## More Documentation + +- [Using Jest](/packages/jest) +- [@nrwl/js](/packages/js) +- [Express](https://expressjs.com/) diff --git a/docs/generated/packages/express/generators/application.json b/docs/generated/packages/express/generators/application.json new file mode 100644 index 0000000000000..f665e12b04825 --- /dev/null +++ b/docs/generated/packages/express/generators/application.json @@ -0,0 +1,89 @@ +{ + "name": "application", + "factory": "./src/generators/application/application#applicationGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "SchematicsNxExpressApp", + "title": "Nx Application Options Schema", + "description": "Nx Application Options Schema.", + "type": "object", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the node application?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting)." + }, + "frontendProject": { + "type": "string", + "description": "Frontend project that needs to access this application. This sets up proxy configuration." + }, + "babelJest": { + "type": "boolean", + "description": "Use `babel` instead `ts-jest`.", + "default": false + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case file names.", + "alias": "P", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + } + }, + "required": [], + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create an Express application.", + "implementation": "/packages/express/src/generators/application/application#applicationGenerator.ts", + "hidden": false, + "path": "/packages/express/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/express/generators/init.json b/docs/generated/packages/express/generators/init.json new file mode 100644 index 0000000000000..9443b248be696 --- /dev/null +++ b/docs/generated/packages/express/generators/init.json @@ -0,0 +1,33 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#initGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxExpressInit", + "title": "Init Express Plugin", + "description": "Init Express Plugin.", + "type": "object", + "properties": { + "unitTestRunner": { + "description": "Adds the specified unit test runner.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/express` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/express/src/generators/init/init#initGenerator.ts", + "path": "/packages/express/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/jest.json b/docs/generated/packages/jest.json deleted file mode 100644 index a0f3802ccae06..0000000000000 --- a/docs/generated/packages/jest.json +++ /dev/null @@ -1,354 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "jest", - "packageName": "@nrwl/jest", - "description": "The Nx Plugin for Jest contains executors and generators allowing your workspace to use the powerful Jest testing capabilities.", - "root": "/packages/jest", - "source": "/packages/jest/src", - "documentation": [ - { - "name": "Overview", - "id": "overview", - "path": "/packages/jest", - "file": "shared/jest-plugin", - "content": "[Jest](https://jestjs.io/) is an open source test runner created by Facebook. It has a lot of great features:\n\n- Immersive watch mode for providing near instant feedback when developing tests.\n- Snapshot testing for validating features.\n- Great built-in reporter for printing out test results.\n\n## Setting up Jest\n\nBy default, Nx will use Jest when creating applications and libraries.\n\n```shell\nnx g @nrwl/web:app frontend\n```\n\n### Adding Jest to an Existing Project\n\nAdd Jest to a project using the `jest-project` generator from `@nrwl/jest`.\n\nFirst, install `@nrwl/jest`, if not already installed using your preferred package manager.\n\n```shell\nnpm install --save-dev @nrwl/jest\n```\n\n```shell\nyarn add --dev @nrwl/jest\n```\n\nOnce installed, run the `jest-project` generator\n\n```shell\nnx g @nrwl/jest:jest-project --project=\n```\n\n> Hint: You can use the `--dry-run` flag to see what will be generated.\n\nReplacing `` with the name of the project you're wanting to add Jest too.\n\n## Using Jest\n\n### Testing Applications\n\nThe recommended way to run/debug Jest tests via an editor\n\n- [VSCode](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner)\n- [Webstorm](https://blog.jetbrains.com/webstorm/2018/10/testing-with-jest-in-webstorm/)\n\nTo run Jest tests via nx use\n\n```shell\nnx test frontend\n```\n\n### Watching for Changes\n\nUsing the `--watch` flag will run the tests whenever a file changes.\n\n```shell\nnx test frontend --watch\n```\n\n### Snapshot Testing\n\nJest has support for **Snapshot Testing**, a tool which simplifies validating data. Check out the [official Jest Documentation on Snapshot Testing](https://jestjs.io/docs/en/snapshot-testing).\n\nExample of using snapshots:\n\n```typescript\ndescribe('SuperAwesomFunction', () => {\n it('should return the correct data shape', () => {\n const actual = superAwesomFunction();\n expect(actual).toMatchSnapshot();\n });\n});\n```\n\nWhen using snapshots, you can update them with the `--updateSnapshot` flag, `-u` for short.\n\n> By default, snapshots will be generated when there are not existing snapshots for the associated test.\n\n```shell\nnx test frontend -u\n```\n\nSnapshot files should be checked in with your code.\n\n### Performance in CI\n\nTypically, in CI it's recommended to use `nx affected --target=test --parallel=[# CPUs] -- --runInBand` for the best performance.\n\nThis is because each [jest process creates a workers based on system resources](https://jestjs.io/docs/cli#--maxworkersnumstring), running multiple projects via nx and using jest workers will create too many process overall causing the system to run slower than desired. Using the `--runInBand` flag tells jest to run in a single process.\n\n## Configurations\n\n### Jest\n\nPrimary configurations for Jest will be via the `jest.config.js` file that generated for your project. This file will extend the root `jest.config.js` file. Learn more about [Jest configurations](https://jestjs.io/docs/configuration#options).\n\n### Nx\n\nNx Jest Plugin options can be configured via the [project config file](/reference/project-configuration) or via the [command line flags](/packages/jest).\n\n> Hint: Use `--help` to see all available options\n>\n> ```shell\n> nx test --help\n> ```\n\n### Code Coverage\n\nEnable code coverage with the `--coverage` flag or by adding it to the executor options in the [project configuration file](/reference/project-configuration).\n\nBy default, coverage reports will be generated in the `coverage/` directory under projects name. i.e. `coverage/apps/frontend`. Modify this directory with the `--coverageDirectory` flag. Coverage reporters can also be customized with the `--coverageReporters` flag.\n\n> `coverageDirectory` and `coverageReporters` are configurable via the project configuration file as well.\n\n### Global setup/teardown with nx libraries\n\nIn order to use Jest's global setup/teardown functions that reference nx libraries, you'll need to register the TS path for jest to resolve the libraries.\nNx provides a helper function that you can import within your setup/teardown file.\n\n```typescript\nimport { registerTsProject } from 'nx/src/utils/register';\nconst cleanupRegisteredPaths = registerTsProject('.', 'tsconfig.base.json');\n\nimport { yourFancyFunction } from '@some-org/my-util-library';\nexport default async function () {\n yourFancyFunction();\n}\n// make sure to run the clean up!\ncleanupRegisteredPaths();\n```\n\n## Debugging Failing Tests\n\nIf your code editor doesn't provide a way to debug your tests, you can leverage the Chrome DevTools to debug your tests with the `--inspect-brk` flag for node.\n\n```shell\nnode --inspect-brk ./node_modules/@nrwl/cli/bin/nx test \n```\n\nEnter [chrome://inspect](chrome://inspect) in Chrome address bar and inspect the target to attach to the node process. Visit the official [Jest documentation](https://jestjs.io/docs/en/troubleshooting#tests-are-failing-and-you-don-t-know-why) to find out more.\n\n## More Documentation\n\n- [Jest Docs](https://jestjs.io/)\n- [@nrwl/jest options](/packages/jest)\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#jestInitGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxJestInit", - "cli": "nx", - "title": "Jest init", - "description": "Add Jest Configuration to a workspace.", - "type": "object", - "properties": { - "babelJest": { - "type": "boolean", - "alias": "babel-jest", - "description": "Use `babel-jest` instead of `ts-jest`.", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "js": { - "type": "boolean", - "default": false, - "description": "Use JavaScript instead of TypeScript for config files" - }, - "rootProject": { - "description": "initialize Jest for an application at the root of the workspace", - "type": "boolean", - "default": false, - "hidden": true - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/jest` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/jest/src/generators/init/init#jestInitGenerator.ts", - "path": "/packages/jest/src/generators/init/schema.json" - }, - { - "name": "jest-project", - "factory": "./src/generators/jest-project/jest-project#jestProjectGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxJestProject", - "cli": "nx", - "title": "Add Jest Configuration to a project", - "description": "Add Jest Configuration to a project.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "$default": { "$source": "projectName" } - }, - "skipSetupFile": { - "type": "boolean", - "description": "[Deprecated]: Skips the setup file required for angular. (Use `--setup-file`)", - "default": false, - "x-deprecated": true - }, - "setupFile": { - "type": "string", - "enum": ["none", "angular", "web-components"], - "description": "The setup file to be generated.", - "default": "none" - }, - "skipSerializers": { - "type": "boolean", - "description": "Skips the serializers required to snapshot angular templates.", - "default": false - }, - "supportTsx": { - "type": "boolean", - "description": "Setup `tsx` support.", - "default": false - }, - "testEnvironment": { - "type": "string", - "enum": ["jsdom", "node"], - "description": "The test environment for jest.", - "default": "jsdom" - }, - "compiler": { - "type": "string", - "enum": ["tsc", "babel", "swc"], - "description": "The compiler to use for source and tests.", - "default": "tsc" - }, - "babelJest": { - "type": "boolean", - "alias": "babel-jest", - "description": "Use `babel-jest` instead of `ts-jest` (Deprecated: Use `--compiler=babel` instead).", - "x-deprecated": true, - "default": false - }, - "skipFormat": { - "description": "Skip formatting files", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "js": { - "type": "boolean", - "default": false, - "description": "Use JavaScript instead of TypeScript for config files" - }, - "rootProject": { - "description": "Add Jest to an application at the root of the workspace", - "type": "boolean", - "default": false, - "hidden": true - } - }, - "required": [], - "presets": [] - }, - "description": "Add Jest configuration to a project.", - "hidden": true, - "implementation": "/packages/jest/src/generators/jest-project/jest-project#jestProjectGenerator.ts", - "aliases": [], - "path": "/packages/jest/src/generators/jest-project/schema.json" - } - ], - "executors": [ - { - "name": "jest", - "implementation": "/packages/jest/src/executors/jest/jest.impl.ts", - "batchImplementation": "./src/executors/jest/jest.impl#batchJest", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Jest Builder", - "description": "Jest target options for Build Facade.", - "cli": "nx", - "type": "object", - "presets": [ - { - "name": "Pass Without Tests", - "keys": ["jestConfig", "passWithNoTests"] - }, - { - "name": "Code Coverage", - "keys": ["jestConfig", "coverageReporters"] - }, - { "name": "Stop After 'n' Failed", "keys": ["jestConfig", "bail"] } - ], - "properties": { - "codeCoverage": { - "description": "Indicates that test coverage information should be collected and reported in the output. (https://jestjs.io/docs/cli#--coverageboolean)", - "type": "boolean", - "aliases": ["coverage"] - }, - "config": { - "description": "The path to a Jest config file specifying how to find and execute tests. If no `rootDir` is set in the config, the directory containing the config file is assumed to be the `rootDir` for the project. This can also be a JSON-encoded value which Jest will use as configuration.", - "type": "string" - }, - "clearCache": { - "description": "Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory. _Note: clearing the cache will reduce performance_.", - "type": "boolean" - }, - "detectOpenHandles": { - "description": "Attempt to collect and print open handles preventing Jest from exiting cleanly (https://jestjs.io/docs/cli#--detectopenhandles)", - "type": "boolean" - }, - "logHeapUsage": { - "description": "Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.", - "type": "boolean" - }, - "detectLeaks": { - "description": "**EXPERIMENTAL**: Detect memory leaks in tests. After executing a test, it will try to garbage collect the global object used, and fail if it was leaked", - "type": "boolean" - }, - "jestConfig": { - "description": "The path of the Jest configuration. (https://jestjs.io/docs/en/configuration)", - "type": "string", - "x-completion-type": "file", - "x-completion-glob": "jest.config@(.js|.ts)" - }, - "testFile": { - "description": "The name of the file to test.", - "type": "string" - }, - "tsConfig": { - "description": "The name of the Typescript configuration file. Set the tsconfig option in the jest config file. ", - "type": "string", - "x-deprecated": true - }, - "setupFile": { - "description": "The name of a setup file used by Jest. (use Jest config file https://jestjs.io/docs/en/configuration#setupfilesafterenv-array)", - "type": "string", - "x-deprecated": true - }, - "bail": { - "alias": "b", - "description": "Exit the test suite immediately after `n` number of failing tests. (https://jestjs.io/docs/cli#--bail)", - "oneOf": [{ "type": "number" }, { "type": "boolean" }] - }, - "ci": { - "description": "Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (https://jestjs.io/docs/cli#--ci)", - "type": "boolean" - }, - "color": { - "alias": "colors", - "description": "Forces test results output color highlighting (even if `stdout` is not a TTY). Set to false if you would like to have no colors. (https://jestjs.io/docs/cli#--colors)", - "type": "boolean" - }, - "findRelatedTests": { - "description": "Find and run the tests that cover a comma separated list of source files that were passed in as arguments. (https://jestjs.io/docs/cli#--findrelatedtests-spaceseparatedlistofsourcefiles)", - "type": "string" - }, - "json": { - "description": "Prints the test results in `JSON`. This mode will send all other test output and user messages to `stderr`. (https://jestjs.io/docs/cli#--json)", - "type": "boolean" - }, - "maxWorkers": { - "alias": "w", - "description": "Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (https://jestjs.io/docs/cli#--maxworkersnumstring)", - "oneOf": [{ "type": "number" }, { "type": "string" }] - }, - "onlyChanged": { - "alias": "o", - "description": "Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a `git` or `hg` repository at the moment. (https://jestjs.io/docs/cli#--onlychanged)", - "type": "boolean" - }, - "changedSince": { - "description": "Runs tests related to the changes since the provided branch or commit hash. If the current branch has diverged from the given branch, then only changes made locally will be tested. (https://jestjs.io/docs/cli#--changedsince)", - "type": "string" - }, - "outputFile": { - "description": "Write test results to a file when the `--json` option is also specified. (https://jestjs.io/docs/cli#--outputfilefilename)", - "type": "string" - }, - "passWithNoTests": { - "description": "Will not fail if no tests are found (for example while using `--testPathPattern`.) (https://jestjs.io/docs/cli#--passwithnotests)", - "type": "boolean" - }, - "runInBand": { - "alias": "i", - "description": "Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (https://jestjs.io/docs/cli#--runinband)", - "type": "boolean" - }, - "showConfig": { - "description": "Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)", - "type": "boolean" - }, - "silent": { - "description": "Prevent tests from printing messages through the console. (https://jestjs.io/docs/cli#--silent)", - "type": "boolean" - }, - "testNamePattern": { - "alias": "t", - "description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)", - "type": "string" - }, - "testPathIgnorePatterns": { - "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)", - "type": "array", - "items": { "type": "string" } - }, - "testPathPattern": { - "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/cli#--testpathpatternregex)", - "type": "array", - "items": { "type": "string" }, - "default": [] - }, - "colors": { - "description": "Forces test results output highlighting even if stdout is not a TTY. (https://jestjs.io/docs/cli#--colors)", - "type": "boolean" - }, - "reporters": { - "description": "Run tests with specified reporters. Reporter options are not available via CLI. Example with multiple reporters: `jest --reporters=\"default\" --reporters=\"jest-junit\"`. (https://jestjs.io/docs/cli#--reporters)", - "type": "array", - "items": { "type": "string" } - }, - "verbose": { - "description": "Display individual test results with the test suite hierarchy. (https://jestjs.io/docs/cli#--verbose)", - "type": "boolean" - }, - "coverageReporters": { - "description": "A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter.", - "type": "array", - "items": { "type": "string" } - }, - "coverageDirectory": { - "description": "The directory where Jest should output its coverage files.", - "type": "string", - "x-completion-type": "directory" - }, - "testResultsProcessor": { - "description": "Node module that implements a custom results processor. (https://jestjs.io/docs/en/configuration#testresultsprocessor-string)", - "type": "string" - }, - "updateSnapshot": { - "alias": "u", - "description": "Use this flag to re-record snapshots. Can be used together with a test suite pattern or with `--testNamePattern` to re-record snapshot for test matching the pattern. (https://jestjs.io/docs/cli#--updatesnapshot)", - "type": "boolean" - }, - "useStderr": { - "description": "Divert all output to stderr.", - "type": "boolean" - }, - "watch": { - "description": "Watch files for changes and rerun tests related to changed files. If you want to re-run all tests when a file has changed, use the `--watchAll` option. (https://jestjs.io/docs/cli#--watch)", - "type": "boolean" - }, - "watchAll": { - "description": "Watch files for changes and rerun all tests when something changes. If you want to re-run only the tests that depend on the changed files, use the `--watch` option. (https://jestjs.io/docs/cli#--watchall)", - "type": "boolean" - }, - "testLocationInResults": { - "description": "Adds a location field to test results. Used to report location of a test in a reporter. { \"column\": 4, \"line\": 5 } (https://jestjs.io/docs/cli#--testlocationinresults)", - "type": "boolean" - }, - "testTimeout": { - "description": "Default timeout of a test in milliseconds. Default value: `5000`. (https://jestjs.io/docs/cli#--testtimeoutnumber)", - "type": "number" - } - }, - "required": ["jestConfig"], - "examplesFile": "Jest can be configured in many ways, but primarily you'll need to at least have the jestConfig options\n\n```json\n\"test\": {\n \"executor\": \"@nrwl/jest:jest\",\n \"options\": {\n \"jestConfig\": \"libs/my-lib/jest.config.ts\"\n }\n}\n```\n\nIt is also helpful to have `passWithNoTests: true` set so your project doesn't fail testing while tests are still being added.\n\n```json\n\"test\": {\n \"executor\": \"@nrwl/jest:jest\",\n \"options\": {\n \"jestConfig\": \"libs/my-lib/jest.config.ts\",\n \"passWithNoTests\": true\n }\n}\n```\n\n### Snapshots\n\nUpdate snapshots running with `--update-snapshot` or `-u` for short.\n\n```bash\nnx test my-project -u\n```\n\nOther times you might not want to allow updating snapshots such as in CI.\nAdding a _ci_ configuration is helpful for adding this behavior.\n\n```json\n\"test\": {\n \"executor\": \"@nrwl/jest:jest\",\n \"options\": {\n \"jestConfig\": \"libs/my-lib/jest.config.ts\",\n \"passWithNoTests\": true\n },\n \"configurations\": {\n \"ci\": {\n \"ci\": true\n }\n }\n}\n```\n\n```bash\nnx affected --target=test --configuration=ci\n```\n\nLearn more [about _affected_](/concepts/affected)\n" - }, - "description": "Run Jest unit tests.", - "aliases": [], - "hidden": false, - "path": "/packages/jest/src/executors/jest/schema.json" - } - ] -} diff --git a/docs/generated/packages/jest/documents/overview.md b/docs/generated/packages/jest/documents/overview.md new file mode 100644 index 0000000000000..e4f831487454b --- /dev/null +++ b/docs/generated/packages/jest/documents/overview.md @@ -0,0 +1,147 @@ +[Jest](https://jestjs.io/) is an open source test runner created by Facebook. It has a lot of great features: + +- Immersive watch mode for providing near instant feedback when developing tests. +- Snapshot testing for validating features. +- Great built-in reporter for printing out test results. + +## Setting up Jest + +By default, Nx will use Jest when creating applications and libraries. + +```shell +nx g @nrwl/web:app frontend +``` + +### Adding Jest to an Existing Project + +Add Jest to a project using the `jest-project` generator from `@nrwl/jest`. + +First, install `@nrwl/jest`, if not already installed using your preferred package manager. + +```shell +npm install --save-dev @nrwl/jest +``` + +```shell +yarn add --dev @nrwl/jest +``` + +Once installed, run the `jest-project` generator + +```shell +nx g @nrwl/jest:jest-project --project= +``` + +> Hint: You can use the `--dry-run` flag to see what will be generated. + +Replacing `` with the name of the project you're wanting to add Jest too. + +## Using Jest + +### Testing Applications + +The recommended way to run/debug Jest tests via an editor + +- [VSCode](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) +- [Webstorm](https://blog.jetbrains.com/webstorm/2018/10/testing-with-jest-in-webstorm/) + +To run Jest tests via nx use + +```shell +nx test frontend +``` + +### Watching for Changes + +Using the `--watch` flag will run the tests whenever a file changes. + +```shell +nx test frontend --watch +``` + +### Snapshot Testing + +Jest has support for **Snapshot Testing**, a tool which simplifies validating data. Check out the [official Jest Documentation on Snapshot Testing](https://jestjs.io/docs/en/snapshot-testing). + +Example of using snapshots: + +```typescript +describe('SuperAwesomFunction', () => { + it('should return the correct data shape', () => { + const actual = superAwesomFunction(); + expect(actual).toMatchSnapshot(); + }); +}); +``` + +When using snapshots, you can update them with the `--updateSnapshot` flag, `-u` for short. + +> By default, snapshots will be generated when there are not existing snapshots for the associated test. + +```shell +nx test frontend -u +``` + +Snapshot files should be checked in with your code. + +### Performance in CI + +Typically, in CI it's recommended to use `nx affected --target=test --parallel=[# CPUs] -- --runInBand` for the best performance. + +This is because each [jest process creates a workers based on system resources](https://jestjs.io/docs/cli#--maxworkersnumstring), running multiple projects via nx and using jest workers will create too many process overall causing the system to run slower than desired. Using the `--runInBand` flag tells jest to run in a single process. + +## Configurations + +### Jest + +Primary configurations for Jest will be via the `jest.config.js` file that generated for your project. This file will extend the root `jest.config.js` file. Learn more about [Jest configurations](https://jestjs.io/docs/configuration#options). + +### Nx + +Nx Jest Plugin options can be configured via the [project config file](/reference/project-configuration) or via the [command line flags](/packages/jest). + +> Hint: Use `--help` to see all available options +> +> ```shell +> nx test --help +> ``` + +### Code Coverage + +Enable code coverage with the `--coverage` flag or by adding it to the executor options in the [project configuration file](/reference/project-configuration). + +By default, coverage reports will be generated in the `coverage/` directory under projects name. i.e. `coverage/apps/frontend`. Modify this directory with the `--coverageDirectory` flag. Coverage reporters can also be customized with the `--coverageReporters` flag. + +> `coverageDirectory` and `coverageReporters` are configurable via the project configuration file as well. + +### Global setup/teardown with nx libraries + +In order to use Jest's global setup/teardown functions that reference nx libraries, you'll need to register the TS path for jest to resolve the libraries. +Nx provides a helper function that you can import within your setup/teardown file. + +```typescript +import { registerTsProject } from 'nx/src/utils/register'; +const cleanupRegisteredPaths = registerTsProject('.', 'tsconfig.base.json'); + +import { yourFancyFunction } from '@some-org/my-util-library'; +export default async function () { + yourFancyFunction(); +} +// make sure to run the clean up! +cleanupRegisteredPaths(); +``` + +## Debugging Failing Tests + +If your code editor doesn't provide a way to debug your tests, you can leverage the Chrome DevTools to debug your tests with the `--inspect-brk` flag for node. + +```shell +node --inspect-brk ./node_modules/@nrwl/cli/bin/nx test +``` + +Enter [chrome://inspect](chrome://inspect) in Chrome address bar and inspect the target to attach to the node process. Visit the official [Jest documentation](https://jestjs.io/docs/en/troubleshooting#tests-are-failing-and-you-don-t-know-why) to find out more. + +## More Documentation + +- [Jest Docs](https://jestjs.io/) +- [@nrwl/jest options](/packages/jest) diff --git a/docs/generated/packages/jest/executors/jest.json b/docs/generated/packages/jest/executors/jest.json new file mode 100644 index 0000000000000..94729d86d1e85 --- /dev/null +++ b/docs/generated/packages/jest/executors/jest.json @@ -0,0 +1,200 @@ +{ + "name": "jest", + "implementation": "/packages/jest/src/executors/jest/jest.impl.ts", + "batchImplementation": "./src/executors/jest/jest.impl#batchJest", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Jest Builder", + "description": "Jest target options for Build Facade.", + "cli": "nx", + "type": "object", + "presets": [ + { + "name": "Pass Without Tests", + "keys": ["jestConfig", "passWithNoTests"] + }, + { "name": "Code Coverage", "keys": ["jestConfig", "coverageReporters"] }, + { "name": "Stop After 'n' Failed", "keys": ["jestConfig", "bail"] } + ], + "properties": { + "codeCoverage": { + "description": "Indicates that test coverage information should be collected and reported in the output. (https://jestjs.io/docs/cli#--coverageboolean)", + "type": "boolean", + "aliases": ["coverage"] + }, + "config": { + "description": "The path to a Jest config file specifying how to find and execute tests. If no `rootDir` is set in the config, the directory containing the config file is assumed to be the `rootDir` for the project. This can also be a JSON-encoded value which Jest will use as configuration.", + "type": "string" + }, + "clearCache": { + "description": "Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory. _Note: clearing the cache will reduce performance_.", + "type": "boolean" + }, + "detectOpenHandles": { + "description": "Attempt to collect and print open handles preventing Jest from exiting cleanly (https://jestjs.io/docs/cli#--detectopenhandles)", + "type": "boolean" + }, + "logHeapUsage": { + "description": "Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.", + "type": "boolean" + }, + "detectLeaks": { + "description": "**EXPERIMENTAL**: Detect memory leaks in tests. After executing a test, it will try to garbage collect the global object used, and fail if it was leaked", + "type": "boolean" + }, + "jestConfig": { + "description": "The path of the Jest configuration. (https://jestjs.io/docs/en/configuration)", + "type": "string", + "x-completion-type": "file", + "x-completion-glob": "jest.config@(.js|.ts)" + }, + "testFile": { + "description": "The name of the file to test.", + "type": "string" + }, + "tsConfig": { + "description": "The name of the Typescript configuration file. Set the tsconfig option in the jest config file. ", + "type": "string", + "x-deprecated": true + }, + "setupFile": { + "description": "The name of a setup file used by Jest. (use Jest config file https://jestjs.io/docs/en/configuration#setupfilesafterenv-array)", + "type": "string", + "x-deprecated": true + }, + "bail": { + "alias": "b", + "description": "Exit the test suite immediately after `n` number of failing tests. (https://jestjs.io/docs/cli#--bail)", + "oneOf": [{ "type": "number" }, { "type": "boolean" }] + }, + "ci": { + "description": "Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (https://jestjs.io/docs/cli#--ci)", + "type": "boolean" + }, + "color": { + "alias": "colors", + "description": "Forces test results output color highlighting (even if `stdout` is not a TTY). Set to false if you would like to have no colors. (https://jestjs.io/docs/cli#--colors)", + "type": "boolean" + }, + "findRelatedTests": { + "description": "Find and run the tests that cover a comma separated list of source files that were passed in as arguments. (https://jestjs.io/docs/cli#--findrelatedtests-spaceseparatedlistofsourcefiles)", + "type": "string" + }, + "json": { + "description": "Prints the test results in `JSON`. This mode will send all other test output and user messages to `stderr`. (https://jestjs.io/docs/cli#--json)", + "type": "boolean" + }, + "maxWorkers": { + "alias": "w", + "description": "Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (https://jestjs.io/docs/cli#--maxworkersnumstring)", + "oneOf": [{ "type": "number" }, { "type": "string" }] + }, + "onlyChanged": { + "alias": "o", + "description": "Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a `git` or `hg` repository at the moment. (https://jestjs.io/docs/cli#--onlychanged)", + "type": "boolean" + }, + "changedSince": { + "description": "Runs tests related to the changes since the provided branch or commit hash. If the current branch has diverged from the given branch, then only changes made locally will be tested. (https://jestjs.io/docs/cli#--changedsince)", + "type": "string" + }, + "outputFile": { + "description": "Write test results to a file when the `--json` option is also specified. (https://jestjs.io/docs/cli#--outputfilefilename)", + "type": "string" + }, + "passWithNoTests": { + "description": "Will not fail if no tests are found (for example while using `--testPathPattern`.) (https://jestjs.io/docs/cli#--passwithnotests)", + "type": "boolean" + }, + "runInBand": { + "alias": "i", + "description": "Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (https://jestjs.io/docs/cli#--runinband)", + "type": "boolean" + }, + "showConfig": { + "description": "Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)", + "type": "boolean" + }, + "silent": { + "description": "Prevent tests from printing messages through the console. (https://jestjs.io/docs/cli#--silent)", + "type": "boolean" + }, + "testNamePattern": { + "alias": "t", + "description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)", + "type": "string" + }, + "testPathIgnorePatterns": { + "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)", + "type": "array", + "items": { "type": "string" } + }, + "testPathPattern": { + "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/cli#--testpathpatternregex)", + "type": "array", + "items": { "type": "string" }, + "default": [] + }, + "colors": { + "description": "Forces test results output highlighting even if stdout is not a TTY. (https://jestjs.io/docs/cli#--colors)", + "type": "boolean" + }, + "reporters": { + "description": "Run tests with specified reporters. Reporter options are not available via CLI. Example with multiple reporters: `jest --reporters=\"default\" --reporters=\"jest-junit\"`. (https://jestjs.io/docs/cli#--reporters)", + "type": "array", + "items": { "type": "string" } + }, + "verbose": { + "description": "Display individual test results with the test suite hierarchy. (https://jestjs.io/docs/cli#--verbose)", + "type": "boolean" + }, + "coverageReporters": { + "description": "A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter.", + "type": "array", + "items": { "type": "string" } + }, + "coverageDirectory": { + "description": "The directory where Jest should output its coverage files.", + "type": "string", + "x-completion-type": "directory" + }, + "testResultsProcessor": { + "description": "Node module that implements a custom results processor. (https://jestjs.io/docs/en/configuration#testresultsprocessor-string)", + "type": "string" + }, + "updateSnapshot": { + "alias": "u", + "description": "Use this flag to re-record snapshots. Can be used together with a test suite pattern or with `--testNamePattern` to re-record snapshot for test matching the pattern. (https://jestjs.io/docs/cli#--updatesnapshot)", + "type": "boolean" + }, + "useStderr": { + "description": "Divert all output to stderr.", + "type": "boolean" + }, + "watch": { + "description": "Watch files for changes and rerun tests related to changed files. If you want to re-run all tests when a file has changed, use the `--watchAll` option. (https://jestjs.io/docs/cli#--watch)", + "type": "boolean" + }, + "watchAll": { + "description": "Watch files for changes and rerun all tests when something changes. If you want to re-run only the tests that depend on the changed files, use the `--watch` option. (https://jestjs.io/docs/cli#--watchall)", + "type": "boolean" + }, + "testLocationInResults": { + "description": "Adds a location field to test results. Used to report location of a test in a reporter. { \"column\": 4, \"line\": 5 } (https://jestjs.io/docs/cli#--testlocationinresults)", + "type": "boolean" + }, + "testTimeout": { + "description": "Default timeout of a test in milliseconds. Default value: `5000`. (https://jestjs.io/docs/cli#--testtimeoutnumber)", + "type": "number" + } + }, + "required": ["jestConfig"], + "examplesFile": "Jest can be configured in many ways, but primarily you'll need to at least have the jestConfig options\n\n```json\n\"test\": {\n \"executor\": \"@nrwl/jest:jest\",\n \"options\": {\n \"jestConfig\": \"libs/my-lib/jest.config.ts\"\n }\n}\n```\n\nIt is also helpful to have `passWithNoTests: true` set so your project doesn't fail testing while tests are still being added.\n\n```json\n\"test\": {\n \"executor\": \"@nrwl/jest:jest\",\n \"options\": {\n \"jestConfig\": \"libs/my-lib/jest.config.ts\",\n \"passWithNoTests\": true\n }\n}\n```\n\n### Snapshots\n\nUpdate snapshots running with `--update-snapshot` or `-u` for short.\n\n```bash\nnx test my-project -u\n```\n\nOther times you might not want to allow updating snapshots such as in CI.\nAdding a _ci_ configuration is helpful for adding this behavior.\n\n```json\n\"test\": {\n \"executor\": \"@nrwl/jest:jest\",\n \"options\": {\n \"jestConfig\": \"libs/my-lib/jest.config.ts\",\n \"passWithNoTests\": true\n },\n \"configurations\": {\n \"ci\": {\n \"ci\": true\n }\n }\n}\n```\n\n```bash\nnx affected --target=test --configuration=ci\n```\n\nLearn more [about _affected_](/concepts/affected)\n" + }, + "description": "Run Jest unit tests.", + "aliases": [], + "hidden": false, + "path": "/packages/jest/src/executors/jest/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/jest/generators/init.json b/docs/generated/packages/jest/generators/init.json new file mode 100644 index 0000000000000..896ffb5a43739 --- /dev/null +++ b/docs/generated/packages/jest/generators/init.json @@ -0,0 +1,44 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#jestInitGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxJestInit", + "cli": "nx", + "title": "Jest init", + "description": "Add Jest Configuration to a workspace.", + "type": "object", + "properties": { + "babelJest": { + "type": "boolean", + "alias": "babel-jest", + "description": "Use `babel-jest` instead of `ts-jest`.", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "js": { + "type": "boolean", + "default": false, + "description": "Use JavaScript instead of TypeScript for config files" + }, + "rootProject": { + "description": "initialize Jest for an application at the root of the workspace", + "type": "boolean", + "default": false, + "hidden": true + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/jest` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/jest/src/generators/init/init#jestInitGenerator.ts", + "path": "/packages/jest/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/jest/generators/jest-project.json b/docs/generated/packages/jest/generators/jest-project.json new file mode 100644 index 0000000000000..107ddc2f093b9 --- /dev/null +++ b/docs/generated/packages/jest/generators/jest-project.json @@ -0,0 +1,89 @@ +{ + "name": "jest-project", + "factory": "./src/generators/jest-project/jest-project#jestProjectGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxJestProject", + "cli": "nx", + "title": "Add Jest Configuration to a project", + "description": "Add Jest Configuration to a project.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "$default": { "$source": "projectName" } + }, + "skipSetupFile": { + "type": "boolean", + "description": "[Deprecated]: Skips the setup file required for angular. (Use `--setup-file`)", + "default": false, + "x-deprecated": true + }, + "setupFile": { + "type": "string", + "enum": ["none", "angular", "web-components"], + "description": "The setup file to be generated.", + "default": "none" + }, + "skipSerializers": { + "type": "boolean", + "description": "Skips the serializers required to snapshot angular templates.", + "default": false + }, + "supportTsx": { + "type": "boolean", + "description": "Setup `tsx` support.", + "default": false + }, + "testEnvironment": { + "type": "string", + "enum": ["jsdom", "node"], + "description": "The test environment for jest.", + "default": "jsdom" + }, + "compiler": { + "type": "string", + "enum": ["tsc", "babel", "swc"], + "description": "The compiler to use for source and tests.", + "default": "tsc" + }, + "babelJest": { + "type": "boolean", + "alias": "babel-jest", + "description": "Use `babel-jest` instead of `ts-jest` (Deprecated: Use `--compiler=babel` instead).", + "x-deprecated": true, + "default": false + }, + "skipFormat": { + "description": "Skip formatting files", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "js": { + "type": "boolean", + "default": false, + "description": "Use JavaScript instead of TypeScript for config files" + }, + "rootProject": { + "description": "Add Jest to an application at the root of the workspace", + "type": "boolean", + "default": false, + "hidden": true + } + }, + "required": [], + "presets": [] + }, + "description": "Add Jest configuration to a project.", + "hidden": true, + "implementation": "/packages/jest/src/generators/jest-project/jest-project#jestProjectGenerator.ts", + "aliases": [], + "path": "/packages/jest/src/generators/jest-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/js.json b/docs/generated/packages/js.json deleted file mode 100644 index ed9d8d250426f..0000000000000 --- a/docs/generated/packages/js.json +++ /dev/null @@ -1,617 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "js", - "packageName": "@nrwl/js", - "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ", - "root": "/packages/js", - "source": "/packages/js/src", - "documentation": [ - { - "name": "Overview", - "id": "overview", - "path": "/packages/js", - "file": "shared/js-plugin", - "content": "The JS plugin contains executors and generators that are useful for JavaScript/TypeScript projects in an Nx workspace.\n\n## Setting Up JS\n\n### Installation\n\nIn any Nx workspace, you can install `@nrwl/js` by running the following commands if `@nrwl/js` package is not installed:\n\n{% tabs %}\n{%tab label=\"npm\"%}\n\n```shell\nnpm i --save-dev @nrwl/js\n```\n\n{% /tab %}\n{%tab label=\"yarn\"%}\n\n```shell\nyarn add --dev @nrwl/js\n```\n\n{% /tab %}\n{% /tabs %}\n\n### `ts` Preset\n\nWhen initializing a new Nx workspace, specifying `--preset=ts` will generate a workspace with `@nrwl/js` pre-installed.\n\n{% tabs %}\n{%tab label=\"npm\"%}\n\n```shell\nnpx create-nx-workspace my-org --preset=ts\n```\n\n{% /tab %}\n{%tab label=\"yarn\"%}\n\n```shell\nyarn create nx-workspace my-org --preset=ts\n```\n\n{% /tab %}\n{% /tabs %}\n\n## Create Libraries\n\nYou can add a new JS/TS library with the following command:\n\n```shell\nnx g @nrwl/js:lib my-lib\n```\n\n## Build\n\nYou can `build` libraries that are generated with `--buildable` flag.\n\n```shell\nnx g @nrwl/js:lib my-buildable-lib --buildable\n```\n\nGenerating a library with `--buildable` will add a `build` target to the library's `project.json` file allows the library to be built.\n\n```shell\nnx build my-buildable-lib\n```\n\n## Test\n\nYou can test a library with the following command:\n\n```shell\nnx test my-lib\n```\n\n## Lint\n\nYou can lint a library with the following command:\n\n```shell\nnx lint my-lib\n```\n\n## Compiler\n\nBy default, `@nrwl/js` uses [TypeScript Compiler (TSC)](https://www.typescriptlang.org/docs/handbook/2/basic-types.html#tsc-the-typescript-compiler), via `@nrwl/js:tsc` executor, to compile your libraries. Optionally, you can switch `tsc` out for a different compiler with `--compiler` flag when executing the generators.\n\nCurrently, `@nrwl/js` supports the following compilers:\n\n- [Speedy Web Compiler (SWC)](https://swc.rs)\n\n### SWC\n\n- Create a buildable library with `swc`\n\n```shell\nnx g @nrwl/js:lib my-swc-lib --compiler=swc --buildable\n```\n\n- Convert a `tsc` library to use `swc`\n\n```shell\nnx g @nrwl/js:convert-to-swc my-buildable-lib\n```\n\nNow the `build` command will use `@nrwl/js:swc` executor to compile your libraries.\n\n> The first time you generate a `swc` library or convert a `tsc` library over to `swc`, `@nrwl/js` will install the necessary dependencies to use `swc`.\n" - } - ], - "generators": [ - { - "name": "library", - "factory": "./src/generators/library/library#libraryGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxTypescriptLibrary", - "cli": "nx", - "title": "Create a TypeScript Library", - "description": "Create a TypeScript Library.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Library name.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "type": "string", - "description": "A directory where the lib is placed." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "vitest", "none"], - "description": "Test runner to use for unit tests.", - "x-prompt": "Which unit test runner would you like to use?" - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting)." - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "type": "boolean", - "description": "Do not update tsconfig.json for development experience.", - "default": false - }, - "includeBabelRc": { - "type": "boolean", - "description": "Include a .babelrc configuration to compile TypeScript files" - }, - "testEnvironment": { - "type": "string", - "enum": ["jsdom", "node"], - "description": "The test environment to use if unitTestRunner is set to jest.", - "default": "jsdom" - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like @myorg/my-awesome-lib." - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case file names.", - "alias": "P", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Whether to enable tsconfig strict mode or not.", - "default": true - }, - "publishable": { - "type": "boolean", - "default": false, - "description": "Generate a publishable library." - }, - "buildable": { - "type": "boolean", - "default": true, - "description": "Generate a buildable library." - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "config": { - "type": "string", - "enum": ["workspace", "project", "npm-scripts"], - "default": "project", - "description": "Determines whether the project's executors should be configured in `workspace.json`, `project.json` or as npm scripts." - }, - "compiler": { - "type": "string", - "enum": ["tsc", "swc"], - "default": "tsc", - "description": "The compiler used by the build and test targets" - }, - "bundler": { - "description": "The bundler to use.", - "type": "string", - "enum": ["none", "esbuild", "rollup", "vite", "webpack"], - "default": "none" - }, - "skipTypeCheck": { - "type": "boolean", - "description": "Whether to skip TypeScript type checking for SWC compiler.", - "default": false - } - }, - "required": ["name"], - "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Using directory flag\" %}\n\nGenerate a library named `mylib` and put it under a directory named `myapp` (`libs/myapp/mylib`)\n\n```shell\nnpx nx g lib mylib --directory=myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Use SWC compiler\" %}\n\nGenerate a library using [SWC](https://swc.rs) as the compiler\n\n```shell\nnpx nx g lib mylib --compiler=swc\n```\n\n{% /tab %}\n\n{% tab label=\"Minimal publishing target\" %}\n\nGenerate a **publishable** library with a minimal publishing target\n\n```shell\nnpx nx g lib mylib --publishable\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Create a library", - "implementation": "/packages/js/src/generators/library/library#libraryGenerator.ts", - "hidden": false, - "path": "/packages/js/src/generators/library/schema.json" - }, - { - "name": "init", - "factory": "./src/generators/init/init#initGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxTypescriptInit", - "cli": "nx", - "title": "Init nrwl/js", - "description": "Init generator placeholder for nrwl/js.", - "presets": [] - }, - "aliases": ["lib"], - "x-type": "init", - "description": "Init placeholder.", - "hidden": true, - "implementation": "/packages/js/src/generators/init/init#initGenerator.ts", - "path": "/packages/js/src/generators/init/schema.json" - }, - { - "name": "convert-to-swc", - "factory": "./src/generators/convert-to-swc/convert-to-swc#convertToSwcGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxTypescriptLibrary", - "cli": "nx", - "title": "Convert a TSC library to SWC", - "description": "Convert a TSC library to SWC.", - "type": "object", - "examples": [ - { - "command": "nx g swc mylib", - "description": "Convert `libs/myapp/mylib` to SWC." - } - ], - "properties": { - "project": { - "type": "string", - "description": "Library name.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?", - "pattern": "^[a-zA-Z].*$" - }, - "targets": { - "type": "array", - "description": "List of targets to convert.", - "items": { "type": "string", "description": "Target to convert." }, - "default": ["build"] - } - }, - "required": ["project"], - "presets": [] - }, - "aliases": ["swc"], - "x-type": "library", - "description": "Convert a TypeScript library to compile with SWC.", - "implementation": "/packages/js/src/generators/convert-to-swc/convert-to-swc#convertToSwcGenerator.ts", - "hidden": false, - "path": "/packages/js/src/generators/convert-to-swc/schema.json" - } - ], - "executors": [ - { - "name": "tsc", - "implementation": "/packages/js/src/executors/tsc/tsc.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Typescript Build Target", - "description": "Builds using TypeScript.", - "cli": "nx", - "type": "object", - "properties": { - "main": { - "type": "string", - "description": "The name of the main entry-point file.", - "x-completion-type": "file", - "x-completion-glob": "main@(.js|.ts|.jsx|.tsx)" - }, - "rootDir": { - "type": "string", - "description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the root of project." - }, - "outputPath": { - "type": "string", - "description": "The output path of the generated files.", - "x-completion-type": "directory" - }, - "tsConfig": { - "type": "string", - "description": "The path to the Typescript configuration file.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "assets": { - "type": "array", - "description": "List of static assets.", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply 'glob'. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "watch": { - "type": "boolean", - "description": "Enable re-building when files change.", - "default": false - }, - "clean": { - "type": "boolean", - "description": "Remove previous output before build.", - "default": true - }, - "transformers": { - "type": "array", - "description": "List of TypeScript Transformer Plugins.", - "default": [], - "items": { - "oneOf": [ - { "type": "string" }, - { - "type": "object", - "properties": { - "name": { "type": "string" }, - "options": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": ["name"] - } - ] - } - }, - "updateBuildableProjectDepsInPackageJson": { - "type": "boolean", - "description": "Whether to update the buildable project dependencies in `package.json`.", - "default": true - }, - "buildableProjectDepsInPackageJsonType": { - "type": "string", - "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", - "enum": ["dependencies", "peerDependencies"], - "default": "peerDependencies" - }, - "external": { - "description": "A list projects to be treated as external. This feature is experimental", - "oneOf": [ - { "type": "string", "enum": ["all", "none"] }, - { "type": "array", "items": { "type": "string" } } - ] - }, - "externalBuildTargets": { - "type": "array", - "items": { "type": "string" }, - "description": "List of target names that annotate a build target for a project", - "default": ["build"] - } - }, - "required": ["main", "outputPath", "tsConfig"], - "definitions": { - "assetPattern": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply 'glob'. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - }, - "transformerPattern": { - "oneOf": [ - { "type": "string" }, - { - "type": "object", - "properties": { - "name": { "type": "string" }, - "options": { "type": "object", "additionalProperties": true } - }, - "additionalProperties": false, - "required": ["name"] - } - ] - } - }, - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Using TypeScript Transformer Plugins\" %}\n\n`@nrwl/js:tsc` can run the [TypeScript Transformers](https://github.com/madou/typescript-transformer-handbook) by using the `transformers` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"transformers\": [\n \"@nestjs/swagger/plugin\",\n {\n \"name\": \"@automapper/classes/transformer-plugin\",\n \"options\": {}\n }\n ]\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Inline libraries\" %}\n\n`@nrwl/js:tsc` can inline non-buildable libraries by opt-in to **Inlining** mode with `external` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"all\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=all\n```\n\n`@nrwl/js:tsc` can also inline buildable libraries by setting `external: 'none'`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"none\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=none\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "description": "Build a project using TypeScript.", - "aliases": [], - "hidden": false, - "path": "/packages/js/src/executors/tsc/schema.json" - }, - { - "name": "swc", - "implementation": "/packages/js/src/executors/swc/swc.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "title": "Typescript Build Target", - "description": "Builds using SWC.", - "type": "object", - "properties": { - "main": { - "type": "string", - "description": "The name of the main entry-point file.", - "x-completion-type": "file", - "x-completion-glob": "main@(.js|.ts|.tsx)" - }, - "outputPath": { - "type": "string", - "description": "The output path of the generated files.", - "x-completion-type": "directory" - }, - "tsConfig": { - "type": "string", - "description": "The path to the Typescript configuration file.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "swcrc": { - "type": "string", - "description": "The path to the SWC configuration file. Default: .lib.swcrc", - "x-completion-type": "file", - "x-completion-glob": ".swcrc" - }, - "assets": { - "type": "array", - "description": "List of static assets.", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply 'glob'. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "watch": { - "type": "boolean", - "description": "Enable re-building when files change.", - "default": false - }, - "clean": { - "type": "boolean", - "description": "Remove previous output before build.", - "default": true - }, - "skipTypeCheck": { - "type": "boolean", - "description": "Whether to skip TypeScript type checking.", - "default": false - }, - "swcExclude": { - "type": "array", - "description": "List of SWC Glob/Regex to be excluded from compilation (https://swc.rs/docs/configuration/compilation#exclude).", - "default": [ - "./src/**/.*.spec.ts$", - "./**/.*.spec.ts$", - "./src/**/jest-setup.ts$", - "./**/jest-setup.ts$", - "./**/.*.js$" - ] - }, - "updateBuildableProjectDepsInPackageJson": { - "type": "boolean", - "description": "Whether to update the buildable project dependencies in `package.json`.", - "default": true - }, - "buildableProjectDepsInPackageJsonType": { - "type": "string", - "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", - "enum": ["dependencies", "peerDependencies"], - "default": "peerDependencies" - }, - "external": { - "description": "A list projects to be treated as external. This feature is experimental", - "oneOf": [ - { "type": "string", "enum": ["all", "none"] }, - { "type": "array", "items": { "type": "string" } } - ] - }, - "externalBuildTargets": { - "type": "array", - "items": { "type": "string" }, - "description": "List of target names that annotate a build target for a project", - "default": ["build"] - } - }, - "required": ["main", "outputPath", "tsConfig"], - "definitions": { - "assetPattern": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply 'glob'. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Inline libraries\" %}\n\n`@nrwl/js:swc` can inline non-buildable libraries by opt-in to **Inlining** mode with `external` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:swc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"all\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=all\n```\n\n`@nrwl/js:swc` can also inline buildable libraries by setting `external: 'none'`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:swc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"none\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=none\n```\n\n{% /tab %}\n{% tab label=\"Custom swcrc\" %}\n\n`@nrwl/js:swc` can compile your code with a custom `.swcrc`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:swc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"swcrc\": \"libs/ts-lib/.dev.swcrc\"\n },\n \"configurations\": {\n \"production\": {\n \"swcrc\": \"libs/ts-lib/.prod.swcrc\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "description": "Build a project using SWC.", - "aliases": [], - "hidden": false, - "path": "/packages/js/src/executors/swc/schema.json" - }, - { - "name": "node", - "implementation": "/packages/js/src/executors/node/node.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "title": "Node executor", - "description": "Execute Nodejs applications.", - "type": "object", - "properties": { - "buildTarget": { - "type": "string", - "description": "The target to run to build you the app." - }, - "buildTargetOptions": { - "type": "object", - "description": "Additional options to pass into the build target.", - "default": {} - }, - "waitUntilTargets": { - "type": "array", - "description": "The targets to run to before starting the node app.", - "default": [], - "items": { "type": "string" } - }, - "host": { - "type": "string", - "default": "localhost", - "description": "The host to inspect the process on." - }, - "port": { - "type": "number", - "default": 9229, - "description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes." - }, - "inspect": { - "oneOf": [ - { "type": "string", "enum": ["inspect", "inspect-brk"] }, - { "type": "boolean" } - ], - "description": "Ensures the app is starting with debugging.", - "default": "inspect" - }, - "runtimeArgs": { - "type": "array", - "description": "Extra args passed to the node process.", - "default": [], - "items": { "type": "string" } - }, - "args": { - "type": "array", - "description": "Extra args when starting the app.", - "default": [], - "items": { "type": "string" } - }, - "watch": { - "type": "boolean", - "description": "Enable re-building when files change.", - "default": true - } - }, - "additionalProperties": false, - "required": ["buildTarget"], - "presets": [] - }, - "description": "Execute a Node application.", - "aliases": [], - "hidden": false, - "path": "/packages/js/src/executors/node/schema.json" - } - ] -} diff --git a/docs/generated/packages/js/documents/overview.md b/docs/generated/packages/js/documents/overview.md new file mode 100644 index 0000000000000..9fffcd63f2a6b --- /dev/null +++ b/docs/generated/packages/js/documents/overview.md @@ -0,0 +1,109 @@ +The JS plugin contains executors and generators that are useful for JavaScript/TypeScript projects in an Nx workspace. + +## Setting Up JS + +### Installation + +In any Nx workspace, you can install `@nrwl/js` by running the following commands if `@nrwl/js` package is not installed: + +{% tabs %} +{%tab label="npm"%} + +```shell +npm i --save-dev @nrwl/js +``` + +{% /tab %} +{%tab label="yarn"%} + +```shell +yarn add --dev @nrwl/js +``` + +{% /tab %} +{% /tabs %} + +### `ts` Preset + +When initializing a new Nx workspace, specifying `--preset=ts` will generate a workspace with `@nrwl/js` pre-installed. + +{% tabs %} +{%tab label="npm"%} + +```shell +npx create-nx-workspace my-org --preset=ts +``` + +{% /tab %} +{%tab label="yarn"%} + +```shell +yarn create nx-workspace my-org --preset=ts +``` + +{% /tab %} +{% /tabs %} + +## Create Libraries + +You can add a new JS/TS library with the following command: + +```shell +nx g @nrwl/js:lib my-lib +``` + +## Build + +You can `build` libraries that are generated with `--buildable` flag. + +```shell +nx g @nrwl/js:lib my-buildable-lib --buildable +``` + +Generating a library with `--buildable` will add a `build` target to the library's `project.json` file allows the library to be built. + +```shell +nx build my-buildable-lib +``` + +## Test + +You can test a library with the following command: + +```shell +nx test my-lib +``` + +## Lint + +You can lint a library with the following command: + +```shell +nx lint my-lib +``` + +## Compiler + +By default, `@nrwl/js` uses [TypeScript Compiler (TSC)](https://www.typescriptlang.org/docs/handbook/2/basic-types.html#tsc-the-typescript-compiler), via `@nrwl/js:tsc` executor, to compile your libraries. Optionally, you can switch `tsc` out for a different compiler with `--compiler` flag when executing the generators. + +Currently, `@nrwl/js` supports the following compilers: + +- [Speedy Web Compiler (SWC)](https://swc.rs) + +### SWC + +- Create a buildable library with `swc` + +```shell +nx g @nrwl/js:lib my-swc-lib --compiler=swc --buildable +``` + +- Convert a `tsc` library to use `swc` + +```shell +nx g @nrwl/js:convert-to-swc my-buildable-lib +``` + +Now the `build` command will use `@nrwl/js:swc` executor to compile your libraries. + +> The first time you generate a `swc` library or convert a `tsc` library over to `swc`, `@nrwl/js` will install the necessary dependencies to use `swc`. diff --git a/docs/generated/packages/js/executors/node.json b/docs/generated/packages/js/executors/node.json new file mode 100644 index 0000000000000..9e5faa622bee2 --- /dev/null +++ b/docs/generated/packages/js/executors/node.json @@ -0,0 +1,73 @@ +{ + "name": "node", + "implementation": "/packages/js/src/executors/node/node.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "title": "Node executor", + "description": "Execute Nodejs applications.", + "type": "object", + "properties": { + "buildTarget": { + "type": "string", + "description": "The target to run to build you the app." + }, + "buildTargetOptions": { + "type": "object", + "description": "Additional options to pass into the build target.", + "default": {} + }, + "waitUntilTargets": { + "type": "array", + "description": "The targets to run to before starting the node app.", + "default": [], + "items": { "type": "string" } + }, + "host": { + "type": "string", + "default": "localhost", + "description": "The host to inspect the process on." + }, + "port": { + "type": "number", + "default": 9229, + "description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes." + }, + "inspect": { + "oneOf": [ + { "type": "string", "enum": ["inspect", "inspect-brk"] }, + { "type": "boolean" } + ], + "description": "Ensures the app is starting with debugging.", + "default": "inspect" + }, + "runtimeArgs": { + "type": "array", + "description": "Extra args passed to the node process.", + "default": [], + "items": { "type": "string" } + }, + "args": { + "type": "array", + "description": "Extra args when starting the app.", + "default": [], + "items": { "type": "string" } + }, + "watch": { + "type": "boolean", + "description": "Enable re-building when files change.", + "default": true + } + }, + "additionalProperties": false, + "required": ["buildTarget"], + "presets": [] + }, + "description": "Execute a Node application.", + "aliases": [], + "hidden": false, + "path": "/packages/js/src/executors/node/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/js/executors/swc.json b/docs/generated/packages/js/executors/swc.json new file mode 100644 index 0000000000000..c2ddecf4221f4 --- /dev/null +++ b/docs/generated/packages/js/executors/swc.json @@ -0,0 +1,161 @@ +{ + "name": "swc", + "implementation": "/packages/js/src/executors/swc/swc.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "title": "Typescript Build Target", + "description": "Builds using SWC.", + "type": "object", + "properties": { + "main": { + "type": "string", + "description": "The name of the main entry-point file.", + "x-completion-type": "file", + "x-completion-glob": "main@(.js|.ts|.tsx)" + }, + "outputPath": { + "type": "string", + "description": "The output path of the generated files.", + "x-completion-type": "directory" + }, + "tsConfig": { + "type": "string", + "description": "The path to the Typescript configuration file.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "swcrc": { + "type": "string", + "description": "The path to the SWC configuration file. Default: .lib.swcrc", + "x-completion-type": "file", + "x-completion-glob": ".swcrc" + }, + "assets": { + "type": "array", + "description": "List of static assets.", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply 'glob'. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "watch": { + "type": "boolean", + "description": "Enable re-building when files change.", + "default": false + }, + "clean": { + "type": "boolean", + "description": "Remove previous output before build.", + "default": true + }, + "skipTypeCheck": { + "type": "boolean", + "description": "Whether to skip TypeScript type checking.", + "default": false + }, + "swcExclude": { + "type": "array", + "description": "List of SWC Glob/Regex to be excluded from compilation (https://swc.rs/docs/configuration/compilation#exclude).", + "default": [ + "./src/**/.*.spec.ts$", + "./**/.*.spec.ts$", + "./src/**/jest-setup.ts$", + "./**/jest-setup.ts$", + "./**/.*.js$" + ] + }, + "updateBuildableProjectDepsInPackageJson": { + "type": "boolean", + "description": "Whether to update the buildable project dependencies in `package.json`.", + "default": true + }, + "buildableProjectDepsInPackageJsonType": { + "type": "string", + "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", + "enum": ["dependencies", "peerDependencies"], + "default": "peerDependencies" + }, + "external": { + "description": "A list projects to be treated as external. This feature is experimental", + "oneOf": [ + { "type": "string", "enum": ["all", "none"] }, + { "type": "array", "items": { "type": "string" } } + ] + }, + "externalBuildTargets": { + "type": "array", + "items": { "type": "string" }, + "description": "List of target names that annotate a build target for a project", + "default": ["build"] + } + }, + "required": ["main", "outputPath", "tsConfig"], + "definitions": { + "assetPattern": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply 'glob'. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Inline libraries\" %}\n\n`@nrwl/js:swc` can inline non-buildable libraries by opt-in to **Inlining** mode with `external` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:swc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"all\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=all\n```\n\n`@nrwl/js:swc` can also inline buildable libraries by setting `external: 'none'`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:swc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"none\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=none\n```\n\n{% /tab %}\n{% tab label=\"Custom swcrc\" %}\n\n`@nrwl/js:swc` can compile your code with a custom `.swcrc`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:swc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"swcrc\": \"libs/ts-lib/.dev.swcrc\"\n },\n \"configurations\": {\n \"production\": {\n \"swcrc\": \"libs/ts-lib/.prod.swcrc\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "description": "Build a project using SWC.", + "aliases": [], + "hidden": false, + "path": "/packages/js/src/executors/swc/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/js/executors/tsc.json b/docs/generated/packages/js/executors/tsc.json new file mode 100644 index 0000000000000..e6de3ce35f8d2 --- /dev/null +++ b/docs/generated/packages/js/executors/tsc.json @@ -0,0 +1,175 @@ +{ + "name": "tsc", + "implementation": "/packages/js/src/executors/tsc/tsc.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Typescript Build Target", + "description": "Builds using TypeScript.", + "cli": "nx", + "type": "object", + "properties": { + "main": { + "type": "string", + "description": "The name of the main entry-point file.", + "x-completion-type": "file", + "x-completion-glob": "main@(.js|.ts|.jsx|.tsx)" + }, + "rootDir": { + "type": "string", + "description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the root of project." + }, + "outputPath": { + "type": "string", + "description": "The output path of the generated files.", + "x-completion-type": "directory" + }, + "tsConfig": { + "type": "string", + "description": "The path to the Typescript configuration file.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "assets": { + "type": "array", + "description": "List of static assets.", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply 'glob'. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "watch": { + "type": "boolean", + "description": "Enable re-building when files change.", + "default": false + }, + "clean": { + "type": "boolean", + "description": "Remove previous output before build.", + "default": true + }, + "transformers": { + "type": "array", + "description": "List of TypeScript Transformer Plugins.", + "default": [], + "items": { + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "options": { "type": "object", "additionalProperties": true } + }, + "additionalProperties": false, + "required": ["name"] + } + ] + } + }, + "updateBuildableProjectDepsInPackageJson": { + "type": "boolean", + "description": "Whether to update the buildable project dependencies in `package.json`.", + "default": true + }, + "buildableProjectDepsInPackageJsonType": { + "type": "string", + "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", + "enum": ["dependencies", "peerDependencies"], + "default": "peerDependencies" + }, + "external": { + "description": "A list projects to be treated as external. This feature is experimental", + "oneOf": [ + { "type": "string", "enum": ["all", "none"] }, + { "type": "array", "items": { "type": "string" } } + ] + }, + "externalBuildTargets": { + "type": "array", + "items": { "type": "string" }, + "description": "List of target names that annotate a build target for a project", + "default": ["build"] + } + }, + "required": ["main", "outputPath", "tsConfig"], + "definitions": { + "assetPattern": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply 'glob'. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + }, + "transformerPattern": { + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "options": { "type": "object", "additionalProperties": true } + }, + "additionalProperties": false, + "required": ["name"] + } + ] + } + }, + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Using TypeScript Transformer Plugins\" %}\n\n`@nrwl/js:tsc` can run the [TypeScript Transformers](https://github.com/madou/typescript-transformer-handbook) by using the `transformers` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"transformers\": [\n \"@nestjs/swagger/plugin\",\n {\n \"name\": \"@automapper/classes/transformer-plugin\",\n \"options\": {}\n }\n ]\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Inline libraries\" %}\n\n`@nrwl/js:tsc` can inline non-buildable libraries by opt-in to **Inlining** mode with `external` option.\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"all\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=all\n```\n\n`@nrwl/js:tsc` can also inline buildable libraries by setting `external: 'none'`\n\n```json {% fileName=\"libs/ts-lib/project.json\" %}\n{\n \"build\": {\n \"executor\": \"@nrwl/js:tsc\",\n \"options\": {\n \"outputPath\": \"dist/libs/ts-lib\",\n \"main\": \"libs/ts-lib/src/index.ts\",\n \"tsConfig\": \"libs/ts-lib/tsconfig.lib.json\",\n \"assets\": [\"libs/ts-lib/*.md\"],\n \"external\": \"none\"\n }\n }\n}\n```\n\n```shell\nnpx nx build ts-lib --external=none\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "description": "Build a project using TypeScript.", + "aliases": [], + "hidden": false, + "path": "/packages/js/src/executors/tsc/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/js/generators/convert-to-swc.json b/docs/generated/packages/js/generators/convert-to-swc.json new file mode 100644 index 0000000000000..b7054a6c01901 --- /dev/null +++ b/docs/generated/packages/js/generators/convert-to-swc.json @@ -0,0 +1,42 @@ +{ + "name": "convert-to-swc", + "factory": "./src/generators/convert-to-swc/convert-to-swc#convertToSwcGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxTypescriptLibrary", + "cli": "nx", + "title": "Convert a TSC library to SWC", + "description": "Convert a TSC library to SWC.", + "type": "object", + "examples": [ + { + "command": "nx g swc mylib", + "description": "Convert `libs/myapp/mylib` to SWC." + } + ], + "properties": { + "project": { + "type": "string", + "description": "Library name.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "^[a-zA-Z].*$" + }, + "targets": { + "type": "array", + "description": "List of targets to convert.", + "items": { "type": "string", "description": "Target to convert." }, + "default": ["build"] + } + }, + "required": ["project"], + "presets": [] + }, + "aliases": ["swc"], + "x-type": "library", + "description": "Convert a TypeScript library to compile with SWC.", + "implementation": "/packages/js/src/generators/convert-to-swc/convert-to-swc#convertToSwcGenerator.ts", + "hidden": false, + "path": "/packages/js/src/generators/convert-to-swc/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/js/generators/init.json b/docs/generated/packages/js/generators/init.json new file mode 100644 index 0000000000000..914e2da79d739 --- /dev/null +++ b/docs/generated/packages/js/generators/init.json @@ -0,0 +1,19 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#initGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxTypescriptInit", + "cli": "nx", + "title": "Init nrwl/js", + "description": "Init generator placeholder for nrwl/js.", + "presets": [] + }, + "aliases": ["lib"], + "x-type": "init", + "description": "Init placeholder.", + "hidden": true, + "implementation": "/packages/js/src/generators/init/init#initGenerator.ts", + "path": "/packages/js/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/js/generators/library.json b/docs/generated/packages/js/generators/library.json new file mode 100644 index 0000000000000..453501f12c708 --- /dev/null +++ b/docs/generated/packages/js/generators/library.json @@ -0,0 +1,129 @@ +{ + "name": "library", + "factory": "./src/generators/library/library#libraryGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxTypescriptLibrary", + "cli": "nx", + "title": "Create a TypeScript Library", + "description": "Create a TypeScript Library.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Library name.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "type": "string", + "description": "A directory where the lib is placed." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "vitest", "none"], + "description": "Test runner to use for unit tests.", + "x-prompt": "Which unit test runner would you like to use?" + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting)." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "description": "Do not update tsconfig.json for development experience.", + "default": false + }, + "includeBabelRc": { + "type": "boolean", + "description": "Include a .babelrc configuration to compile TypeScript files" + }, + "testEnvironment": { + "type": "string", + "enum": ["jsdom", "node"], + "description": "The test environment to use if unitTestRunner is set to jest.", + "default": "jsdom" + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like @myorg/my-awesome-lib." + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case file names.", + "alias": "P", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Whether to enable tsconfig strict mode or not.", + "default": true + }, + "publishable": { + "type": "boolean", + "default": false, + "description": "Generate a publishable library." + }, + "buildable": { + "type": "boolean", + "default": true, + "description": "Generate a buildable library." + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "config": { + "type": "string", + "enum": ["workspace", "project", "npm-scripts"], + "default": "project", + "description": "Determines whether the project's executors should be configured in `workspace.json`, `project.json` or as npm scripts." + }, + "compiler": { + "type": "string", + "enum": ["tsc", "swc"], + "default": "tsc", + "description": "The compiler used by the build and test targets" + }, + "bundler": { + "description": "The bundler to use.", + "type": "string", + "enum": ["none", "esbuild", "rollup", "vite", "webpack"], + "default": "none" + }, + "skipTypeCheck": { + "type": "boolean", + "description": "Whether to skip TypeScript type checking for SWC compiler.", + "default": false + } + }, + "required": ["name"], + "examplesFile": "## Examples\n\n{% tabs %}\n\n{% tab label=\"Using directory flag\" %}\n\nGenerate a library named `mylib` and put it under a directory named `myapp` (`libs/myapp/mylib`)\n\n```shell\nnpx nx g lib mylib --directory=myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Use SWC compiler\" %}\n\nGenerate a library using [SWC](https://swc.rs) as the compiler\n\n```shell\nnpx nx g lib mylib --compiler=swc\n```\n\n{% /tab %}\n\n{% tab label=\"Minimal publishing target\" %}\n\nGenerate a **publishable** library with a minimal publishing target\n\n```shell\nnpx nx g lib mylib --publishable\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Create a library", + "implementation": "/packages/js/src/generators/library/library#libraryGenerator.ts", + "hidden": false, + "path": "/packages/js/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/linter.json b/docs/generated/packages/linter.json deleted file mode 100644 index 60dc068f86296..0000000000000 --- a/docs/generated/packages/linter.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "linter", - "packageName": "@nrwl/linter", - "description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.", - "root": "/packages/linter", - "source": "/packages/linter/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/linter", - "file": "shared/linter-plugin", - "content": "The Linter plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.\n\n## Setting Up Linter\n\n### Installation\n\nIn any Nx workspace, you can install `@nrwl/linter` by running the following commands if `@nrwl/linter` package is not installed:\n\n```shell\nnpm i --save-dev @nrwl/linter\n```\n\n```shell\nyarn add --dev @nrwl/linter\n```\n\n## Lint\n\nYou can lint an application or a library with the following command:\n\n```shell\nnx lint my-app\n```\n\n```shell\nnx lint my-lib\n```\n\n## Utils\n\n- [convert-tslint-to-eslint](/packages/angular/generators/convert-tslint-to-eslint) - Converts a project linter from [TSLint](https://palantir.github.io/tslint/) to [ESLint](https://eslint.org/)\n" - }, - { - "id": "eslint-plugin-nx", - "name": "eslint-plugin-nx", - "file": "shared/eslint-plugin-nx", - "content": "A plugin containing a collection of recommended ESLint rule configurations wrapped as ESLint plugins and an Nx specific [enforce-module-boundaries](#enforce-module-boundaries) rule.\n\n## Setting Up ESLint Plugin\n\n### Installation\n\nIn any Nx workspace, you can install `@nrwl/eslint-plugin-nx` by running the following commands if the package is not already installed:\n\n{% tabs %}\n{%tab label=\"npm\"%}\n\n```shell\nnpm i --save-dev @nrwl/eslint-plugin-nx\n```\n\n{% /tab %}\n{%tab label=\"yarn\"%}\n\n```shell\nyarn add --dev @nrwl/eslint-plugin-nx\n```\n\n{% /tab %}\n{% /tabs %}\n\n## ESLint plugins\n\nThe plugin contains the following rule configurations divided into sub-plugins.\n\n### JavaScript\n\nThe `@nrwl/nx/javascript` ESLint plugin contains best practices when using JavaScript.\n\n### TypeScript\n\nThe `@nrwl/nx/typescript` ESLint plugin contains best practices when using TypeSript.\n\n### Angular\n\nContains configurations matching best practices when using Angular framework:\n\n- @nrwl/nx/angular\n- @nrwl/nx/angular-template\n\n### React\n\nContains configurations matching best practices when using React framework:\n\n- @nrwl/nx/react-base\n- @nrwl/nx/react-jsx\n- @nrwl/nx/react-typescript\n\nYou can also use `@nrwl/nx/react` which includes all three `@nrwl/nx/react-*` plugins\n\n## enforce-module-boundaries\n\nThe `@nrwl/nx/enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. By enforcing strict boundaries it helps keep prevent unplanned cross-dependencies.\n\n### Usage\n\nYou can use `enforce-module-boundaries` rule by adding it to your ESLint rules configuration:\n\n```jsonc\n{\n // ... more ESLint config here\n \"overrides\": [\n {\n \"files\": [\"*.ts\", \"*.tsx\", \"*.js\", \"*.jsx\"],\n \"rules\": {\n \"@nrwl/nx/enforce-module-boundaries\": [\n \"error\",\n {\n // ...rule specific configuration\n }\n ]\n }\n }\n // ... more ESLint overrides here\n ]\n}\n```\n\nRead more about proper usage of this rule:\n\n- [Enforce Project Boundaries](/core-features/enforce-project-boundaries)\n- [Ban Dependencies with Certain Tags](/recipes/other/ban-dependencies-with-tags)\n- [Tag in Multiple Dimensions](/recipes/other/tag-multiple-dimensions)\n- [Ban External Imports](/recipes/other/ban-external-imports)\n- [Tags Allow List](/recipes/other/tags-allow-list)\n- [Taming Code Organization with Module Boundaries in Nx](https://blog.nrwl.io/mastering-the-project-boundaries-in-nx-f095852f5bf4)\n" - } - ], - "generators": [ - { - "name": "workspace-rules-project", - "factory": "./src/generators/workspace-rules-project/workspace-rules-project#lintWorkspaceRulesProjectGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxWorkspaceRulesProject", - "cli": "nx", - "title": "Create the Workspace Lint Rules Project", - "description": "Create the Workspace Lint Rules Project.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/linter:workspace-rules-project", - "description": "Create the Workspace Lint Rules Project" - } - ], - "properties": {}, - "required": [], - "presets": [] - }, - "description": "Create the Workspace Lint Rules Project.", - "hidden": true, - "implementation": "/packages/linter/src/generators/workspace-rules-project/workspace-rules-project#lintWorkspaceRulesProjectGenerator.ts", - "aliases": [], - "path": "/packages/linter/src/generators/workspace-rules-project/schema.json" - }, - { - "name": "workspace-rule", - "factory": "./src/generators/workspace-rule/workspace-rule#lintWorkspaceRuleGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxWorkspaceRule", - "cli": "nx", - "title": "Create a new Workspace Lint Rule", - "description": "Create a new Workspace Lint Rule.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the new rule.", - "$default": { "$source": "argv", "index": 0 } - }, - "directory": { - "type": "string", - "description": "Create the rule under this directory within `tools/eslint-rules/` (can be nested).", - "alias": "dir", - "default": "rules" - } - }, - "required": ["name", "directory"], - "examplesFile": "{% tabs %}\n{% tab label=\"Create rule\" %}\n\nThis command will generate a new workspace lint rule called `my-custom-rule`. The new rule will be generated in `tools/eslint-rules/rules` folder:\n\n```shell\nnx g @nrwl/linter:workspace-rule my-custom-rule\n```\n\n{% /tab %}\n{% tab label=\"Custom sub-folder\" %}\n\nWe can change the default sub-folder from `rules` and specify a custom one:\n\n```shell\nnx g @nrwl/linter:workspace-rule --name=my-custom-rule --directory=my/custom/path\n```\n\nThe command above will generate the rule in `tools/eslint-rules/my/custom/path` folder.\n\n{% /tab %}\n{% /tabs %}\n\n---\n", - "presets": [] - }, - "description": "Create a new Workspace ESLint rule.", - "implementation": "/packages/linter/src/generators/workspace-rule/workspace-rule#lintWorkspaceRuleGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/linter/src/generators/workspace-rule/schema.json" - } - ], - "executors": [ - { - "name": "eslint", - "implementation": "/packages/linter/src/executors/eslint/lint.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "title": "ESLint Lint Target", - "description": "ESLint Lint Target.", - "cli": "nx", - "type": "object", - "properties": { - "eslintConfig": { - "type": "string", - "description": "The name of the ESLint configuration file.", - "x-completion-type": "file", - "x-completion-glob": ".eslintrc?(.json)" - }, - "lintFilePatterns": { - "type": "array", - "description": "One or more files/dirs/globs to pass directly to ESLint's `lintFiles()` method.", - "default": [], - "items": { "type": "string" } - }, - "format": { - "type": "string", - "description": "ESLint Output formatter (https://eslint.org/docs/user-guide/formatters).", - "default": "stylish", - "anyOf": [ - { - "enum": [ - "stylish", - "compact", - "codeframe", - "unix", - "visualstudio", - "table", - "checkstyle", - "html", - "jslint-xml", - "json", - "json-with-metadata", - "junit", - "tap" - ] - }, - { "minLength": 1 } - ] - }, - "force": { - "type": "boolean", - "description": "Succeeds even if there was linting errors.", - "default": false - }, - "silent": { - "type": "boolean", - "description": "Hide output text.", - "default": false - }, - "fix": { - "type": "boolean", - "description": "Fixes linting errors (may overwrite linted files).", - "default": false - }, - "cache": { - "type": "boolean", - "description": "Only check changed files.", - "default": false - }, - "cacheLocation": { - "type": "string", - "description": "Path to the cache file or directory.", - "x-completion-type": "directory", - "x-completion-glob": "tsconfig.*.json" - }, - "outputFile": { - "type": "string", - "description": "File to write report to.", - "x-completion-type": "file" - }, - "maxWarnings": { - "type": "number", - "description": "Number of warnings to trigger nonzero exit code - default: `-1`.", - "default": -1 - }, - "quiet": { - "type": "boolean", - "description": "Report errors only - default: `false`.", - "default": false - }, - "ignorePath": { - "type": "string", - "description": "The path of the `.eslintignore` file.", - "x-completion-type": "file", - "x-completion-glob": ".eslintignore" - }, - "noEslintrc": { - "type": "boolean", - "description": "The equivalent of the `--no-eslintrc` flag on the ESLint CLI, it is `false` by default.", - "default": false - }, - "hasTypeAwareRules": { - "type": "boolean", - "description": "When set to `true`, the linter will invalidate its cache when any of its dependencies changes." - }, - "cacheStrategy": { - "type": "string", - "description": "Strategy to use for detecting changed files in the cache.", - "default": "metadata", - "enum": ["metadata", "content"] - }, - "rulesdir": { - "type": "array", - "description": "The equivalent of the `--rulesdir` flag on the ESLint CLI.", - "default": [], - "items": { "type": "string", "x-completion-type": "directory" } - }, - "resolvePluginsRelativeTo": { - "type": "string", - "description": "The equivalent of the `--resolve-plugins-relative-to` flag on the ESLint CLI.", - "x-completion-type": "directory" - }, - "reportUnusedDisableDirectives": { - "type": "string", - "enum": ["off", "warn", "error"], - "description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI." - } - }, - "required": ["lintFilePatterns"], - "examplesFile": "Linter can be configured in multiple ways. The basic way is to provide only `lintFilePatterns`, which is a mandatory property. This tells us where to look for files to lint.\n\n`project.json`:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Fixing linter issues\" %}\n\nLinter provides an automated way of fixing known issues. To ensure that those changes are properly cached, we need to add an `outputs` property to the `lint` target. Omitting the `outputs` property would produce an invalid cache record. Both of these properties are set by default when scaffolding a new project.\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\nWith these settings, we can run the command with a `--fix` flag:\n\n```bash\nnx run frontend:lint --fix\n```\n\nWe can also set this flag via project configuration to always fix files when running lint:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"fix\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Custom output format\" %}\n\nESLint executor uses the `stylish` output format by default. You can change this by specifying the `format` property:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"format\": \"compact\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Silence warnings\" %}\n\nMigrated or legacy projects tend to have an overwhelming amount of lint errors. We might want to change those temporarily to be warnings so they don't block the development. But they would still clutter the report. We can run the command with `--quiet` to hide warning (errors would still break the lint):\n\n```bash\nnx run frontend:lint --quiet\n```\n\nWe can also set this via project configuration as a default option.\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"quiet\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"ESLint config file\" %}\n\n`ESLint` provides several ways of specifying the configuration. The default one is using `.eslintrc.json` but you can override it by setting the `eslintConfig` flag:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"eslintConfig\": \".eslintrc.js\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", - "presets": [] - }, - "hasher": "./src/executors/eslint/hasher", - "description": "Run ESLint on a project.", - "aliases": [], - "hidden": false, - "path": "/packages/linter/src/executors/eslint/schema.json" - } - ] -} diff --git a/docs/generated/packages/linter/documents/eslint-plugin-nx.md b/docs/generated/packages/linter/documents/eslint-plugin-nx.md new file mode 100644 index 0000000000000..f5bf1167ff267 --- /dev/null +++ b/docs/generated/packages/linter/documents/eslint-plugin-nx.md @@ -0,0 +1,90 @@ +A plugin containing a collection of recommended ESLint rule configurations wrapped as ESLint plugins and an Nx specific [enforce-module-boundaries](#enforce-module-boundaries) rule. + +## Setting Up ESLint Plugin + +### Installation + +In any Nx workspace, you can install `@nrwl/eslint-plugin-nx` by running the following commands if the package is not already installed: + +{% tabs %} +{%tab label="npm"%} + +```shell +npm i --save-dev @nrwl/eslint-plugin-nx +``` + +{% /tab %} +{%tab label="yarn"%} + +```shell +yarn add --dev @nrwl/eslint-plugin-nx +``` + +{% /tab %} +{% /tabs %} + +## ESLint plugins + +The plugin contains the following rule configurations divided into sub-plugins. + +### JavaScript + +The `@nrwl/nx/javascript` ESLint plugin contains best practices when using JavaScript. + +### TypeScript + +The `@nrwl/nx/typescript` ESLint plugin contains best practices when using TypeSript. + +### Angular + +Contains configurations matching best practices when using Angular framework: + +- @nrwl/nx/angular +- @nrwl/nx/angular-template + +### React + +Contains configurations matching best practices when using React framework: + +- @nrwl/nx/react-base +- @nrwl/nx/react-jsx +- @nrwl/nx/react-typescript + +You can also use `@nrwl/nx/react` which includes all three `@nrwl/nx/react-*` plugins + +## enforce-module-boundaries + +The `@nrwl/nx/enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. By enforcing strict boundaries it helps keep prevent unplanned cross-dependencies. + +### Usage + +You can use `enforce-module-boundaries` rule by adding it to your ESLint rules configuration: + +```jsonc +{ + // ... more ESLint config here + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ + "error", + { + // ...rule specific configuration + } + ] + } + } + // ... more ESLint overrides here + ] +} +``` + +Read more about proper usage of this rule: + +- [Enforce Project Boundaries](/core-features/enforce-project-boundaries) +- [Ban Dependencies with Certain Tags](/recipes/other/ban-dependencies-with-tags) +- [Tag in Multiple Dimensions](/recipes/other/tag-multiple-dimensions) +- [Ban External Imports](/recipes/other/ban-external-imports) +- [Tags Allow List](/recipes/other/tags-allow-list) +- [Taming Code Organization with Module Boundaries in Nx](https://blog.nrwl.io/mastering-the-project-boundaries-in-nx-f095852f5bf4) diff --git a/docs/generated/packages/linter/documents/overview.md b/docs/generated/packages/linter/documents/overview.md new file mode 100644 index 0000000000000..bbed5541200b4 --- /dev/null +++ b/docs/generated/packages/linter/documents/overview.md @@ -0,0 +1,31 @@ +The Linter plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace. + +## Setting Up Linter + +### Installation + +In any Nx workspace, you can install `@nrwl/linter` by running the following commands if `@nrwl/linter` package is not installed: + +```shell +npm i --save-dev @nrwl/linter +``` + +```shell +yarn add --dev @nrwl/linter +``` + +## Lint + +You can lint an application or a library with the following command: + +```shell +nx lint my-app +``` + +```shell +nx lint my-lib +``` + +## Utils + +- [convert-tslint-to-eslint](/packages/angular/generators/convert-tslint-to-eslint) - Converts a project linter from [TSLint](https://palantir.github.io/tslint/) to [ESLint](https://eslint.org/) diff --git a/docs/generated/packages/linter/executors/eslint.json b/docs/generated/packages/linter/executors/eslint.json new file mode 100644 index 0000000000000..42d04502e82c0 --- /dev/null +++ b/docs/generated/packages/linter/executors/eslint.json @@ -0,0 +1,139 @@ +{ + "name": "eslint", + "implementation": "/packages/linter/src/executors/eslint/lint.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "title": "ESLint Lint Target", + "description": "ESLint Lint Target.", + "cli": "nx", + "type": "object", + "properties": { + "eslintConfig": { + "type": "string", + "description": "The name of the ESLint configuration file.", + "x-completion-type": "file", + "x-completion-glob": ".eslintrc?(.json)" + }, + "lintFilePatterns": { + "type": "array", + "description": "One or more files/dirs/globs to pass directly to ESLint's `lintFiles()` method.", + "default": [], + "items": { "type": "string" } + }, + "format": { + "type": "string", + "description": "ESLint Output formatter (https://eslint.org/docs/user-guide/formatters).", + "default": "stylish", + "anyOf": [ + { + "enum": [ + "stylish", + "compact", + "codeframe", + "unix", + "visualstudio", + "table", + "checkstyle", + "html", + "jslint-xml", + "json", + "json-with-metadata", + "junit", + "tap" + ] + }, + { "minLength": 1 } + ] + }, + "force": { + "type": "boolean", + "description": "Succeeds even if there was linting errors.", + "default": false + }, + "silent": { + "type": "boolean", + "description": "Hide output text.", + "default": false + }, + "fix": { + "type": "boolean", + "description": "Fixes linting errors (may overwrite linted files).", + "default": false + }, + "cache": { + "type": "boolean", + "description": "Only check changed files.", + "default": false + }, + "cacheLocation": { + "type": "string", + "description": "Path to the cache file or directory.", + "x-completion-type": "directory", + "x-completion-glob": "tsconfig.*.json" + }, + "outputFile": { + "type": "string", + "description": "File to write report to.", + "x-completion-type": "file" + }, + "maxWarnings": { + "type": "number", + "description": "Number of warnings to trigger nonzero exit code - default: `-1`.", + "default": -1 + }, + "quiet": { + "type": "boolean", + "description": "Report errors only - default: `false`.", + "default": false + }, + "ignorePath": { + "type": "string", + "description": "The path of the `.eslintignore` file.", + "x-completion-type": "file", + "x-completion-glob": ".eslintignore" + }, + "noEslintrc": { + "type": "boolean", + "description": "The equivalent of the `--no-eslintrc` flag on the ESLint CLI, it is `false` by default.", + "default": false + }, + "hasTypeAwareRules": { + "type": "boolean", + "description": "When set to `true`, the linter will invalidate its cache when any of its dependencies changes." + }, + "cacheStrategy": { + "type": "string", + "description": "Strategy to use for detecting changed files in the cache.", + "default": "metadata", + "enum": ["metadata", "content"] + }, + "rulesdir": { + "type": "array", + "description": "The equivalent of the `--rulesdir` flag on the ESLint CLI.", + "default": [], + "items": { "type": "string", "x-completion-type": "directory" } + }, + "resolvePluginsRelativeTo": { + "type": "string", + "description": "The equivalent of the `--resolve-plugins-relative-to` flag on the ESLint CLI.", + "x-completion-type": "directory" + }, + "reportUnusedDisableDirectives": { + "type": "string", + "enum": ["off", "warn", "error"], + "description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI." + } + }, + "required": ["lintFilePatterns"], + "examplesFile": "Linter can be configured in multiple ways. The basic way is to provide only `lintFilePatterns`, which is a mandatory property. This tells us where to look for files to lint.\n\n`project.json`:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Fixing linter issues\" %}\n\nLinter provides an automated way of fixing known issues. To ensure that those changes are properly cached, we need to add an `outputs` property to the `lint` target. Omitting the `outputs` property would produce an invalid cache record. Both of these properties are set by default when scaffolding a new project.\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"]\n }\n}\n```\n\nWith these settings, we can run the command with a `--fix` flag:\n\n```bash\nnx run frontend:lint --fix\n```\n\nWe can also set this flag via project configuration to always fix files when running lint:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"fix\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Custom output format\" %}\n\nESLint executor uses the `stylish` output format by default. You can change this by specifying the `format` property:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"format\": \"compact\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Silence warnings\" %}\n\nMigrated or legacy projects tend to have an overwhelming amount of lint errors. We might want to change those temporarily to be warnings so they don't block the development. But they would still clutter the report. We can run the command with `--quiet` to hide warning (errors would still break the lint):\n\n```bash\nnx run frontend:lint --quiet\n```\n\nWe can also set this via project configuration as a default option.\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"quiet\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"ESLint config file\" %}\n\n`ESLint` provides several ways of specifying the configuration. The default one is using `.eslintrc.json` but you can override it by setting the `eslintConfig` flag:\n\n```json\n\"lint\": {\n \"executor\": \"@nrwl/linter:eslint\",\n \"outputs\": [\"{options.outputFile}\"],\n \"options\": {\n \"lintFilePatterns\": [\"apps/frontend/**/*.ts\"],\n \"eslintConfig\": \".eslintrc.js\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", + "presets": [] + }, + "hasher": "./src/executors/eslint/hasher", + "description": "Run ESLint on a project.", + "aliases": [], + "hidden": false, + "path": "/packages/linter/src/executors/eslint/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/linter/generators/workspace-rule.json b/docs/generated/packages/linter/generators/workspace-rule.json new file mode 100644 index 0000000000000..7dd3ac6c985bc --- /dev/null +++ b/docs/generated/packages/linter/generators/workspace-rule.json @@ -0,0 +1,34 @@ +{ + "name": "workspace-rule", + "factory": "./src/generators/workspace-rule/workspace-rule#lintWorkspaceRuleGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxWorkspaceRule", + "cli": "nx", + "title": "Create a new Workspace Lint Rule", + "description": "Create a new Workspace Lint Rule.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the new rule.", + "$default": { "$source": "argv", "index": 0 } + }, + "directory": { + "type": "string", + "description": "Create the rule under this directory within `tools/eslint-rules/` (can be nested).", + "alias": "dir", + "default": "rules" + } + }, + "required": ["name", "directory"], + "examplesFile": "{% tabs %}\n{% tab label=\"Create rule\" %}\n\nThis command will generate a new workspace lint rule called `my-custom-rule`. The new rule will be generated in `tools/eslint-rules/rules` folder:\n\n```shell\nnx g @nrwl/linter:workspace-rule my-custom-rule\n```\n\n{% /tab %}\n{% tab label=\"Custom sub-folder\" %}\n\nWe can change the default sub-folder from `rules` and specify a custom one:\n\n```shell\nnx g @nrwl/linter:workspace-rule --name=my-custom-rule --directory=my/custom/path\n```\n\nThe command above will generate the rule in `tools/eslint-rules/my/custom/path` folder.\n\n{% /tab %}\n{% /tabs %}\n\n---\n", + "presets": [] + }, + "description": "Create a new Workspace ESLint rule.", + "implementation": "/packages/linter/src/generators/workspace-rule/workspace-rule#lintWorkspaceRuleGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/linter/src/generators/workspace-rule/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/linter/generators/workspace-rules-project.json b/docs/generated/packages/linter/generators/workspace-rules-project.json new file mode 100644 index 0000000000000..4144ef73221de --- /dev/null +++ b/docs/generated/packages/linter/generators/workspace-rules-project.json @@ -0,0 +1,27 @@ +{ + "name": "workspace-rules-project", + "factory": "./src/generators/workspace-rules-project/workspace-rules-project#lintWorkspaceRulesProjectGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxWorkspaceRulesProject", + "cli": "nx", + "title": "Create the Workspace Lint Rules Project", + "description": "Create the Workspace Lint Rules Project.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/linter:workspace-rules-project", + "description": "Create the Workspace Lint Rules Project" + } + ], + "properties": {}, + "required": [], + "presets": [] + }, + "description": "Create the Workspace Lint Rules Project.", + "hidden": true, + "implementation": "/packages/linter/src/generators/workspace-rules-project/workspace-rules-project#lintWorkspaceRulesProjectGenerator.ts", + "aliases": [], + "path": "/packages/linter/src/generators/workspace-rules-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/make-angular-cli-faster.json b/docs/generated/packages/make-angular-cli-faster.json deleted file mode 100644 index 289a5449a3f6e..0000000000000 --- a/docs/generated/packages/make-angular-cli-faster.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "make-angular-cli-faster", - "packageName": "make-angular-cli-faster", - "description": "Make Angular CLI faster by enabling distributed computation caching", - "root": "/packages/make-angular-cli-faster", - "source": "/packages/make-angular-cli-faster/src", - "documentation": [], - "generators": [], - "executors": [] -} diff --git a/docs/generated/packages/nest.json b/docs/generated/packages/nest.json deleted file mode 100644 index 645fa47876500..0000000000000 --- a/docs/generated/packages/nest.json +++ /dev/null @@ -1,1261 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "nest", - "packageName": "@nrwl/nest", - "description": "The Nx Plugin for Nest contains executors and generators for allowing your workspace to create powerful Nest best in class APIs.", - "root": "/packages/nest", - "source": "/packages/nest/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/nest", - "file": "shared/nest-plugin", - "content": "Nest.js is a framework designed for building scalable server-side applications. In many ways, Nest is familiar to Angular developers:\n\n- It has excellent TypeScript support.\n- Its dependency injection system is similar to the one in Angular.\n- It emphasises testability.\n- Its configuration APIs are similar to Angular as well.\n\nMany conventions and best practices used in Angular applications can be also be used in Nest.\n\n## Setting Up Nest\n\nTo create a new workspace with Nest, run the following command:\n\n```shell\nnpx create-nx-workspace my-workspace --preset=nest\n```\n\nYarn users can use the following command instead:\n\n```shell\nyarn create nx-workspace my-workspace --preset=nest\n```\n\nTo add the Nest plugin to an existing workspace, run one the following commands:\n\n```shell\nnpm install -D @nrwl/nest\n```\n\n```shell\nyarn add -D @nrwl/nest\n```\n\n### Create Applications\n\nYou can add a new Nest application with the following command:\n\n```shell\nnx g @nrwl/nest:app my-nest-app\n```\n\n#### Application Proxies\n\nGenerating Nest applications has an option to configure other projects in the workspace to proxy API requests. This can be done by passing the `--frontendProject` with the project name you wish to enable proxy support for.\n\n```shell\nnx g @nrwl/nest:app my-nest-app --frontendProject my-angular-app\n```\n\n### Create Libraries\n\nYou can add a new Nest library with the following command:\n\n```shell\nnx g @nrwl/nest:lib my-nest-lib\n```\n\nTo make the library `buildable`, use the following command:\n\n```shell\nnx g @nrwl/nest:lib my-nest-lib --buildable\n```\n\nTo make the library `publishable`, use the following command:\n\n```shell\nnx g @nrwl/nest:lib my-nest-lib --publishable --importPath=@my-workspace/my-nest-lib\n```\n\n> Read more about [building and publishing libraries here](/more-concepts/buildable-and-publishable-libraries).\n\n### Nest Generators\n\nThe Nest plugin for Nx extends the generators provided by Nest. Any commands that can be used with the Nest CLI can also be used with the `nx` command. The `--project` flag should be used for all Nest generators.\n\n> `--project` is used to infer the root of the project where the generators will generate the files.\n\n## Using Nest\n\n### Build\n\nYou can build an application with the following command:\n\n```shell\nnx build my-nest-app\n```\n\nThis applies to `buildable` libraries as well\n\n```shell\nnx build my-nest-lib\n```\n\n#### Waiting for other builds\n\nSetting the `waitUntilTargets` option with an array of projects (with the following format: `\"project:architect\"`) will execute those commands before serving the Nest application.\n\n### Serve\n\nYou can serve an application with the following command:\n\n```shell\nnx serve my-nest-app\n```\n\nThe `serve` command runs the `build` target, and executes the application.\n\nBy default, the serve command will run in `watch` mode. This allows code to be changed, and the Nest application to be rebuilt automatically.\n\n#### Debugging\n\nNest applications also have the `inspect` flag set, so you can attach your debugger to the running instance.\n\nDebugging is set to use a random port that is available on the system. The port can be changed by setting the port option in the `serve` target in the `project.json`. Or by running the serve command with `--port `.\n\nFor additional information on how to debug Node applications, see the [Node.js debugging getting started guide](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients).\n\n### Lint\n\nYou can lint an application with the following command:\n\n```shell\nnx lint my-nest-app\n```\n\nYou can lint a library with the following command:\n\n```shell\nnx lint my-nest-lib\n```\n\n### Unit Test\n\nYou can run unit test for an application with the following command:\n\n```shell\nnx test my-nest-app\n```\n\nYou can run unit test for a library with the following command:\n\n```shell\nnx test my-nest-lib\n```\n\n## More Documentation\n\n- [Using Jest](/packages/jest)\n" - } - ], - "generators": [ - { - "name": "application", - "factory": "./src/generators/application/application", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestApplicationGenerator", - "title": "Nx Application Options Schema", - "description": "Nx Application Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the node application?" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "description": "Do not add dependencies to `package.json`.", - "type": "boolean", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "tags": { - "description": "Add tags to the application (used for linting).", - "type": "string" - }, - "frontendProject": { - "description": "Frontend project that needs to access this application. This sets up proxy configuration.", - "type": "string" - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - } - }, - "additionalProperties": false, - "required": ["name"], - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create a NestJS application.", - "implementation": "/packages/nest/src/generators/application/application.ts", - "hidden": false, - "path": "/packages/nest/src/generators/application/schema.json" - }, - { - "name": "convert-tslint-to-eslint", - "factory": "./src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "nest-convert-tslint-to-eslint", - "cli": "nx", - "title": "Convert a NestJS project from TSLint to ESLint", - "description": "Convert a NestJS project from TSLint to ESLint. \n_NOTE: Does not work in `--dry-run` mode_.", - "examples": [ - { - "command": "nx g convert-tslint-to-eslint myapp", - "description": "Convert the NestJS project `myapp` from TSLint to ESLint" - } - ], - "type": "object", - "properties": { - "project": { - "description": "The name of the NestJS project to convert.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "Which NestJS project would you like to convert from TSLint to ESLint?" - }, - "ignoreExistingTslintConfig": { - "description": "If true we will not use existing TSLint config as a reference, we will just reset the project with the latest recommended ESLint config.", - "type": "boolean", - "default": false, - "x-prompt": "Would you like to ignore the existing TSLint config? Recommended if the TSLint config has not been altered much as it makes the new ESLint config cleaner." - }, - "removeTSLintIfNoMoreTSLintTargets": { - "description": "If this conversion leaves no more TSLint usage in the workspace, it will remove TSLint and related dependencies and configuration.", - "type": "boolean", - "default": true, - "x-prompt": "Would you like to remove TSLint and its related config if there are no TSLint projects remaining after this conversion?" - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files.", - "default": false - } - }, - "required": ["project"], - "presets": [] - }, - "description": "Convert a project from TSLint to ESLint.", - "implementation": "/packages/nest/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/convert-tslint-to-eslint/schema.json" - }, - { - "name": "init", - "factory": "./src/generators/init/init", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestInitGenerator", - "title": "Init Nest Plugin", - "description": "Init Nest Plugin.", - "cli": "nx", - "type": "object", - "properties": { - "unitTestRunner": { - "description": "Adds the specified unit test runner.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/nest` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/nest/src/generators/init/init.ts", - "path": "/packages/nest/src/generators/init/schema.json" - }, - { - "name": "library", - "factory": "./src/generators/library/library", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestLibraryGenerator", - "title": "Create a NestJS Library for Nx", - "description": "Create a NestJS Library for Nx.", - "cli": "nx", - "type": "object", - "examples": [ - { - "command": "nx g lib mylib --directory=myapp", - "description": "Generate libs/myapp/mylib" - } - ], - "properties": { - "name": { - "description": "Library name.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?" - }, - "directory": { - "description": "A directory where the library is placed.", - "type": "string", - "alias": "dir" - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "tags": { - "description": "Add tags to the library (used for linting).", - "type": "string", - "alias": "t" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "description": "Do not update tsconfig.base.json for development experience.", - "type": "boolean", - "default": false - }, - "publishable": { - "description": "Create a publishable library.", - "type": "boolean" - }, - "buildable": { - "description": "Generate a buildable library.", - "type": "boolean", - "default": false - }, - "importPath": { - "description": "The library name used to import it, like @myorg/my-awesome-lib. Must be a valid npm name.", - "type": "string" - }, - "global": { - "description": "Add the Global decorator to the generated module.", - "type": "boolean", - "default": false - }, - "service": { - "description": "Include a service with the library.", - "type": "boolean", - "default": false - }, - "controller": { - "description": "Include a controller with the library.", - "type": "boolean", - "default": false - }, - "testEnvironment": { - "description": "The test environment for jest, for node applications this should stay as node unless doing DOM testing.", - "type": "string", - "enum": ["jsdom", "node"], - "default": "node" - }, - "target": { - "description": "The ES target, Nest suggest using es6 or higher.", - "type": "string", - "default": "es6", - "enum": [ - "es5", - "es6", - "esnext", - "es2015", - "es2016", - "es2017", - "es2018", - "es2019", - "es2020" - ] - }, - "strict": { - "description": "Whether to enable tsconfig strict mode or not.", - "type": "boolean", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into /project.json rather than including it inside workspace.json", - "type": "boolean", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", - "default": false - } - }, - "additionalProperties": false, - "required": ["name"], - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Create a new NestJS library.", - "implementation": "/packages/nest/src/generators/library/library.ts", - "hidden": false, - "path": "/packages/nest/src/generators/library/schema.json" - }, - { - "name": "class", - "factory": "./src/generators/class/class", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestClassGenerator", - "title": "Nest Class Options Schema", - "description": "Nest Class Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the class.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest class language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `class` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/class/class.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/class/schema.json" - }, - { - "name": "controller", - "factory": "./src/generators/controller/controller", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestControllerGenerator", - "title": "Nest Controller Options Schema", - "description": "Nest Controller Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the controller.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": false - }, - "language": { - "description": "Nest controller language.", - "type": "string", - "enum": ["js", "ts"] - }, - "skipImport": { - "description": "Flag to skip the module import.", - "type": "boolean", - "default": false - }, - "module": { - "description": "Allows specification of the declaring module.", - "type": "string" - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `controller` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/controller/controller.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/controller/schema.json" - }, - { - "name": "decorator", - "factory": "./src/generators/decorator/decorator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestDecoratorGenerator", - "title": "Nest Decorator Options Schema", - "description": "Nest Decorator Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the decorator.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest decorator language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `decorator` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/decorator/decorator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/decorator/schema.json" - }, - { - "name": "filter", - "factory": "./src/generators/filter/filter", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestFilterGenerator", - "title": "Nest Filter Options Schema", - "description": "Nest Filter Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the filter.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files.", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest filter language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `filter` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/filter/filter.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/filter/schema.json" - }, - { - "name": "gateway", - "factory": "./src/generators/gateway/gateway", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestGatewayGenerator", - "title": "Nest Gateway Options Schema", - "description": "Nest Gateway Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the gateway.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest gateway language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `gateway` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/gateway/gateway.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/gateway/schema.json" - }, - { - "name": "guard", - "factory": "./src/generators/guard/guard", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestGuardGenerator", - "title": "Nest Guard Options Schema", - "description": "Nest Guard Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the guard.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest guard language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `guard` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/guard/guard.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/guard/schema.json" - }, - { - "name": "interceptor", - "factory": "./src/generators/interceptor/interceptor", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestInterceptorGenerator", - "title": "Nest Interceptor Options Schema", - "description": "Nest Interceptor Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the interceptor.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest interceptor language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `interceptor` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/interceptor/interceptor.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/interceptor/schema.json" - }, - { - "name": "interface", - "factory": "./src/generators/interface/interface", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestInterfaceGenerator", - "title": "Nest Interface Options Schema", - "description": "Nest Interface Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the interface.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `interface` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/interface/interface.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/interface/schema.json" - }, - { - "name": "middleware", - "factory": "./src/generators/middleware/middleware", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestMiddlewareGenerator", - "title": "Nest Middleware Options Schema", - "description": "Nest Middleware Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the middleware.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest middleware language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `middleware` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/middleware/middleware.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/middleware/schema.json" - }, - { - "name": "module", - "factory": "./src/generators/module/module", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestModuleGenerator", - "title": "Nest Module Options Schema", - "description": "Nest Module Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the module.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": false - }, - "language": { - "description": "Nest module language.", - "type": "string", - "enum": ["js", "ts"] - }, - "module": { - "description": "The path to import the module.", - "type": "string", - "format": "path" - }, - "skipImport": { - "description": "Flag to skip the module import.", - "type": "boolean", - "default": false - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `module` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/module/module.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/module/schema.json" - }, - { - "name": "pipe", - "factory": "./src/generators/pipe/pipe", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestPipeGenerator", - "title": "Nest Pipe Options Schema", - "description": "Nest Pipe Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the pipe.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest pipe language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `pipe` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/pipe/pipe.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/pipe/schema.json" - }, - { - "name": "provider", - "factory": "./src/generators/provider/provider", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestProviderGenerator", - "title": "Nest Provider Options Schema", - "description": "Nest Provider Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the provider.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": true - }, - "language": { - "description": "Nest provider language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `provider` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/provider/provider.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/provider/schema.json" - }, - { - "name": "resolver", - "factory": "./src/generators/resolver/resolver", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestResolverGenerator", - "title": "Nest Resolver Options Schema", - "description": "Nest Resolver Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the resolver.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": false - }, - "language": { - "description": "Nest resolver language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `resolver` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/resolver/resolver.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/resolver/schema.json" - }, - { - "name": "resource", - "factory": "./src/generators/resource/resource", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestResourceGenerator", - "title": "Nest Resource Options Schema", - "description": "Nest Resource Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the resource.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for this resource (plural, e.g., `users`)?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": false - }, - "language": { - "description": "Nest class language.", - "type": "string", - "enum": ["js", "ts"] - }, - "type": { - "type": "string", - "description": "The transport layer.", - "default": "rest", - "enum": [ - "rest", - "graphql-code-first", - "graphql-schema-first", - "microservice", - "ws" - ], - "x-prompt": { - "message": "What transport layer do you use?", - "type": "list", - "items": [ - { "value": "rest", "label": "REST API" }, - { - "value": "graphql-code-first", - "label": "GraphQL (code first)" - }, - { - "value": "graphql-schema-first", - "label": "GraphQL (schema first)" - }, - { "value": "microservice", "label": "Microservice (non-HTTP)" }, - { "value": "ws", "label": "WebSockets" } - ] - } - }, - "skipImport": { - "type": "boolean", - "description": "Flag to skip the module import.", - "default": false - }, - "crud": { - "type": "boolean", - "description": "When true, CRUD entry points are generated.", - "default": true, - "x-prompt": { - "message": "Would you like to generate CRUD entry points?", - "type": "confirmation" - } - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `resource` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/resource/resource.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/resource/schema.json" - }, - { - "name": "service", - "factory": "./src/generators/service/service", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxNestServiceGenerator", - "title": "Nest Service Options Schema", - "description": "Nest Service Options Schema.", - "cli": "nx", - "type": "object", - "properties": { - "name": { - "description": "The name of the service.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use?" - }, - "project": { - "description": "The Nest project to target.", - "type": "string", - "$default": { "$source": "projectName" }, - "alias": "p", - "x-prompt": "What Nest project would you like to target?" - }, - "directory": { - "description": "Directory where the generated files are placed.", - "type": "string", - "aliases": ["dir", "path"] - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "description": "Test runner to use for unit tests.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "flat": { - "description": "Flag to indicate if a directory is created.", - "type": "boolean", - "default": false - }, - "language": { - "description": "Nest service language.", - "type": "string", - "enum": ["js", "ts"] - } - }, - "additionalProperties": false, - "required": ["name", "project"], - "presets": [] - }, - "description": "Run the `service` NestJS generator with Nx project support.", - "implementation": "/packages/nest/src/generators/service/service.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nest/src/generators/service/schema.json" - } - ], - "executors": [] -} diff --git a/docs/generated/packages/nest/documents/overview.md b/docs/generated/packages/nest/documents/overview.md new file mode 100644 index 0000000000000..f5562023b0b95 --- /dev/null +++ b/docs/generated/packages/nest/documents/overview.md @@ -0,0 +1,148 @@ +Nest.js is a framework designed for building scalable server-side applications. In many ways, Nest is familiar to Angular developers: + +- It has excellent TypeScript support. +- Its dependency injection system is similar to the one in Angular. +- It emphasises testability. +- Its configuration APIs are similar to Angular as well. + +Many conventions and best practices used in Angular applications can be also be used in Nest. + +## Setting Up Nest + +To create a new workspace with Nest, run the following command: + +```shell +npx create-nx-workspace my-workspace --preset=nest +``` + +Yarn users can use the following command instead: + +```shell +yarn create nx-workspace my-workspace --preset=nest +``` + +To add the Nest plugin to an existing workspace, run one the following commands: + +```shell +npm install -D @nrwl/nest +``` + +```shell +yarn add -D @nrwl/nest +``` + +### Create Applications + +You can add a new Nest application with the following command: + +```shell +nx g @nrwl/nest:app my-nest-app +``` + +#### Application Proxies + +Generating Nest applications has an option to configure other projects in the workspace to proxy API requests. This can be done by passing the `--frontendProject` with the project name you wish to enable proxy support for. + +```shell +nx g @nrwl/nest:app my-nest-app --frontendProject my-angular-app +``` + +### Create Libraries + +You can add a new Nest library with the following command: + +```shell +nx g @nrwl/nest:lib my-nest-lib +``` + +To make the library `buildable`, use the following command: + +```shell +nx g @nrwl/nest:lib my-nest-lib --buildable +``` + +To make the library `publishable`, use the following command: + +```shell +nx g @nrwl/nest:lib my-nest-lib --publishable --importPath=@my-workspace/my-nest-lib +``` + +> Read more about [building and publishing libraries here](/more-concepts/buildable-and-publishable-libraries). + +### Nest Generators + +The Nest plugin for Nx extends the generators provided by Nest. Any commands that can be used with the Nest CLI can also be used with the `nx` command. The `--project` flag should be used for all Nest generators. + +> `--project` is used to infer the root of the project where the generators will generate the files. + +## Using Nest + +### Build + +You can build an application with the following command: + +```shell +nx build my-nest-app +``` + +This applies to `buildable` libraries as well + +```shell +nx build my-nest-lib +``` + +#### Waiting for other builds + +Setting the `waitUntilTargets` option with an array of projects (with the following format: `"project:architect"`) will execute those commands before serving the Nest application. + +### Serve + +You can serve an application with the following command: + +```shell +nx serve my-nest-app +``` + +The `serve` command runs the `build` target, and executes the application. + +By default, the serve command will run in `watch` mode. This allows code to be changed, and the Nest application to be rebuilt automatically. + +#### Debugging + +Nest applications also have the `inspect` flag set, so you can attach your debugger to the running instance. + +Debugging is set to use a random port that is available on the system. The port can be changed by setting the port option in the `serve` target in the `project.json`. Or by running the serve command with `--port `. + +For additional information on how to debug Node applications, see the [Node.js debugging getting started guide](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients). + +### Lint + +You can lint an application with the following command: + +```shell +nx lint my-nest-app +``` + +You can lint a library with the following command: + +```shell +nx lint my-nest-lib +``` + +### Unit Test + +You can run unit test for an application with the following command: + +```shell +nx test my-nest-app +``` + +You can run unit test for a library with the following command: + +```shell +nx test my-nest-lib +``` + +## More Documentation + +- [Using Jest](/packages/jest) diff --git a/docs/generated/packages/nest/generators/application.json b/docs/generated/packages/nest/generators/application.json new file mode 100644 index 0000000000000..9fcb30806a1b1 --- /dev/null +++ b/docs/generated/packages/nest/generators/application.json @@ -0,0 +1,73 @@ +{ + "name": "application", + "factory": "./src/generators/application/application", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestApplicationGenerator", + "title": "Nx Application Options Schema", + "description": "Nx Application Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the node application?" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "description": "Do not add dependencies to `package.json`.", + "type": "boolean", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "tags": { + "description": "Add tags to the application (used for linting).", + "type": "string" + }, + "frontendProject": { + "description": "Frontend project that needs to access this application. This sets up proxy configuration.", + "type": "string" + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + } + }, + "additionalProperties": false, + "required": ["name"], + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create a NestJS application.", + "implementation": "/packages/nest/src/generators/application/application.ts", + "hidden": false, + "path": "/packages/nest/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/class.json b/docs/generated/packages/nest/generators/class.json new file mode 100644 index 0000000000000..cad06a7bc1564 --- /dev/null +++ b/docs/generated/packages/nest/generators/class.json @@ -0,0 +1,62 @@ +{ + "name": "class", + "factory": "./src/generators/class/class", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestClassGenerator", + "title": "Nest Class Options Schema", + "description": "Nest Class Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the class.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest class language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `class` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/class/class.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/class/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/controller.json b/docs/generated/packages/nest/generators/controller.json new file mode 100644 index 0000000000000..9e3e0cbeec4e6 --- /dev/null +++ b/docs/generated/packages/nest/generators/controller.json @@ -0,0 +1,71 @@ +{ + "name": "controller", + "factory": "./src/generators/controller/controller", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestControllerGenerator", + "title": "Nest Controller Options Schema", + "description": "Nest Controller Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the controller.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": false + }, + "language": { + "description": "Nest controller language.", + "type": "string", + "enum": ["js", "ts"] + }, + "skipImport": { + "description": "Flag to skip the module import.", + "type": "boolean", + "default": false + }, + "module": { + "description": "Allows specification of the declaring module.", + "type": "string" + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `controller` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/controller/controller.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/controller/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/convert-tslint-to-eslint.json b/docs/generated/packages/nest/generators/convert-tslint-to-eslint.json new file mode 100644 index 0000000000000..0c5ce8cd1cfac --- /dev/null +++ b/docs/generated/packages/nest/generators/convert-tslint-to-eslint.json @@ -0,0 +1,51 @@ +{ + "name": "convert-tslint-to-eslint", + "factory": "./src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "nest-convert-tslint-to-eslint", + "cli": "nx", + "title": "Convert a NestJS project from TSLint to ESLint", + "description": "Convert a NestJS project from TSLint to ESLint. \n_NOTE: Does not work in `--dry-run` mode_.", + "examples": [ + { + "command": "nx g convert-tslint-to-eslint myapp", + "description": "Convert the NestJS project `myapp` from TSLint to ESLint" + } + ], + "type": "object", + "properties": { + "project": { + "description": "The name of the NestJS project to convert.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "Which NestJS project would you like to convert from TSLint to ESLint?" + }, + "ignoreExistingTslintConfig": { + "description": "If true we will not use existing TSLint config as a reference, we will just reset the project with the latest recommended ESLint config.", + "type": "boolean", + "default": false, + "x-prompt": "Would you like to ignore the existing TSLint config? Recommended if the TSLint config has not been altered much as it makes the new ESLint config cleaner." + }, + "removeTSLintIfNoMoreTSLintTargets": { + "description": "If this conversion leaves no more TSLint usage in the workspace, it will remove TSLint and related dependencies and configuration.", + "type": "boolean", + "default": true, + "x-prompt": "Would you like to remove TSLint and its related config if there are no TSLint projects remaining after this conversion?" + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files.", + "default": false + } + }, + "required": ["project"], + "presets": [] + }, + "description": "Convert a project from TSLint to ESLint.", + "implementation": "/packages/nest/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/convert-tslint-to-eslint/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/decorator.json b/docs/generated/packages/nest/generators/decorator.json new file mode 100644 index 0000000000000..d0a47c8f69fef --- /dev/null +++ b/docs/generated/packages/nest/generators/decorator.json @@ -0,0 +1,56 @@ +{ + "name": "decorator", + "factory": "./src/generators/decorator/decorator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestDecoratorGenerator", + "title": "Nest Decorator Options Schema", + "description": "Nest Decorator Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the decorator.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest decorator language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `decorator` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/decorator/decorator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/decorator/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/filter.json b/docs/generated/packages/nest/generators/filter.json new file mode 100644 index 0000000000000..e1b1fa90ab0b4 --- /dev/null +++ b/docs/generated/packages/nest/generators/filter.json @@ -0,0 +1,62 @@ +{ + "name": "filter", + "factory": "./src/generators/filter/filter", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestFilterGenerator", + "title": "Nest Filter Options Schema", + "description": "Nest Filter Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the filter.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files.", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest filter language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `filter` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/filter/filter.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/filter/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/gateway.json b/docs/generated/packages/nest/generators/gateway.json new file mode 100644 index 0000000000000..9253f2a6dc5d0 --- /dev/null +++ b/docs/generated/packages/nest/generators/gateway.json @@ -0,0 +1,62 @@ +{ + "name": "gateway", + "factory": "./src/generators/gateway/gateway", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestGatewayGenerator", + "title": "Nest Gateway Options Schema", + "description": "Nest Gateway Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the gateway.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest gateway language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `gateway` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/gateway/gateway.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/gateway/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/guard.json b/docs/generated/packages/nest/generators/guard.json new file mode 100644 index 0000000000000..cfaf16404d7f9 --- /dev/null +++ b/docs/generated/packages/nest/generators/guard.json @@ -0,0 +1,62 @@ +{ + "name": "guard", + "factory": "./src/generators/guard/guard", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestGuardGenerator", + "title": "Nest Guard Options Schema", + "description": "Nest Guard Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the guard.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest guard language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `guard` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/guard/guard.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/guard/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/init.json b/docs/generated/packages/nest/generators/init.json new file mode 100644 index 0000000000000..ab90718961710 --- /dev/null +++ b/docs/generated/packages/nest/generators/init.json @@ -0,0 +1,34 @@ +{ + "name": "init", + "factory": "./src/generators/init/init", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestInitGenerator", + "title": "Init Nest Plugin", + "description": "Init Nest Plugin.", + "cli": "nx", + "type": "object", + "properties": { + "unitTestRunner": { + "description": "Adds the specified unit test runner.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/nest` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/nest/src/generators/init/init.ts", + "path": "/packages/nest/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/interceptor.json b/docs/generated/packages/nest/generators/interceptor.json new file mode 100644 index 0000000000000..03d989b438df0 --- /dev/null +++ b/docs/generated/packages/nest/generators/interceptor.json @@ -0,0 +1,62 @@ +{ + "name": "interceptor", + "factory": "./src/generators/interceptor/interceptor", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestInterceptorGenerator", + "title": "Nest Interceptor Options Schema", + "description": "Nest Interceptor Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the interceptor.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest interceptor language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `interceptor` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/interceptor/interceptor.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/interceptor/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/interface.json b/docs/generated/packages/nest/generators/interface.json new file mode 100644 index 0000000000000..2d0c74b96ecf3 --- /dev/null +++ b/docs/generated/packages/nest/generators/interface.json @@ -0,0 +1,51 @@ +{ + "name": "interface", + "factory": "./src/generators/interface/interface", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestInterfaceGenerator", + "title": "Nest Interface Options Schema", + "description": "Nest Interface Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the interface.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `interface` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/interface/interface.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/interface/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/library.json b/docs/generated/packages/nest/generators/library.json new file mode 100644 index 0000000000000..71c288f5d377a --- /dev/null +++ b/docs/generated/packages/nest/generators/library.json @@ -0,0 +1,133 @@ +{ + "name": "library", + "factory": "./src/generators/library/library", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestLibraryGenerator", + "title": "Create a NestJS Library for Nx", + "description": "Create a NestJS Library for Nx.", + "cli": "nx", + "type": "object", + "examples": [ + { + "command": "nx g lib mylib --directory=myapp", + "description": "Generate libs/myapp/mylib" + } + ], + "properties": { + "name": { + "description": "Library name.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?" + }, + "directory": { + "description": "A directory where the library is placed.", + "type": "string", + "alias": "dir" + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "tags": { + "description": "Add tags to the library (used for linting).", + "type": "string", + "alias": "t" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "description": "Do not update tsconfig.base.json for development experience.", + "type": "boolean", + "default": false + }, + "publishable": { + "description": "Create a publishable library.", + "type": "boolean" + }, + "buildable": { + "description": "Generate a buildable library.", + "type": "boolean", + "default": false + }, + "importPath": { + "description": "The library name used to import it, like @myorg/my-awesome-lib. Must be a valid npm name.", + "type": "string" + }, + "global": { + "description": "Add the Global decorator to the generated module.", + "type": "boolean", + "default": false + }, + "service": { + "description": "Include a service with the library.", + "type": "boolean", + "default": false + }, + "controller": { + "description": "Include a controller with the library.", + "type": "boolean", + "default": false + }, + "testEnvironment": { + "description": "The test environment for jest, for node applications this should stay as node unless doing DOM testing.", + "type": "string", + "enum": ["jsdom", "node"], + "default": "node" + }, + "target": { + "description": "The ES target, Nest suggest using es6 or higher.", + "type": "string", + "default": "es6", + "enum": [ + "es5", + "es6", + "esnext", + "es2015", + "es2016", + "es2017", + "es2018", + "es2019", + "es2020" + ] + }, + "strict": { + "description": "Whether to enable tsconfig strict mode or not.", + "type": "boolean", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into /project.json rather than including it inside workspace.json", + "type": "boolean", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", + "default": false + } + }, + "additionalProperties": false, + "required": ["name"], + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Create a new NestJS library.", + "implementation": "/packages/nest/src/generators/library/library.ts", + "hidden": false, + "path": "/packages/nest/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/middleware.json b/docs/generated/packages/nest/generators/middleware.json new file mode 100644 index 0000000000000..78f63221b24f0 --- /dev/null +++ b/docs/generated/packages/nest/generators/middleware.json @@ -0,0 +1,62 @@ +{ + "name": "middleware", + "factory": "./src/generators/middleware/middleware", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestMiddlewareGenerator", + "title": "Nest Middleware Options Schema", + "description": "Nest Middleware Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the middleware.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest middleware language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `middleware` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/middleware/middleware.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/middleware/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/module.json b/docs/generated/packages/nest/generators/module.json new file mode 100644 index 0000000000000..450e24acf075b --- /dev/null +++ b/docs/generated/packages/nest/generators/module.json @@ -0,0 +1,66 @@ +{ + "name": "module", + "factory": "./src/generators/module/module", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestModuleGenerator", + "title": "Nest Module Options Schema", + "description": "Nest Module Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the module.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": false + }, + "language": { + "description": "Nest module language.", + "type": "string", + "enum": ["js", "ts"] + }, + "module": { + "description": "The path to import the module.", + "type": "string", + "format": "path" + }, + "skipImport": { + "description": "Flag to skip the module import.", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `module` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/module/module.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/module/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/pipe.json b/docs/generated/packages/nest/generators/pipe.json new file mode 100644 index 0000000000000..61030947871e8 --- /dev/null +++ b/docs/generated/packages/nest/generators/pipe.json @@ -0,0 +1,62 @@ +{ + "name": "pipe", + "factory": "./src/generators/pipe/pipe", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestPipeGenerator", + "title": "Nest Pipe Options Schema", + "description": "Nest Pipe Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the pipe.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest pipe language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `pipe` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/pipe/pipe.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/pipe/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/provider.json b/docs/generated/packages/nest/generators/provider.json new file mode 100644 index 0000000000000..237f83d5f4988 --- /dev/null +++ b/docs/generated/packages/nest/generators/provider.json @@ -0,0 +1,62 @@ +{ + "name": "provider", + "factory": "./src/generators/provider/provider", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestProviderGenerator", + "title": "Nest Provider Options Schema", + "description": "Nest Provider Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the provider.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": true + }, + "language": { + "description": "Nest provider language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `provider` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/provider/provider.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/provider/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/resolver.json b/docs/generated/packages/nest/generators/resolver.json new file mode 100644 index 0000000000000..9b381fb8b6be6 --- /dev/null +++ b/docs/generated/packages/nest/generators/resolver.json @@ -0,0 +1,62 @@ +{ + "name": "resolver", + "factory": "./src/generators/resolver/resolver", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestResolverGenerator", + "title": "Nest Resolver Options Schema", + "description": "Nest Resolver Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the resolver.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": false + }, + "language": { + "description": "Nest resolver language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `resolver` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/resolver/resolver.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/resolver/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/resource.json b/docs/generated/packages/nest/generators/resource.json new file mode 100644 index 0000000000000..17ae71cc086ef --- /dev/null +++ b/docs/generated/packages/nest/generators/resource.json @@ -0,0 +1,102 @@ +{ + "name": "resource", + "factory": "./src/generators/resource/resource", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestResourceGenerator", + "title": "Nest Resource Options Schema", + "description": "Nest Resource Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the resource.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for this resource (plural, e.g., `users`)?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": false + }, + "language": { + "description": "Nest class language.", + "type": "string", + "enum": ["js", "ts"] + }, + "type": { + "type": "string", + "description": "The transport layer.", + "default": "rest", + "enum": [ + "rest", + "graphql-code-first", + "graphql-schema-first", + "microservice", + "ws" + ], + "x-prompt": { + "message": "What transport layer do you use?", + "type": "list", + "items": [ + { "value": "rest", "label": "REST API" }, + { "value": "graphql-code-first", "label": "GraphQL (code first)" }, + { + "value": "graphql-schema-first", + "label": "GraphQL (schema first)" + }, + { "value": "microservice", "label": "Microservice (non-HTTP)" }, + { "value": "ws", "label": "WebSockets" } + ] + } + }, + "skipImport": { + "type": "boolean", + "description": "Flag to skip the module import.", + "default": false + }, + "crud": { + "type": "boolean", + "description": "When true, CRUD entry points are generated.", + "default": true, + "x-prompt": { + "message": "Would you like to generate CRUD entry points?", + "type": "confirmation" + } + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `resource` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/resource/resource.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/resource/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nest/generators/service.json b/docs/generated/packages/nest/generators/service.json new file mode 100644 index 0000000000000..105a8186b24ba --- /dev/null +++ b/docs/generated/packages/nest/generators/service.json @@ -0,0 +1,62 @@ +{ + "name": "service", + "factory": "./src/generators/service/service", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxNestServiceGenerator", + "title": "Nest Service Options Schema", + "description": "Nest Service Options Schema.", + "cli": "nx", + "type": "object", + "properties": { + "name": { + "description": "The name of the service.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use?" + }, + "project": { + "description": "The Nest project to target.", + "type": "string", + "$default": { "$source": "projectName" }, + "alias": "p", + "x-prompt": "What Nest project would you like to target?" + }, + "directory": { + "description": "Directory where the generated files are placed.", + "type": "string", + "aliases": ["dir", "path"] + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "description": "Test runner to use for unit tests.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "flat": { + "description": "Flag to indicate if a directory is created.", + "type": "boolean", + "default": false + }, + "language": { + "description": "Nest service language.", + "type": "string", + "enum": ["js", "ts"] + } + }, + "additionalProperties": false, + "required": ["name", "project"], + "presets": [] + }, + "description": "Run the `service` NestJS generator with Nx project support.", + "implementation": "/packages/nest/src/generators/service/service.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nest/src/generators/service/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/next.json b/docs/generated/packages/next.json deleted file mode 100644 index 0c08973b428f6..0000000000000 --- a/docs/generated/packages/next.json +++ /dev/null @@ -1,769 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "next", - "packageName": "@nrwl/next", - "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.", - "root": "/packages/next", - "source": "/packages/next/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/next", - "file": "shared/next-plugin", - "content": "When using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.\n\nThe Next.js plugin contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n- Integration with building, serving, and exporting a Next.js application.\n- Integration with React libraries within the workspace.\n\n## Setting up Next.js\n\nTo create a new Nx workspace with Next.js, run `npx create-nx-workspace@latest --preset=next`.\n\nTo add Next.js to an existing Nx workspace, install the `@nrwl/next` package. Make sure to install the version that matches your `@nrwl/workspace` version.\n\n```shell\n#yarn\nyarn add --dev @nrwl/next\n```\n\n```shell\n#npm\nnpm install --save-dev @nrwl/next\n```\n\n### Creating Applications\n\nYou can add a new application with the following:\n\n```shell\nnx g @nrwl/next:app my-new-app\n```\n\n### Generating Libraries\n\nNx allows you to create libraries with just one command. Some reasons you might want to create a library include:\n\n- Share code between applications\n- Publish a package to be used outside the monorepo\n- Better visualize the architecture using `nx graph`\n\nFor more information on Nx libraries, see our documentation on [Creating Libraries](/more-concepts/creating-libraries)\nand [Library Types](/more-concepts/library-types).\n\nTo generate a new library run:\n\n```shell\nnx g @nrwl/next:lib my-new-lib\n```\n\n### Generating Pages and Components\n\nNx also provides commands to quickly generate new pages and components for your application.\n\n```shell\nnx g @nrwl/next:page my-new-page --project=my-new-app\n\nnx g @nrwl/next:component my-new-component --project=my-new-app\n```\n\nAbove commands will add a new page `my-new-page` and a component `my-new-component` to `my-new-app` project respectively.\n\nNx generates components with tests by default. For pages, you can pass the `--withTests` option to generate tests under the `specs` folder.\n\n## Using Next.js\n\n### Serving Next.js Applications\n\nYou can run `nx serve my-new-app` to serve a Next.js application called `my-new-app` for development. This will start the dev server at http://localhost:4200.\n\nTo serve a Next.js application for production, add the `--prod` flag to the serve command:\n\n```shell\nnx serve my-new-app --prod\n```\n\n### Using an Nx Library in your Application\n\nYou can import a library called `my-new-lib` in your application as follows.\n\n```typescript jsx {% fileName=\"apps/my-next-app/pages/index.tsx\" %}\nimport { MyNewLib } from '@/my-new-lib';\n\nexport function Index() {\n return (\n \n

The main content

\n
\n );\n}\n\nexport default Index;\n```\n\nThere is no need to build the library prior to using it. When you update your library, the Next.js application will automatically pick up the changes.\n\n### Publishable libraries\n\nFor libraries intended to be built and published to a registry (e.g. npm) you can use the `--publishable` and `--importPath` options.\n\n```shell\nnx g @nrwl/next:lib my-new-lib --publishable --importPath=@happynrwl/ui-components\n```\n\n### Testing Projects\n\nYou can run unit tests with:\n\n```shell\nnx test my-new-app\nnx test my-new-lib\n```\n\nReplace `my-new-app` and `my-new-lib` with the name or the project you want to test. This command works for both applications and libraries.\n\nYou can also run E2E tests for applications:\n\n```shell\nnx e2e my-new-app-e2e\n```\n\nReplace `my-new-app-e2e` with the name or your project with -e2e appended.\n\n### Linting Projects\n\nYou can lint projects with:\n\n```shell\nnx lint my-new-app\nnx lint my-new-lib\n```\n\nReplace `my-new-app` and `my-new-lib` with the name or the project you want to test. This command works for both applications and libraries.\n\n### Building Projects\n\nNext.js applications can be build with:\n\n```shell\nnx build my-new-app\n```\n\nAnd if you generated a library with --buildable, then you can build a library as well:\n\n```shell\nnx build my-new-lib\n```\n\nAfter running a build, the output will be in the `dist` folder. You can customize the output folder by setting `outputPath` in the project's `project.json` file.\n\nThe library in `dist` is publishable to npm or a private registry.\n\n### Static HTML Export\n\nNext.js applications can be statically exported with:\n\n```shell\nnx export my-new-app\n```\n\n### Deploying Next.js Applications\n\nOnce you are ready to deploy your Next.js application, you have absolute freedom to choose any hosting provider that fits your needs.\n\nYou may know that the company behind Next.js, Vercel, has a great hosting platform offering that is developed in tandem with Next.js itself to offer a great overall developer and user experience. We have detailed [how to deploy your Next.js application to Vercel in a separate guide](/recipes/other/deploy-nextjs-to-vercel).\n\n## More Documentation\n\nHere are other resources that you may find useful to learn more about Next.js and Nx.\n\n- **Blog post:** [Building a blog with Next.js and Nx Series](https://blog.nrwl.io/create-a-next-js-web-app-with-nx-bcf2ab54613) by Juri Strumpflohner\n- **Video tutorial:** [Typescript NX Monorepo with NextJS and Express](https://www.youtube.com/watch?v=WOfL5q2HznI) by Jack Herrington\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#nextInitGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxNextNgInit", - "title": "Init Next Plugin", - "description": "Init Next Plugin.", - "type": "object", - "properties": { - "unitTestRunner": { - "description": "Adds the specified unit test runner.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "e2eTestRunner": { - "description": "Adds the specified e2e test runner.", - "type": "string", - "enum": ["cypress", "none"], - "default": "cypress" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "js": { - "type": "boolean", - "default": false, - "description": "Use JavaScript instead of TypeScript" - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/next` plugin.", - "hidden": true, - "implementation": "/packages/next/src/generators/init/init#nextInitGenerator.ts", - "aliases": [], - "path": "/packages/next/src/generators/init/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application#applicationGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxNextApp", - "title": "Create a Next.js Application for Nx", - "description": "Create a Next.js Application for Nx.", - "type": "object", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the application?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string", - "alias": "d" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "alias": "s", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - } - ] - } - }, - "server": { - "description": "The server script path to be used with next.", - "type": "string" - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipWorkspaceJson": { - "description": "Skip updating `workspace.json` with default options based on values provided to this app (e.g. `babel`, `style`).", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["cypress", "none"], - "description": "Test runner to use for end to end (E2E) tests.", - "default": "cypress" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting).", - "alias": "t" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`", - "type": "boolean" - }, - "swc": { - "description": "Enable the Rust-based compiler SWC to compile JS/TS files.", - "type": "boolean", - "default": true - }, - "customServer": { - "description": "Use a custom Express server for the Next.js application.", - "type": "boolean", - "default": false - } - }, - "required": [], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a directory\" %}\n\n```shell\nnx g app myapp --directory\n```\n\n{% /tab %}\n{% tab label=\"Use a custom Express server\" %}\n\n```shell\nnx g app myapp --custom-server\n```\n\n{% /tab %}\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g app myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create an application.", - "implementation": "/packages/next/src/generators/application/application#applicationGenerator.ts", - "hidden": false, - "path": "/packages/next/src/generators/application/schema.json" - }, - { - "name": "page", - "factory": "./src/generators/page/page#pageGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxNextReactPage", - "title": "Create a Page for Next", - "description": "Create a Page for Next.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for this component?" - }, - "name": { - "type": "string", - "description": "The name of the component.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the component?" - }, - "directory": { - "type": "string", - "description": "Create the page under this directory (can be nested). Will be created under `pages/`.", - "alias": "dir" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "alias": "s", - "default": "css", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - }, - { "value": "none", "label": "None" } - ] - } - }, - "withTests": { - "type": "boolean", - "description": "When true, creates a `spec.ts` test file for the new page.", - "default": false - }, - "export": { - "type": "boolean", - "description": "When true, the component is exported from the project `index.ts` (if it exists).", - "alias": "e", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "flat": { - "type": "boolean", - "description": "Create component at the source root rather than its own directory.", - "default": false - } - }, - "required": ["name", "project"], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create static page in an app\" %}\n\n```shell\nnx g page my-page --project=my-app\n```\n\n{% /tab %}\n{% tab label=\"Create dynamic page in an app\" %}\n\nThe following creates a page under `apps/my-app/pages/products/[id].tsx`.\n\n```shell\nnx g page \"[id]\" --project=my-app --directory=products\n```\n\n{% /tab %}\n\n{% /tabs %}\n", - "presets": [] - }, - "description": "Create a page.", - "implementation": "/packages/next/src/generators/page/page#pageGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/next/src/generators/page/schema.json" - }, - { - "name": "component", - "factory": "./src/generators/component/component#componentGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxNextReactComponent", - "title": "Create a React Component for Next", - "description": "Create a React Component for Next.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for this component?" - }, - "name": { - "type": "string", - "description": "The name of the component.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the component?" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "alias": "s", - "default": "css", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - } - ] - } - }, - "skipTests": { - "type": "boolean", - "description": "When true, does not create `spec.ts` test files for the new component.", - "default": false - }, - "directory": { - "type": "string", - "description": "Create the component under this directory (can be nested).", - "alias": "dir" - }, - "export": { - "type": "boolean", - "description": "When true, the component is exported from the project index.ts (if it exists).", - "alias": "e", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "flat": { - "type": "boolean", - "description": "Create component at the source root rather than its own directory.", - "default": false - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. `App.tsx`).", - "alias": "P", - "default": false - }, - "pascalCaseDirectory": { - "type": "boolean", - "description": "Use pascal case directory name (e.g. `App/App.tsx`).", - "alias": "R", - "default": false - } - }, - "required": ["name", "project"], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create an app component\" %}\n\n```shell\nnx g component my-cmp --project=my-app\n```\n\n{% /tab %}\n{% tab label=\"Create a component without its own folder\" %}\n\nRunning the following will create a component under `apps/my-app/components/my-cmp.tsx` rather than `apps/my-app/components/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component my-cmp --directory=foo --flat --project=my-app\n```\n\n{% /tab %}\n{% tab label=\"Create component in a custom directory\" %}\n\nRunning the following will create a component under `apps/my-app/foo/my-cmp.tsx` rather than `apps/my-app/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component my-cmp --directory=foo --flat --project=my-app\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "description": "Create a component.", - "implementation": "/packages/next/src/generators/component/component#componentGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/next/src/generators/component/schema.json" - }, - { - "name": "library", - "factory": "./src/generators/library/library#libraryGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactLibrary", - "title": "Create a React Library for Nx", - "description": "Create a React Library for an Nx workspace.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Library name", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "type": "string", - "description": "A directory where the lib is placed.", - "alias": "dir" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "alias": "s", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - }, - { "value": "none", "label": "None" } - ] - } - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting).", - "alias": "t" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update tsconfig.json for development experience." - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. `App.tsx`).", - "alias": "P", - "default": false - }, - "routing": { - "type": "boolean", - "description": "Generate library with routes." - }, - "appProject": { - "type": "string", - "description": "The application project to add the library route to.", - "alias": "a" - }, - "publishable": { - "type": "boolean", - "description": "Create a publishable library." - }, - "buildable": { - "type": "boolean", - "default": false, - "description": "Generate a buildable library." - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like `@myorg/my-awesome-lib`." - }, - "component": { - "type": "boolean", - "description": "Generate a default component.", - "default": true - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "globalCss": { - "type": "boolean", - "description": "When true, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Whether to enable tsconfig strict mode or not.", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`", - "type": "boolean" - } - }, - "required": ["name"], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create a new lib\" %}\n\n```shell\nnx g lib my-lib\n```\n\n{% /tab %}\n{% tab label=\"Create a new lib under a directory\" %}\n\nThe following will create a library at `libs/shared/my-lib`.\n\n```shell\nnx g lib my-lib --directory=shared\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Create a library.", - "implementation": "/packages/next/src/generators/library/library#libraryGenerator.ts", - "hidden": false, - "path": "/packages/next/src/generators/library/schema.json" - }, - { - "name": "custom-server", - "factory": "./src/generators/custom-server/custom-server#customServerGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxNextCustomServer", - "title": "Add custom server", - "description": "Add a custom server to existing Next.js application.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "argv", "index": 0 }, - "x-dropdown": "project", - "x-prompt": "What is the name of the project to set up a custom server for?" - }, - "compiler": { - "type": "string", - "enum": ["tsc", "swc"], - "default": "tsc", - "description": "The compiler used to build the custom server." - } - }, - "required": ["project"], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Add a custom server to existing app\" %}\n\n```shell\nnx g custom-server my-app\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "description": "Set up a custom server.", - "implementation": "/packages/next/src/generators/custom-server/custom-server#customServerGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/next/src/generators/custom-server/schema.json" - } - ], - "executors": [ - { - "name": "build", - "implementation": "/packages/next/src/executors/build/build.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "title": "Next Build", - "description": "Build a Next.js app.", - "type": "object", - "properties": { - "root": { "description": "The source root", "type": "string" }, - "outputPath": { - "type": "string", - "description": "The output path of the generated files.", - "x-completion-type": "directory" - }, - "fileReplacements": { - "description": "Replace files with other files in the build.", - "type": "array", - "items": { - "type": "object", - "properties": { - "replace": { - "type": "string", - "description": "The file to be replaced.", - "x-completion-type": "file" - }, - "with": { - "type": "string", - "description": "The file to replace with.", - "x-completion-type": "file" - } - }, - "additionalProperties": false, - "required": ["replace", "with"] - }, - "default": [] - }, - "nextConfig": { - "description": "Path (relative to workspace root) to a function which takes phase, config, and builder options, and returns the resulting config. This is an advanced option and should not be used with a normal Next.js config file (i.e. `next.config.js`).", - "type": "string", - "x-completion-type": "file", - "x-completion-glob": "next?(*).js" - }, - "buildLibsFromSource": { - "type": "boolean", - "description": "Read buildable libraries from source instead of building them separately.", - "default": true - }, - "includeDevDependenciesInPackageJson": { - "type": "boolean", - "description": "Include `devDependencies` in the generated package.json file. By default only production `dependencies` are included.", - "default": false - } - }, - "required": ["root", "outputPath"], - "presets": [] - }, - "description": "Build a Next.js application.", - "aliases": [], - "hidden": false, - "path": "/packages/next/src/executors/build/schema.json" - }, - { - "name": "server", - "implementation": "/packages/next/src/executors/server/server.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "title": "Next Serve", - "description": "Serve a Next.js app.", - "type": "object", - "properties": { - "dev": { - "type": "boolean", - "description": "Serve the application in the dev mode.", - "default": true - }, - "buildTarget": { - "type": "string", - "description": "Target which builds the application." - }, - "port": { - "type": "number", - "description": "Port to listen on.", - "default": 4200 - }, - "staticMarkup": { - "type": "boolean", - "description": "Static markup.", - "default": false - }, - "quiet": { - "type": "boolean", - "description": "Hide error messages containing server information.", - "default": false - }, - "customServerTarget": { - "type": "string", - "description": "Target which builds the custom server." - }, - "customServerPath": { - "type": "string", - "description": "Use a custom server script. (Use `customServerTarget` instead)", - "x-deprecated": true - }, - "hostname": { - "type": "string", - "description": "Hostname on which the application is served." - }, - "proxyConfig": { - "type": "string", - "description": "Path to the proxy configuration file.", - "x-completion-type": "file" - }, - "buildLibsFromSource": { - "type": "boolean", - "description": "Read buildable libraries from source instead of building them separately.", - "default": true - } - }, - "required": ["buildTarget"], - "presets": [] - }, - "description": "Serve a Next.js application.", - "aliases": [], - "hidden": false, - "path": "/packages/next/src/executors/server/schema.json" - }, - { - "name": "export", - "implementation": "/packages/next/src/executors/export/export.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "title": "Next Export", - "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`.", - "type": "object", - "properties": { - "buildTarget": { - "type": "string", - "description": "Target which builds the application" - }, - "silent": { - "type": "boolean", - "description": "Hide progress or not (default is `false`)", - "default": false - }, - "threads": { - "type": "number", - "description": "Number of worker threads to utilize (defaults to the number of CPUs)" - }, - "buildLibsFromSource": { - "type": "boolean", - "description": "Read buildable libraries from source instead of building them separately.", - "default": true - } - }, - "required": [], - "presets": [] - }, - "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`.", - "aliases": [], - "hidden": false, - "path": "/packages/next/src/executors/export/schema.json" - } - ] -} diff --git a/docs/generated/packages/next/documents/overview.md b/docs/generated/packages/next/documents/overview.md new file mode 100644 index 0000000000000..8b1ead35ce61b --- /dev/null +++ b/docs/generated/packages/next/documents/overview.md @@ -0,0 +1,171 @@ +When using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work. + +The Next.js plugin contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides: + +- Scaffolding for creating, building, serving, linting, and testing Next.js applications. +- Integration with building, serving, and exporting a Next.js application. +- Integration with React libraries within the workspace. + +## Setting up Next.js + +To create a new Nx workspace with Next.js, run `npx create-nx-workspace@latest --preset=next`. + +To add Next.js to an existing Nx workspace, install the `@nrwl/next` package. Make sure to install the version that matches your `@nrwl/workspace` version. + +```shell +#yarn +yarn add --dev @nrwl/next +``` + +```shell +#npm +npm install --save-dev @nrwl/next +``` + +### Creating Applications + +You can add a new application with the following: + +```shell +nx g @nrwl/next:app my-new-app +``` + +### Generating Libraries + +Nx allows you to create libraries with just one command. Some reasons you might want to create a library include: + +- Share code between applications +- Publish a package to be used outside the monorepo +- Better visualize the architecture using `nx graph` + +For more information on Nx libraries, see our documentation on [Creating Libraries](/more-concepts/creating-libraries) +and [Library Types](/more-concepts/library-types). + +To generate a new library run: + +```shell +nx g @nrwl/next:lib my-new-lib +``` + +### Generating Pages and Components + +Nx also provides commands to quickly generate new pages and components for your application. + +```shell +nx g @nrwl/next:page my-new-page --project=my-new-app + +nx g @nrwl/next:component my-new-component --project=my-new-app +``` + +Above commands will add a new page `my-new-page` and a component `my-new-component` to `my-new-app` project respectively. + +Nx generates components with tests by default. For pages, you can pass the `--withTests` option to generate tests under the `specs` folder. + +## Using Next.js + +### Serving Next.js Applications + +You can run `nx serve my-new-app` to serve a Next.js application called `my-new-app` for development. This will start the dev server at http://localhost:4200. + +To serve a Next.js application for production, add the `--prod` flag to the serve command: + +```shell +nx serve my-new-app --prod +``` + +### Using an Nx Library in your Application + +You can import a library called `my-new-lib` in your application as follows. + +```typescript jsx {% fileName="apps/my-next-app/pages/index.tsx" %} +import { MyNewLib } from '@/my-new-lib'; + +export function Index() { + return ( + +

The main content

+
+ ); +} + +export default Index; +``` + +There is no need to build the library prior to using it. When you update your library, the Next.js application will automatically pick up the changes. + +### Publishable libraries + +For libraries intended to be built and published to a registry (e.g. npm) you can use the `--publishable` and `--importPath` options. + +```shell +nx g @nrwl/next:lib my-new-lib --publishable --importPath=@happynrwl/ui-components +``` + +### Testing Projects + +You can run unit tests with: + +```shell +nx test my-new-app +nx test my-new-lib +``` + +Replace `my-new-app` and `my-new-lib` with the name or the project you want to test. This command works for both applications and libraries. + +You can also run E2E tests for applications: + +```shell +nx e2e my-new-app-e2e +``` + +Replace `my-new-app-e2e` with the name or your project with -e2e appended. + +### Linting Projects + +You can lint projects with: + +```shell +nx lint my-new-app +nx lint my-new-lib +``` + +Replace `my-new-app` and `my-new-lib` with the name or the project you want to test. This command works for both applications and libraries. + +### Building Projects + +Next.js applications can be build with: + +```shell +nx build my-new-app +``` + +And if you generated a library with --buildable, then you can build a library as well: + +```shell +nx build my-new-lib +``` + +After running a build, the output will be in the `dist` folder. You can customize the output folder by setting `outputPath` in the project's `project.json` file. + +The library in `dist` is publishable to npm or a private registry. + +### Static HTML Export + +Next.js applications can be statically exported with: + +```shell +nx export my-new-app +``` + +### Deploying Next.js Applications + +Once you are ready to deploy your Next.js application, you have absolute freedom to choose any hosting provider that fits your needs. + +You may know that the company behind Next.js, Vercel, has a great hosting platform offering that is developed in tandem with Next.js itself to offer a great overall developer and user experience. We have detailed [how to deploy your Next.js application to Vercel in a separate guide](/recipes/other/deploy-nextjs-to-vercel). + +## More Documentation + +Here are other resources that you may find useful to learn more about Next.js and Nx. + +- **Blog post:** [Building a blog with Next.js and Nx Series](https://blog.nrwl.io/create-a-next-js-web-app-with-nx-bcf2ab54613) by Juri Strumpflohner +- **Video tutorial:** [Typescript NX Monorepo with NextJS and Express](https://www.youtube.com/watch?v=WOfL5q2HznI) by Jack Herrington diff --git a/docs/generated/packages/next/executors/build.json b/docs/generated/packages/next/executors/build.json new file mode 100644 index 0000000000000..d55195b46264e --- /dev/null +++ b/docs/generated/packages/next/executors/build.json @@ -0,0 +1,66 @@ +{ + "name": "build", + "implementation": "/packages/next/src/executors/build/build.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "title": "Next Build", + "description": "Build a Next.js app.", + "type": "object", + "properties": { + "root": { "description": "The source root", "type": "string" }, + "outputPath": { + "type": "string", + "description": "The output path of the generated files.", + "x-completion-type": "directory" + }, + "fileReplacements": { + "description": "Replace files with other files in the build.", + "type": "array", + "items": { + "type": "object", + "properties": { + "replace": { + "type": "string", + "description": "The file to be replaced.", + "x-completion-type": "file" + }, + "with": { + "type": "string", + "description": "The file to replace with.", + "x-completion-type": "file" + } + }, + "additionalProperties": false, + "required": ["replace", "with"] + }, + "default": [] + }, + "nextConfig": { + "description": "Path (relative to workspace root) to a function which takes phase, config, and builder options, and returns the resulting config. This is an advanced option and should not be used with a normal Next.js config file (i.e. `next.config.js`).", + "type": "string", + "x-completion-type": "file", + "x-completion-glob": "next?(*).js" + }, + "buildLibsFromSource": { + "type": "boolean", + "description": "Read buildable libraries from source instead of building them separately.", + "default": true + }, + "includeDevDependenciesInPackageJson": { + "type": "boolean", + "description": "Include `devDependencies` in the generated package.json file. By default only production `dependencies` are included.", + "default": false + } + }, + "required": ["root", "outputPath"], + "presets": [] + }, + "description": "Build a Next.js application.", + "aliases": [], + "hidden": false, + "path": "/packages/next/src/executors/build/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/next/executors/export.json b/docs/generated/packages/next/executors/export.json new file mode 100644 index 0000000000000..71ce1bd3b9e24 --- /dev/null +++ b/docs/generated/packages/next/executors/export.json @@ -0,0 +1,39 @@ +{ + "name": "export", + "implementation": "/packages/next/src/executors/export/export.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "title": "Next Export", + "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`.", + "type": "object", + "properties": { + "buildTarget": { + "type": "string", + "description": "Target which builds the application" + }, + "silent": { + "type": "boolean", + "description": "Hide progress or not (default is `false`)", + "default": false + }, + "threads": { + "type": "number", + "description": "Number of worker threads to utilize (defaults to the number of CPUs)" + }, + "buildLibsFromSource": { + "type": "boolean", + "description": "Read buildable libraries from source instead of building them separately.", + "default": true + } + }, + "required": [], + "presets": [] + }, + "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`.", + "aliases": [], + "hidden": false, + "path": "/packages/next/src/executors/export/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/next/executors/server.json b/docs/generated/packages/next/executors/server.json new file mode 100644 index 0000000000000..003a9a2b0f82b --- /dev/null +++ b/docs/generated/packages/next/executors/server.json @@ -0,0 +1,68 @@ +{ + "name": "server", + "implementation": "/packages/next/src/executors/server/server.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "title": "Next Serve", + "description": "Serve a Next.js app.", + "type": "object", + "properties": { + "dev": { + "type": "boolean", + "description": "Serve the application in the dev mode.", + "default": true + }, + "buildTarget": { + "type": "string", + "description": "Target which builds the application." + }, + "port": { + "type": "number", + "description": "Port to listen on.", + "default": 4200 + }, + "staticMarkup": { + "type": "boolean", + "description": "Static markup.", + "default": false + }, + "quiet": { + "type": "boolean", + "description": "Hide error messages containing server information.", + "default": false + }, + "customServerTarget": { + "type": "string", + "description": "Target which builds the custom server." + }, + "customServerPath": { + "type": "string", + "description": "Use a custom server script. (Use `customServerTarget` instead)", + "x-deprecated": true + }, + "hostname": { + "type": "string", + "description": "Hostname on which the application is served." + }, + "proxyConfig": { + "type": "string", + "description": "Path to the proxy configuration file.", + "x-completion-type": "file" + }, + "buildLibsFromSource": { + "type": "boolean", + "description": "Read buildable libraries from source instead of building them separately.", + "default": true + } + }, + "required": ["buildTarget"], + "presets": [] + }, + "description": "Serve a Next.js application.", + "aliases": [], + "hidden": false, + "path": "/packages/next/src/executors/server/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/next/generators/application.json b/docs/generated/packages/next/generators/application.json new file mode 100644 index 0000000000000..f87ea7bd4f5a3 --- /dev/null +++ b/docs/generated/packages/next/generators/application.json @@ -0,0 +1,134 @@ +{ + "name": "application", + "factory": "./src/generators/application/application#applicationGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxNextApp", + "title": "Create a Next.js Application for Nx", + "description": "Create a Next.js Application for Nx.", + "type": "object", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the application?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string", + "alias": "d" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "alias": "s", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + } + ] + } + }, + "server": { + "description": "The server script path to be used with next.", + "type": "string" + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipWorkspaceJson": { + "description": "Skip updating `workspace.json` with default options based on values provided to this app (e.g. `babel`, `style`).", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["cypress", "none"], + "description": "Test runner to use for end to end (E2E) tests.", + "default": "cypress" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting).", + "alias": "t" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`", + "type": "boolean" + }, + "swc": { + "description": "Enable the Rust-based compiler SWC to compile JS/TS files.", + "type": "boolean", + "default": true + }, + "customServer": { + "description": "Use a custom Express server for the Next.js application.", + "type": "boolean", + "default": false + } + }, + "required": [], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a directory\" %}\n\n```shell\nnx g app myapp --directory\n```\n\n{% /tab %}\n{% tab label=\"Use a custom Express server\" %}\n\n```shell\nnx g app myapp --custom-server\n```\n\n{% /tab %}\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g app myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create an application.", + "implementation": "/packages/next/src/generators/application/application#applicationGenerator.ts", + "hidden": false, + "path": "/packages/next/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/next/generators/component.json b/docs/generated/packages/next/generators/component.json new file mode 100644 index 0000000000000..9dbb920cdb078 --- /dev/null +++ b/docs/generated/packages/next/generators/component.json @@ -0,0 +1,111 @@ +{ + "name": "component", + "factory": "./src/generators/component/component#componentGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxNextReactComponent", + "title": "Create a React Component for Next", + "description": "Create a React Component for Next.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for this component?" + }, + "name": { + "type": "string", + "description": "The name of the component.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the component?" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "alias": "s", + "default": "css", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + } + ] + } + }, + "skipTests": { + "type": "boolean", + "description": "When true, does not create `spec.ts` test files for the new component.", + "default": false + }, + "directory": { + "type": "string", + "description": "Create the component under this directory (can be nested).", + "alias": "dir" + }, + "export": { + "type": "boolean", + "description": "When true, the component is exported from the project index.ts (if it exists).", + "alias": "e", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "flat": { + "type": "boolean", + "description": "Create component at the source root rather than its own directory.", + "default": false + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. `App.tsx`).", + "alias": "P", + "default": false + }, + "pascalCaseDirectory": { + "type": "boolean", + "description": "Use pascal case directory name (e.g. `App/App.tsx`).", + "alias": "R", + "default": false + } + }, + "required": ["name", "project"], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create an app component\" %}\n\n```shell\nnx g component my-cmp --project=my-app\n```\n\n{% /tab %}\n{% tab label=\"Create a component without its own folder\" %}\n\nRunning the following will create a component under `apps/my-app/components/my-cmp.tsx` rather than `apps/my-app/components/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component my-cmp --directory=foo --flat --project=my-app\n```\n\n{% /tab %}\n{% tab label=\"Create component in a custom directory\" %}\n\nRunning the following will create a component under `apps/my-app/foo/my-cmp.tsx` rather than `apps/my-app/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component my-cmp --directory=foo --flat --project=my-app\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "description": "Create a component.", + "implementation": "/packages/next/src/generators/component/component#componentGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/next/src/generators/component/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/next/generators/custom-server.json b/docs/generated/packages/next/generators/custom-server.json new file mode 100644 index 0000000000000..6248afd847bf4 --- /dev/null +++ b/docs/generated/packages/next/generators/custom-server.json @@ -0,0 +1,37 @@ +{ + "name": "custom-server", + "factory": "./src/generators/custom-server/custom-server#customServerGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxNextCustomServer", + "title": "Add custom server", + "description": "Add a custom server to existing Next.js application.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "argv", "index": 0 }, + "x-dropdown": "project", + "x-prompt": "What is the name of the project to set up a custom server for?" + }, + "compiler": { + "type": "string", + "enum": ["tsc", "swc"], + "default": "tsc", + "description": "The compiler used to build the custom server." + } + }, + "required": ["project"], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Add a custom server to existing app\" %}\n\n```shell\nnx g custom-server my-app\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "description": "Set up a custom server.", + "implementation": "/packages/next/src/generators/custom-server/custom-server#customServerGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/next/src/generators/custom-server/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/next/generators/init.json b/docs/generated/packages/next/generators/init.json new file mode 100644 index 0000000000000..2e31c64868b31 --- /dev/null +++ b/docs/generated/packages/next/generators/init.json @@ -0,0 +1,44 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#nextInitGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxNextNgInit", + "title": "Init Next Plugin", + "description": "Init Next Plugin.", + "type": "object", + "properties": { + "unitTestRunner": { + "description": "Adds the specified unit test runner.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "e2eTestRunner": { + "description": "Adds the specified e2e test runner.", + "type": "string", + "enum": ["cypress", "none"], + "default": "cypress" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "js": { + "type": "boolean", + "default": false, + "description": "Use JavaScript instead of TypeScript" + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/next` plugin.", + "hidden": true, + "implementation": "/packages/next/src/generators/init/init#nextInitGenerator.ts", + "aliases": [], + "path": "/packages/next/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/next/generators/library.json b/docs/generated/packages/next/generators/library.json new file mode 100644 index 0000000000000..b7428e3dd224b --- /dev/null +++ b/docs/generated/packages/next/generators/library.json @@ -0,0 +1,158 @@ +{ + "name": "library", + "factory": "./src/generators/library/library#libraryGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactLibrary", + "title": "Create a React Library for Nx", + "description": "Create a React Library for an Nx workspace.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Library name", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "type": "string", + "description": "A directory where the lib is placed.", + "alias": "dir" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "alias": "s", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + }, + { "value": "none", "label": "None" } + ] + } + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting).", + "alias": "t" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update tsconfig.json for development experience." + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. `App.tsx`).", + "alias": "P", + "default": false + }, + "routing": { + "type": "boolean", + "description": "Generate library with routes." + }, + "appProject": { + "type": "string", + "description": "The application project to add the library route to.", + "alias": "a" + }, + "publishable": { + "type": "boolean", + "description": "Create a publishable library." + }, + "buildable": { + "type": "boolean", + "default": false, + "description": "Generate a buildable library." + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like `@myorg/my-awesome-lib`." + }, + "component": { + "type": "boolean", + "description": "Generate a default component.", + "default": true + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "globalCss": { + "type": "boolean", + "description": "When true, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Whether to enable tsconfig strict mode or not.", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`", + "type": "boolean" + } + }, + "required": ["name"], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create a new lib\" %}\n\n```shell\nnx g lib my-lib\n```\n\n{% /tab %}\n{% tab label=\"Create a new lib under a directory\" %}\n\nThe following will create a library at `libs/shared/my-lib`.\n\n```shell\nnx g lib my-lib --directory=shared\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Create a library.", + "implementation": "/packages/next/src/generators/library/library#libraryGenerator.ts", + "hidden": false, + "path": "/packages/next/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/next/generators/page.json b/docs/generated/packages/next/generators/page.json new file mode 100644 index 0000000000000..188901dc0e5f2 --- /dev/null +++ b/docs/generated/packages/next/generators/page.json @@ -0,0 +1,100 @@ +{ + "name": "page", + "factory": "./src/generators/page/page#pageGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxNextReactPage", + "title": "Create a Page for Next", + "description": "Create a Page for Next.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for this component?" + }, + "name": { + "type": "string", + "description": "The name of the component.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the component?" + }, + "directory": { + "type": "string", + "description": "Create the page under this directory (can be nested). Will be created under `pages/`.", + "alias": "dir" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "alias": "s", + "default": "css", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + }, + { "value": "none", "label": "None" } + ] + } + }, + "withTests": { + "type": "boolean", + "description": "When true, creates a `spec.ts` test file for the new page.", + "default": false + }, + "export": { + "type": "boolean", + "description": "When true, the component is exported from the project `index.ts` (if it exists).", + "alias": "e", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "flat": { + "type": "boolean", + "description": "Create component at the source root rather than its own directory.", + "default": false + } + }, + "required": ["name", "project"], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create static page in an app\" %}\n\n```shell\nnx g page my-page --project=my-app\n```\n\n{% /tab %}\n{% tab label=\"Create dynamic page in an app\" %}\n\nThe following creates a page under `apps/my-app/pages/products/[id].tsx`.\n\n```shell\nnx g page \"[id]\" --project=my-app --directory=products\n```\n\n{% /tab %}\n\n{% /tabs %}\n", + "presets": [] + }, + "description": "Create a page.", + "implementation": "/packages/next/src/generators/page/page#pageGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/next/src/generators/page/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/node.json b/docs/generated/packages/node.json deleted file mode 100644 index 60f0eee92dd4c..0000000000000 --- a/docs/generated/packages/node.json +++ /dev/null @@ -1,636 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "node", - "packageName": "@nrwl/node", - "description": "The Node Plugin for Nx contains generators and executors to manage Node applications within an Nx workspace.", - "root": "/packages/node", - "source": "/packages/node/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/node", - "file": "shared/node-plugin", - "content": "The Node Plugin contains generators and executors to manage Node applications within an Nx workspace. It provides:\n\n## Setting Up Node\n\nTo add the Node plugin to an existing workspace, run one of the following:\n\n```shell\n# For npm users\nnpm install -D @nrwl/node\n\n# For yarn users\nyarn add -D @nrwl/node\n```\n\n### Creating Applications\n\nYou can add a new application with the following:\n\n```shell\nnx g @nrwl/node:application my-new-app\n```\n\nYou can run your application with `nx serve my-new-app`, which starts it in watch mode.\n\n### Creating Libraries\n\nNode libraries are a good way to separate features within your organization. To create a Node library run the following command:\n\n```shell\nnx g @nrwl/node:lib my-new-lib\n\n# If you want the library to be buildable or publishable to npm\nnx g @nrwl/node:lib my-new-lib --buildable\nnx g @nrwl/node:lib my-new-lib \\\n--publishable \\\n--importPath=@myorg/my-new-lib\n```\n\n## Using Node\n\n### Testing Projects\n\nYou can run unit tests with:\n\n```shell\nnx test my-new-app\nnx test my-new-lib\n```\n\nReplace `my-new-app` with the name or your project. This command works for both applications and libraries.\n\n### Building Projects\n\nNode applications can be build with:\n\n```shell\nnx build my-new-app\n```\n\nAnd if you generated a library with `--buildable`, then you can build a library as well:\n\n```shell\nnx build my-new-lib\n```\n\nThe output is in the `dist` folder. You can customize the output folder by setting `outputPath` in the project's `project.json` file.\n\n### Application Proxies\n\nGenerating Node applications has an option to configure other projects in the workspace to proxy API requests. This can be done by passing the `--frontendProject` with the project name you wish to enable proxy support for.\n\n```shell\nnx g @nrwl/node:application my-new-app \\\n--frontendProject my-react-app\n```\n\n### Debugging\n\nDebugging is set to use a random port that is available on the system. The port can be changed by setting the port option in the `serve` architect in the project.json. Or by running the serve command with `--port `.\n\nFor additional information on how to debug Node applications, see the [Node.js debugging getting started guide](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients).\n\n## More Documentation\n\n- [Using Cypress](/packages/cypress)\n- [Using Jest](/packages/jest)\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxNodeInit", - "title": "Init Node Plugin", - "description": "Init Node Plugin.", - "type": "object", - "properties": { - "unitTestRunner": { - "description": "Adds the specified unit test runner.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "js": { - "type": "boolean", - "default": false, - "description": "Use JavaScript instead of TypeScript" - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/node` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/node/src/generators/init/init.ts", - "path": "/packages/node/src/generators/init/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "SchematicsNxNodeApp", - "title": "Nx Application Options Schema", - "description": "Nx Application Options Schema.", - "type": "object", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the node application?" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "skipFormat": { - "description": "Skip formatting files", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting)." - }, - "frontendProject": { - "type": "string", - "description": "Frontend project that needs to access this application. This sets up proxy configuration." - }, - "babelJest": { - "type": "boolean", - "description": "Use `babel` instead of `ts-jest`.", - "default": false - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case file names.", - "alias": "P", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - } - }, - "required": [], - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create a node application.", - "implementation": "/packages/node/src/generators/application/application.ts", - "hidden": false, - "path": "/packages/node/src/generators/application/schema.json" - }, - { - "name": "library", - "factory": "./src/generators/library/library", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxNodeLibrary", - "title": "Create a Node Library for Nx", - "description": "Create a Node Library for an Nx workspace.", - "type": "object", - "examples": [ - { - "command": "nx g lib mylib --directory=myapp", - "description": "Generate `libs/myapp/mylib`" - } - ], - "properties": { - "name": { - "type": "string", - "description": "Library name", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?" - }, - "directory": { - "type": "string", - "description": "A directory where the lib is placed", - "alias": "dir" - }, - "simpleModuleName": { - "description": "Keep the module name simple (when using `--directory`).", - "type": "boolean", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting).", - "alias": "t" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update `tsconfig.base.json` for development experience." - }, - "publishable": { - "type": "boolean", - "description": "Create a publishable library." - }, - "buildable": { - "type": "boolean", - "default": false, - "description": "Generate a buildable library." - }, - "compiler": { - "type": "string", - "enum": ["tsc", "swc"], - "default": "tsc", - "description": "The compiler used by the build and test targets." - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like `@myorg/my-awesome-lib`. Must be a valid npm name." - }, - "rootDir": { - "type": "string", - "description": "Sets the `rootDir` for TypeScript compilation. When not defined, it uses the project's root property, or `srcRootForCompilationRoot` if it is defined." - }, - "testEnvironment": { - "type": "string", - "enum": ["jsdom", "node"], - "description": "The test environment to use if `unitTestRunner` is set to `jest`.", - "default": "jsdom" - }, - "babelJest": { - "type": "boolean", - "description": "Use `babel` instead of `ts-jest`.", - "default": false - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case file names.", - "alias": "P", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Whether to enable tsconfig strict mode or not.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project`. We do not do this by default for lint performance reasons.", - "default": false - } - }, - "required": ["name"], - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Create a node library.", - "implementation": "/packages/node/src/generators/library/library.ts", - "hidden": false, - "path": "/packages/node/src/generators/library/schema.json" - } - ], - "executors": [ - { - "name": "webpack", - "implementation": "/packages/node/src/executors/webpack/webpack.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Node Application Build Target", - "description": "Node application build target options for Build Facade.", - "cli": "nx", - "type": "object", - "properties": { - "main": { - "type": "string", - "description": "The name of the main entry-point file.", - "x-completion-type": "file", - "x-completion-glob": "main@(.js|.ts)" - }, - "tsConfig": { - "type": "string", - "description": "The name of the Typescript configuration file.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "outputPath": { - "type": "string", - "description": "The output path of the generated files.", - "x-completion-type": "directory" - }, - "deleteOutputPath": { - "type": "boolean", - "description": "Delete the output path before building.", - "default": true - }, - "watch": { - "type": "boolean", - "description": "Run build when files change.", - "default": false - }, - "watchOptions": { - "type": "object", - "description": "A set of options used to customize watch mode.", - "properties": { - "aggregateTimeout": { "type": "integer" }, - "ignored": { - "oneOf": [ - { "type": "array", "items": { "type": "string" } }, - { "type": "string" } - ] - }, - "poll": { "type": "integer" }, - "followSymlinks": { "type": "boolean" }, - "stdin": { "type": "boolean" } - } - }, - "poll": { - "type": "number", - "description": "Frequency of file watcher in ms." - }, - "sourceMap": { - "type": "boolean", - "description": "Produce source maps.", - "default": true - }, - "progress": { - "type": "boolean", - "description": "Log progress to the console while building.", - "default": false - }, - "assets": { - "type": "array", - "description": "List of static application assets.", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply `glob`. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "externalDependencies": { - "oneOf": [ - { "type": "string", "enum": ["none", "all"] }, - { "type": "array", "items": { "type": "string" } } - ], - "description": "Dependencies to keep external to the bundle. (`all` (default), `none`, or an array of module names)", - "default": "all" - }, - "statsJson": { - "type": "boolean", - "description": "Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or ``.", - "default": false - }, - "verbose": { - "type": "boolean", - "description": "Emits verbose output", - "default": false - }, - "extractLicenses": { - "type": "boolean", - "description": "Extract all licenses in a separate file, in the case of production builds only.", - "default": false - }, - "optimization": { - "type": "boolean", - "description": "Defines the optimization level of the build.", - "default": false - }, - "maxWorkers": { - "type": "number", - "description": "Number of workers to use for type checking. (defaults to # of CPUS)" - }, - "memoryLimit": { - "type": "number", - "description": "Memory limit for type checking service process in MB. (defaults to `2048`)", - "default": 2048 - }, - "fileReplacements": { - "description": "Replace files with other files in the build.", - "type": "array", - "items": { - "type": "object", - "properties": { - "replace": { - "type": "string", - "description": "The file to be replaced.", - "x-completion-type": "file" - }, - "with": { - "type": "string", - "description": "The file to replace with.", - "x-completion-type": "file" - } - }, - "additionalProperties": false, - "required": ["replace", "with"] - }, - "default": [] - }, - "webpackConfig": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string", - "x-completion-type": "file", - "x-completion-glob": "webpack?(*)@(.js|.ts)" - } - }, - { - "type": "string", - "x-completion-type": "file", - "x-completion-glob": "webpack?(*)@(.js|.ts)" - } - ], - "description": "Path to a function which takes a webpack config, context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack" - }, - "buildLibsFromSource": { - "type": "boolean", - "description": "Read buildable libraries from source instead of building them separately.", - "default": true - }, - "generatePackageJson": { - "type": "boolean", - "description": "Generates a `package.json` and pruned lock file with the project's `node_module` dependencies populated for installing in a container. If a `package.json` exists in the project's directory, it will be reused with dependencies populated.", - "default": false - }, - "transformers": { - "type": "array", - "description": "List of TypeScript Compiler Transfomers Plugins.", - "default": [], - "aliases": ["tsPlugins"], - "items": { - "oneOf": [ - { "type": "string" }, - { - "type": "object", - "properties": { - "name": { "type": "string" }, - "options": { - "type": "object", - "additionalProperties": true - } - }, - "additionalProperties": false, - "required": ["name"] - } - ] - } - }, - "additionalEntryPoints": { - "type": "array", - "items": { - "type": "object", - "properties": { - "entryName": { - "type": "string", - "description": "Name of the additional entry file." - }, - "entryPath": { - "type": "string", - "description": "Path to the additional entry file.", - "x-completion-type": "file", - "x-completion-glob": "**/*@(.js|.ts)" - } - } - } - }, - "outputFileName": { - "type": "string", - "description": "Name of the main output file. (defaults to `main.js`)", - "default": "main.js" - } - }, - "required": ["tsConfig", "main"], - "definitions": { - "assetPattern": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply `glob`. Defaults to the project root." - }, - "ignore": { - "description": "An array of globs to ignore.", - "type": "array", - "items": { "type": "string" } - }, - "output": { - "type": "string", - "description": "Absolute path within the output." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - }, - "transformerPattern": { - "oneOf": [ - { "type": "string" }, - { - "type": "object", - "properties": { - "name": { "type": "string" }, - "options": { "type": "object", "additionalProperties": true } - }, - "additionalProperties": false, - "required": ["name"] - } - ] - } - }, - "presets": [] - }, - "description": "Build a Node application using Webpack.", - "aliases": [], - "hidden": false, - "path": "/packages/node/src/executors/webpack/schema.json" - }, - { - "name": "node", - "implementation": "/packages/node/src/executors/node/node.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "title": "Node executor", - "description": "Execute Nodejs applications.", - "type": "object", - "properties": { - "buildTarget": { - "type": "string", - "description": "The target to run to build you the app." - }, - "buildTargetOptions": { - "type": "object", - "description": "Additional options to pass into the build target.", - "default": {} - }, - "waitUntilTargets": { - "type": "array", - "description": "The targets to run to before starting the node app.", - "default": [], - "items": { "type": "string" } - }, - "host": { - "type": "string", - "default": "localhost", - "description": "The host to inspect the process on." - }, - "port": { - "type": "number", - "default": 9229, - "description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes." - }, - "inspect": { - "oneOf": [ - { "type": "string", "enum": ["inspect", "inspect-brk"] }, - { "type": "boolean" } - ], - "description": "Ensures the app is starting with debugging.", - "default": "inspect" - }, - "runtimeArgs": { - "type": "array", - "description": "Extra args passed to the node process.", - "default": [], - "items": { "type": "string" } - }, - "args": { - "type": "array", - "description": "Extra args when starting the app.", - "default": [], - "items": { "type": "string" } - }, - "watch": { - "type": "boolean", - "description": "Enable re-building when files change.", - "default": true - } - }, - "additionalProperties": false, - "required": ["buildTarget"], - "presets": [] - }, - "description": "Execute a Node application.", - "aliases": [], - "hidden": false, - "path": "/packages/node/src/executors/node/schema.json" - } - ] -} diff --git a/docs/generated/packages/node/documents/overview.md b/docs/generated/packages/node/documents/overview.md new file mode 100644 index 0000000000000..c0ef1939d0ec6 --- /dev/null +++ b/docs/generated/packages/node/documents/overview.md @@ -0,0 +1,86 @@ +The Node Plugin contains generators and executors to manage Node applications within an Nx workspace. It provides: + +## Setting Up Node + +To add the Node plugin to an existing workspace, run one of the following: + +```shell +# For npm users +npm install -D @nrwl/node + +# For yarn users +yarn add -D @nrwl/node +``` + +### Creating Applications + +You can add a new application with the following: + +```shell +nx g @nrwl/node:application my-new-app +``` + +You can run your application with `nx serve my-new-app`, which starts it in watch mode. + +### Creating Libraries + +Node libraries are a good way to separate features within your organization. To create a Node library run the following command: + +```shell +nx g @nrwl/node:lib my-new-lib + +# If you want the library to be buildable or publishable to npm +nx g @nrwl/node:lib my-new-lib --buildable +nx g @nrwl/node:lib my-new-lib \ +--publishable \ +--importPath=@myorg/my-new-lib +``` + +## Using Node + +### Testing Projects + +You can run unit tests with: + +```shell +nx test my-new-app +nx test my-new-lib +``` + +Replace `my-new-app` with the name or your project. This command works for both applications and libraries. + +### Building Projects + +Node applications can be build with: + +```shell +nx build my-new-app +``` + +And if you generated a library with `--buildable`, then you can build a library as well: + +```shell +nx build my-new-lib +``` + +The output is in the `dist` folder. You can customize the output folder by setting `outputPath` in the project's `project.json` file. + +### Application Proxies + +Generating Node applications has an option to configure other projects in the workspace to proxy API requests. This can be done by passing the `--frontendProject` with the project name you wish to enable proxy support for. + +```shell +nx g @nrwl/node:application my-new-app \ +--frontendProject my-react-app +``` + +### Debugging + +Debugging is set to use a random port that is available on the system. The port can be changed by setting the port option in the `serve` architect in the project.json. Or by running the serve command with `--port `. + +For additional information on how to debug Node applications, see the [Node.js debugging getting started guide](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients). + +## More Documentation + +- [Using Cypress](/packages/cypress) +- [Using Jest](/packages/jest) diff --git a/docs/generated/packages/node/executors/node.json b/docs/generated/packages/node/executors/node.json new file mode 100644 index 0000000000000..39e396e4efa3d --- /dev/null +++ b/docs/generated/packages/node/executors/node.json @@ -0,0 +1,73 @@ +{ + "name": "node", + "implementation": "/packages/node/src/executors/node/node.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "title": "Node executor", + "description": "Execute Nodejs applications.", + "type": "object", + "properties": { + "buildTarget": { + "type": "string", + "description": "The target to run to build you the app." + }, + "buildTargetOptions": { + "type": "object", + "description": "Additional options to pass into the build target.", + "default": {} + }, + "waitUntilTargets": { + "type": "array", + "description": "The targets to run to before starting the node app.", + "default": [], + "items": { "type": "string" } + }, + "host": { + "type": "string", + "default": "localhost", + "description": "The host to inspect the process on." + }, + "port": { + "type": "number", + "default": 9229, + "description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes." + }, + "inspect": { + "oneOf": [ + { "type": "string", "enum": ["inspect", "inspect-brk"] }, + { "type": "boolean" } + ], + "description": "Ensures the app is starting with debugging.", + "default": "inspect" + }, + "runtimeArgs": { + "type": "array", + "description": "Extra args passed to the node process.", + "default": [], + "items": { "type": "string" } + }, + "args": { + "type": "array", + "description": "Extra args when starting the app.", + "default": [], + "items": { "type": "string" } + }, + "watch": { + "type": "boolean", + "description": "Enable re-building when files change.", + "default": true + } + }, + "additionalProperties": false, + "required": ["buildTarget"], + "presets": [] + }, + "description": "Execute a Node application.", + "aliases": [], + "hidden": false, + "path": "/packages/node/src/executors/node/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/node/executors/webpack.json b/docs/generated/packages/node/executors/webpack.json new file mode 100644 index 0000000000000..f9864a34238ed --- /dev/null +++ b/docs/generated/packages/node/executors/webpack.json @@ -0,0 +1,287 @@ +{ + "name": "webpack", + "implementation": "/packages/node/src/executors/webpack/webpack.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Node Application Build Target", + "description": "Node application build target options for Build Facade.", + "cli": "nx", + "type": "object", + "properties": { + "main": { + "type": "string", + "description": "The name of the main entry-point file.", + "x-completion-type": "file", + "x-completion-glob": "main@(.js|.ts)" + }, + "tsConfig": { + "type": "string", + "description": "The name of the Typescript configuration file.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "outputPath": { + "type": "string", + "description": "The output path of the generated files.", + "x-completion-type": "directory" + }, + "deleteOutputPath": { + "type": "boolean", + "description": "Delete the output path before building.", + "default": true + }, + "watch": { + "type": "boolean", + "description": "Run build when files change.", + "default": false + }, + "watchOptions": { + "type": "object", + "description": "A set of options used to customize watch mode.", + "properties": { + "aggregateTimeout": { "type": "integer" }, + "ignored": { + "oneOf": [ + { "type": "array", "items": { "type": "string" } }, + { "type": "string" } + ] + }, + "poll": { "type": "integer" }, + "followSymlinks": { "type": "boolean" }, + "stdin": { "type": "boolean" } + } + }, + "poll": { + "type": "number", + "description": "Frequency of file watcher in ms." + }, + "sourceMap": { + "type": "boolean", + "description": "Produce source maps.", + "default": true + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building.", + "default": false + }, + "assets": { + "type": "array", + "description": "List of static application assets.", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply `glob`. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "externalDependencies": { + "oneOf": [ + { "type": "string", "enum": ["none", "all"] }, + { "type": "array", "items": { "type": "string" } } + ], + "description": "Dependencies to keep external to the bundle. (`all` (default), `none`, or an array of module names)", + "default": "all" + }, + "statsJson": { + "type": "boolean", + "description": "Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or ``.", + "default": false + }, + "verbose": { + "type": "boolean", + "description": "Emits verbose output", + "default": false + }, + "extractLicenses": { + "type": "boolean", + "description": "Extract all licenses in a separate file, in the case of production builds only.", + "default": false + }, + "optimization": { + "type": "boolean", + "description": "Defines the optimization level of the build.", + "default": false + }, + "maxWorkers": { + "type": "number", + "description": "Number of workers to use for type checking. (defaults to # of CPUS)" + }, + "memoryLimit": { + "type": "number", + "description": "Memory limit for type checking service process in MB. (defaults to `2048`)", + "default": 2048 + }, + "fileReplacements": { + "description": "Replace files with other files in the build.", + "type": "array", + "items": { + "type": "object", + "properties": { + "replace": { + "type": "string", + "description": "The file to be replaced.", + "x-completion-type": "file" + }, + "with": { + "type": "string", + "description": "The file to replace with.", + "x-completion-type": "file" + } + }, + "additionalProperties": false, + "required": ["replace", "with"] + }, + "default": [] + }, + "webpackConfig": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "x-completion-type": "file", + "x-completion-glob": "webpack?(*)@(.js|.ts)" + } + }, + { + "type": "string", + "x-completion-type": "file", + "x-completion-glob": "webpack?(*)@(.js|.ts)" + } + ], + "description": "Path to a function which takes a webpack config, context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack" + }, + "buildLibsFromSource": { + "type": "boolean", + "description": "Read buildable libraries from source instead of building them separately.", + "default": true + }, + "generatePackageJson": { + "type": "boolean", + "description": "Generates a `package.json` and pruned lock file with the project's `node_module` dependencies populated for installing in a container. If a `package.json` exists in the project's directory, it will be reused with dependencies populated.", + "default": false + }, + "transformers": { + "type": "array", + "description": "List of TypeScript Compiler Transfomers Plugins.", + "default": [], + "aliases": ["tsPlugins"], + "items": { + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "options": { "type": "object", "additionalProperties": true } + }, + "additionalProperties": false, + "required": ["name"] + } + ] + } + }, + "additionalEntryPoints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entryName": { + "type": "string", + "description": "Name of the additional entry file." + }, + "entryPath": { + "type": "string", + "description": "Path to the additional entry file.", + "x-completion-type": "file", + "x-completion-glob": "**/*@(.js|.ts)" + } + } + } + }, + "outputFileName": { + "type": "string", + "description": "Name of the main output file. (defaults to `main.js`)", + "default": "main.js" + } + }, + "required": ["tsConfig", "main"], + "definitions": { + "assetPattern": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply `glob`. Defaults to the project root." + }, + "ignore": { + "description": "An array of globs to ignore.", + "type": "array", + "items": { "type": "string" } + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + }, + "transformerPattern": { + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "options": { "type": "object", "additionalProperties": true } + }, + "additionalProperties": false, + "required": ["name"] + } + ] + } + }, + "presets": [] + }, + "description": "Build a Node application using Webpack.", + "aliases": [], + "hidden": false, + "path": "/packages/node/src/executors/webpack/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/node/generators/application.json b/docs/generated/packages/node/generators/application.json new file mode 100644 index 0000000000000..acf273ceb34d7 --- /dev/null +++ b/docs/generated/packages/node/generators/application.json @@ -0,0 +1,88 @@ +{ + "name": "application", + "factory": "./src/generators/application/application", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "SchematicsNxNodeApp", + "title": "Nx Application Options Schema", + "description": "Nx Application Options Schema.", + "type": "object", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the node application?" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "skipFormat": { + "description": "Skip formatting files", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting)." + }, + "frontendProject": { + "type": "string", + "description": "Frontend project that needs to access this application. This sets up proxy configuration." + }, + "babelJest": { + "type": "boolean", + "description": "Use `babel` instead of `ts-jest`.", + "default": false + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case file names.", + "alias": "P", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + } + }, + "required": [], + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create a node application.", + "implementation": "/packages/node/src/generators/application/application.ts", + "hidden": false, + "path": "/packages/node/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/node/generators/init.json b/docs/generated/packages/node/generators/init.json new file mode 100644 index 0000000000000..f135c0177c240 --- /dev/null +++ b/docs/generated/packages/node/generators/init.json @@ -0,0 +1,38 @@ +{ + "name": "init", + "factory": "./src/generators/init/init", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxNodeInit", + "title": "Init Node Plugin", + "description": "Init Node Plugin.", + "type": "object", + "properties": { + "unitTestRunner": { + "description": "Adds the specified unit test runner.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "js": { + "type": "boolean", + "default": false, + "description": "Use JavaScript instead of TypeScript" + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/node` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/node/src/generators/init/init.ts", + "path": "/packages/node/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/node/generators/library.json b/docs/generated/packages/node/generators/library.json new file mode 100644 index 0000000000000..0be5172e7fc23 --- /dev/null +++ b/docs/generated/packages/node/generators/library.json @@ -0,0 +1,131 @@ +{ + "name": "library", + "factory": "./src/generators/library/library", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxNodeLibrary", + "title": "Create a Node Library for Nx", + "description": "Create a Node Library for an Nx workspace.", + "type": "object", + "examples": [ + { + "command": "nx g lib mylib --directory=myapp", + "description": "Generate `libs/myapp/mylib`" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Library name", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?" + }, + "directory": { + "type": "string", + "description": "A directory where the lib is placed", + "alias": "dir" + }, + "simpleModuleName": { + "description": "Keep the module name simple (when using `--directory`).", + "type": "boolean", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting).", + "alias": "t" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update `tsconfig.base.json` for development experience." + }, + "publishable": { + "type": "boolean", + "description": "Create a publishable library." + }, + "buildable": { + "type": "boolean", + "default": false, + "description": "Generate a buildable library." + }, + "compiler": { + "type": "string", + "enum": ["tsc", "swc"], + "default": "tsc", + "description": "The compiler used by the build and test targets." + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like `@myorg/my-awesome-lib`. Must be a valid npm name." + }, + "rootDir": { + "type": "string", + "description": "Sets the `rootDir` for TypeScript compilation. When not defined, it uses the project's root property, or `srcRootForCompilationRoot` if it is defined." + }, + "testEnvironment": { + "type": "string", + "enum": ["jsdom", "node"], + "description": "The test environment to use if `unitTestRunner` is set to `jest`.", + "default": "jsdom" + }, + "babelJest": { + "type": "boolean", + "description": "Use `babel` instead of `ts-jest`.", + "default": false + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case file names.", + "alias": "P", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Whether to enable tsconfig strict mode or not.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project`. We do not do this by default for lint performance reasons.", + "default": false + } + }, + "required": ["name"], + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Create a node library.", + "implementation": "/packages/node/src/generators/library/library.ts", + "hidden": false, + "path": "/packages/node/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nx-plugin.json b/docs/generated/packages/nx-plugin.json deleted file mode 100644 index 26568ced6fdfa..0000000000000 --- a/docs/generated/packages/nx-plugin.json +++ /dev/null @@ -1,570 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "nx-plugin", - "packageName": "@nrwl/nx-plugin", - "description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.", - "root": "/packages/nx-plugin", - "source": "/packages/nx-plugin/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/nx-plugin", - "file": "shared/nx-plugin", - "content": "Nx plugins are npm packages that contain generators and executors to extend a Nx workspace. Generators are blueprints to create new files from templates, and executors run those files. These plugins also update the `nx.json` when generating new libs or apps.\n\n> A list of plugins that is maintained by Nrwl is found in the [Nrwl/nx repo](https://github.com/nrwl/nx/tree/master/packages). \\\n> A list of custom plugins created by the community is found in the [Community](/community) section.\n> Plugins are written using Nx Devkit. **Read [Nx Devkit](/devkit/index) for more information.**\n\n{% youtube\nsrc=\"https://www.youtube.com/embed/fC1-4fAZDP4\"\ntitle=\"Nx Tutorial: Building Custom Plugins for Nx\"\nwidth=\"100%\" /%}\n\n> For a detailed video explaining the things covered here and more, check out [Creating and Publishing Your Own Nx Plugin](https://www.youtube.com/watch?v=vVT7Al01VZc).\n\n## Generating a Plugin\n\nTo get started with building a Nx Plugin, run the following command:\n\n```shell\nnpx create-nx-plugin my-org --pluginName my-plugin\n```\n\nThis command creates a brand-new workspace, and sets up a pre-configured plugin with the specified name.\n\n> Note, the command above will create a plugin the package name set to `@my-org/my-plugin`. You can pass `--importPath` to provide a different package name.\n\n> If you do not want to create a new workspace, install the `@nrwl/nx-plugin` dependency in an already existing workspace with npm or yarn. Then run `nx g @nrwl/nx-plugin:plugin [pluginName]`.\n\nA new plugin is created with a default generator, executor, and e2e app.\n\n## Generator\n\nThe created generator contains boilerplate that will do the following:\n\n- Normalize a schema (the options that the generator accepts)\n- Update the `project.json`\n- Add the plugin's project to the `nx.json` file\n- Add files to the disk using templates\n\nThere will be an exported default function that will be the main entry for the generator.\n\n### Generator options\n\nThe `schema.d.ts` file contains all the options that the generator supports. By default, it includes `directory`, `tags`, and `name` as the options. If more options need to be added, please update this file and the `schema.json` file.\n\n{% callout type=\"note\" title=\"More details\" %}\nThe `schema.d.ts` file is used for type checking inside the implementation file. It should match the properties in `schema.json`.\n{% /callout %}\n\n### Adding more generators\n\nTo add more generators to the plugin, run the following command:\n`nx generate @nrwl/nx-plugin:generator [generatorName] --project=[pluginName]`.\n\nThis will scaffold out a new generator and update the necessary files to support it.\n\n### Generator Testing\n\nThe generator spec file includes boilerplate to help get started with testing. This includes setting up an empty workspace.\n\nThese tests should ensure that files within the tree (created with `createTreeWithEmptyWorkspace`) are in the correct place, and contain the right content.\n\nFull E2Es are supported (and recommended) and will run everything on the file system like a user would.\n\n## Executor\n\nThe default executor is set up to just emit a console log. Some examples of what an executor can do are:\n\n- Support different languages, (Java, Go, Python, C#)\n- Compile new UI framework components\n- Deploy an app on a CDN\n- Publish to NPM\n- and many more!\n\n### Adding more executors\n\nTo add more executors to the plugin, run the following command:\n`nx generate @nrwl/nx-plugin:executor [executor] --project=[pluginName]`.\n\nThis will scaffold out a new generator and update the necessary files to support it.\n\n### Executor testing\n\nThe executor spec file contains boilerplate to run the default exported function from the executor.\n\nThese tests should make sure that the executor is executing and calling the functions that it relies on.\n\nFull E2Es are supported (and recommended) and will run everything on the file system like a user would.\n\n## Testing your plugin\n\nOne of the biggest benefits that the Nx Plugin package provides is support for E2E and unit testing.\n\nWhen the E2E app runs, a temporary E2E directory is created in the root of the workspace. This directory is a blank Nx workspace, and will have the plugin's built package installed locally.\n\n### E2E Testing file\n\nWhen the plugin is generated, a test file is created in the `my-plugin-e2e` app. Inside this test file, there are already tests for making sure that the executor ran, checking if directories are created with the `--directory` option, and checking if tags are added to the project configuration.\n\nWe'll go over a few parts of a test file below:\n\n```typescript\nit('should create my-plugin', async (done) => {\n const plugin = uniq('my-plugin');\n ensureNxProject('@my-org/my-plugin', 'dist/packages/my-plugin');\n await runNxCommandAsync(`generate @my-org/my-plugin:myPlugin ${plugin}`);\n\n const result = await runNxCommandAsync(`build ${plugin}`);\n expect(result.stdout).toContain('Executor ran');\n\n done();\n});\n```\n\n- The `uniq` function creates a random name with the prefix and a random number.\n- The `ensureNxProject` is the function that will create the temporary directory. It takes two arguments, the plugin package name and the dist directory of when it's built.\n- The `runNxCommandAsync` will execute a `nx` command in the E2E directory.\n\nThere are additional functions that the `@nrwl/nx-plugin/testing` package exports. Most of them are file utilities to manipulate and read files in the E2E directory.\n\n## Including Assets\n\nSometimes you might want to include some assets with the plugin. This might be a image or some additional binaries.\n\nTo make sure that assets are copied to the dist folder, open the plugin's `project.json` file. Inside the `build` property, add additional assets. By default, all `.md` files in the root, all non-ts files in folders, and the `generators.json` and `executors.json` files are included.\n\n```jsonc {% fileName=\"project.json\" %}\n\"build\": {\n \"executor\": \"@nrwl/node:package\",\n \"options\": {\n // shortened...\n \"assets\": [\n \"packages/my-plugin/*.md\",\n {\n \"input\": \"./packages/my-plugin/src\",\n \"glob\": \"**/*.!(ts)\",\n \"output\": \"./src\"\n },\n {\n \"input\": \"./packages/my-plugin\",\n \"glob\": \"generators.json\",\n \"output\": \".\"\n },\n {\n \"input\": \"./packages/my-plugin\",\n \"glob\": \"executors.json\",\n \"output\": \".\"\n }\n ]\n }\n}\n```\n\n## Using your Nx Plugin\n\nTo use your plugin, simply list it in `nx.json` or use its generators and executors as you would for any other plugin. This could look like `nx g @my-org/my-plugin:lib` for generators or `\"executor\": \"@my-org/my-plugin:build\"` for executors. It should be usable in all of the same ways as published plugins in your local workspace immediately after generating it. This includes setting it up as the default collection in `nx.json`, which would allow you to run `nx g lib` and hit your plugin's generator.\n\n## Publishing your Nx Plugin\n\nIn order to use your plugin in other workspaces or share it with the community, you will need to publish it to an npm registry. To publish your plugin follow these steps:\n\n1. Build your plugin with the command `nx run my-plugin:build`\n1. `npm publish ./dist/package/my-plugin` and follow the prompts from npm.\n1. That's it!\n\n{% callout type=\"warning\" title=\"Version bump\" %}\nCurrently you will have to modify the `package.json` version by yourself or with a tool.\n{% /callout %}\n\nAfter that, you can then install your plugin like any other npm package,\n`npm i -D @my-org/my-plugin` or `yarn add -D @my-org/my-plugin`.\n\n### Listing your Nx Plugin\n\nNx provides a utility (`nx list`) that lists both core and community plugins. To submit your plugin, please follow the steps below:\n\n- Fork the [Nx repo](https://github.com/nrwl/nx/fork) (if you haven't already)\n- Update the [`community/approved-plugins.json` file](https://github.com/nrwl/nx/blob/master/community/approved-plugins.json) with a new entry for your plugin that includes name, url and description\n- Use the following commit message template: `chore(core): nx plugin submission [PLUGIN_NAME]`\n- push your changes, and run `yarn submit-plugin`\n\n> The `yarn submit-plugin` command automatically opens the Github pull request process with the correct template.\n\nWe will then verify the plugin, offer suggestions or merge the pull request!\n\n## Preset\n\nA Preset is a customization option which you provide when creating a new workspace. TS, Node, React are some internal presets that Nx provides by default.\n\n{% youtube\nsrc=\"https://www.youtube.com/embed/yGUrF0-uqaU\"\ntitle=\"Develop a Nx Preset for your Nx Plugin\"\nwidth=\"100%\" /%}\n\n### Custom Preset\n\nAt its core a preset is a generator, which we can create inside of a plugin.\nIf you **don't** have an existing plugin you can create one by running\n\n```shell\n npx create-nx-plugin my-org --pluginName my-plugin\n```\n\nTo create our preset inside of our plugin we can run\n\n```shell\n nx generate @nrwl/nx-plugin:generator --name=preset --project=happynrwl\n```\n\n{% callout type=\"warning\" title=\"Double check\" %}\nThe word `preset` is required for the name of this generator\n{% /callout %}\n\nYou should have a similar structure to this:\n\n```text\nhappynrwl/\n\t├── e2e\n\t├── jest.config.js\n\t├── jest.preset.js\n\t├── nx.json\n\t├── package-lock.json\n\t├── package.json\n\t├── packages\n\t│ └── happynrwl\n\t│ ├── src\n\t│ │ ├── executors\n\t│ │ ├── generators\n\t│ │ │ ├── happynrwl\n\t│ │ │ └── preset \t\t// <------------- Here\n\t│ │ └── index.ts\n\t├── tools\n\t└── tsconfig.base.json\n```\n\nAfter the command is finished, the preset generator is created under the folder named **preset**.\nThe **generator.ts** provides an entry point to the generator. This file contains a function that is called to perform manipulations on a tree that represents the file system. The **schema.json** provides a description of the generator, available options, validation information, and default values.\n\nHere is the sample generator function which you can customize to meet your needs.\n\n```typescript\nexport default async function (tree: Tree, options: PresetGeneratorSchema) {\n const normalizedOptions = normalizeOptions(tree, options);\n addProjectConfiguration(tree, normalizedOptions.projectName, {\n root: normalizedOptions.projectRoot,\n projectType: 'application',\n sourceRoot: `${normalizedOptions.projectRoot}/src`,\n targets: {\n exec: {\n executor: 'nx:run-commands',\n options: {\n command: `node ${projectRoot}/src/index.js`,\n },\n },\n },\n tags: normalizedOptions.parsedTags,\n });\n addFiles(tree, normalizedOptions);\n await formatFiles(tree);\n}\n```\n\nTo get an in-depth guide on customizing/running or debugging your generator see [local generators](/recipes/generators/local-generators).\n\n#### Usage\n\nBefore you are able to use your newly created preset you must package and publish it to a registry.\n\nAfter you have published your plugin to a registry you can now use your preset when creating a new workspace\n\n```shell\nnpx create-nx-workspace my-workspace --preset=my-plugin-name\n```\n" - } - ], - "generators": [ - { - "name": "plugin", - "factory": "./src/generators/plugin/plugin", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxPluginPlugin", - "title": "Create a Plugin for Nx", - "description": "Create a Plugin for Nx.", - "type": "object", - "examples": [ - { - "command": "g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin", - "description": "Generate `libs/plugins/my-plugin`" - } - ], - "properties": { - "name": { - "type": "string", - "description": "Plugin name", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the plugin?" - }, - "directory": { - "type": "string", - "description": "A directory where the plugin is placed." - }, - "importPath": { - "type": "string", - "description": "How the plugin will be published, like `@myorg/my-awesome-plugin`. Note this must be a valid NPM name." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting).", - "alias": "t" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update tsconfig.json for development experience." - }, - "skipLintChecks": { - "type": "boolean", - "default": false, - "description": "Do not eslint configuration for plugin json files." - }, - "e2eTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for end to end (E2E) tests.", - "default": "jest" - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "compiler": { - "type": "string", - "enum": ["tsc", "swc"], - "default": "tsc", - "description": "The compiler used by the build and test targets." - }, - "minimal": { - "type": "boolean", - "description": "Generate the plugin with a minimal setup. This would involve not generating a default executor and generator.", - "default": false - } - }, - "required": ["name"], - "additionalProperties": false, - "presets": [] - }, - "description": "Create a Nx Plugin.", - "implementation": "/packages/nx-plugin/src/generators/plugin/plugin.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nx-plugin/src/generators/plugin/schema.json" - }, - { - "name": "e2e-project", - "factory": "./src/generators/e2e-project/e2e", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxPluginE2E", - "title": "Create an E2E app for a Nx Plugin", - "description": "Create an E2E app for a Nx Plugin.", - "type": "object", - "properties": { - "pluginName": { - "type": "string", - "description": "the name of the plugin to be tested." - }, - "npmPackageName": { - "type": "string", - "description": "the name of the package that would be published to NPM." - }, - "projectDirectory": { - "type": "string", - "description": "the directory where the plugin is placed." - }, - "pluginOutputPath": { - "type": "string", - "description": "the output path of the plugin after it builds." - }, - "jestConfig": { - "type": "string", - "description": "Jest config file." - }, - "tsSpecConfig": { - "type": "string", - "description": "Spec `tsconfig` file.", - "x-deprecated": true - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "minimal": { - "type": "boolean", - "description": "Generate the e2e project with a minimal setup. This would involve not generating tests for a default executor and generator.", - "default": false - } - }, - "required": ["pluginName", "npmPackageName"], - "additionalProperties": false, - "presets": [] - }, - "description": "Create a E2E application for a Nx Plugin.", - "hidden": true, - "implementation": "/packages/nx-plugin/src/generators/e2e-project/e2e.ts", - "aliases": [], - "path": "/packages/nx-plugin/src/generators/e2e-project/schema.json" - }, - { - "name": "migration", - "factory": "./src/generators/migration/migration", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxPluginMigration", - "title": "Create a Migration for an Nx Plugin", - "description": "Create a Migration for an Nx Plugin.", - "type": "object", - "examples": [ - { - "command": "nx g migration my-migration --project=my-plugin --version=1.0.0", - "description": "Generate `libs/my-plugin/src/migrations/my-migration`" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for the migration?" - }, - "name": { - "type": "string", - "description": "Migration name.", - "$default": { "$source": "argv", "index": 0 } - }, - "description": { - "type": "string", - "description": "Migration description." - }, - "packageVersion": { - "type": "string", - "description": "Version to use for the migration.", - "alias": "v", - "x-prompt": "What version would you like to use for the migration?" - }, - "packageJsonUpdates": { - "type": "boolean", - "description": "Whether or not to include `package.json` updates.", - "alias": "p", - "default": false - } - }, - "required": ["project", "packageVersion"], - "additionalProperties": false, - "presets": [] - }, - "description": "Create a migration for an Nx Plugin.", - "implementation": "/packages/nx-plugin/src/generators/migration/migration.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nx-plugin/src/generators/migration/schema.json" - }, - { - "name": "generator", - "factory": "./src/generators/generator/generator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxPluginGenerator", - "title": "Create a Generator for an Nx Plugin", - "description": "Create a Generator for an Nx Plugin.", - "type": "object", - "examples": [ - { - "command": "nx g generator my-generator --project=my-plugin", - "description": "Generate `libs/my-plugin/src/generators/my-generator`" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for the generator?" - }, - "name": { - "type": "string", - "description": "Generator name.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the generator?" - }, - "description": { - "type": "string", - "description": "Generator description.", - "alias": "d" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - } - }, - "required": ["project", "name"], - "additionalProperties": false, - "presets": [] - }, - "description": "Create a generator for an Nx Plugin.", - "implementation": "/packages/nx-plugin/src/generators/generator/generator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nx-plugin/src/generators/generator/schema.json" - }, - { - "name": "executor", - "factory": "./src/generators/executor/executor", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxPluginExecutor", - "title": "Create an Executor for an Nx Plugin", - "description": "Create an Executor for an Nx Plugin.", - "type": "object", - "examples": [ - { - "command": "nx g executor my-executor --project=my-plugin", - "description": "Generate `libs/my-plugin/src/executors/my-executor`" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for the executor?" - }, - "name": { - "type": "string", - "description": "Executor name.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the executor?" - }, - "description": { - "type": "string", - "description": "Executor description." - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "includeHasher": { - "type": "boolean", - "default": false, - "description": "Should the boilerplate for a custom hasher be generated?" - } - }, - "required": ["project", "name"], - "additionalProperties": false, - "presets": [] - }, - "description": "Create an executor for an Nx Plugin.", - "implementation": "/packages/nx-plugin/src/generators/executor/executor.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nx-plugin/src/generators/executor/schema.json" - }, - { - "name": "plugin-lint-checks", - "factory": "./src/generators/lint-checks/generator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "PluginLint", - "title": "", - "type": "object", - "description": "Adds linting configuration to validate common json files for nx plugins.", - "properties": { - "projectName": { - "type": "string", - "description": "Which project should be the configuration be added to?", - "$default": { "$source": "projectName" } - } - }, - "required": ["projectName"], - "presets": [] - }, - "description": "Adds linting configuration to validate common json files for nx plugins.", - "implementation": "/packages/nx-plugin/src/generators/lint-checks/generator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/nx-plugin/src/generators/lint-checks/schema.json" - } - ], - "executors": [ - { - "name": "e2e", - "implementation": "/packages/nx-plugin/src/executors/e2e/e2e.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Nx Plugin Playground Target", - "description": "Creates a playground for a Nx Plugin.", - "cli": "nx", - "type": "object", - "properties": { - "target": { - "description": "The build target for the Nx Plugin project.", - "type": "string" - }, - "jestConfig": { - "type": "string", - "description": "Jest config file.", - "x-completion-type": "file", - "x-completion-glob": "jest.config@(.js|.ts)" - }, - "tsSpecConfig": { - "type": "string", - "description": "The tsconfig file for specs.", - "x-deprecated": "Use the `tsconfig` property for `ts-jest` in the e2e project `jest.config.js` file. It will be removed in the next major release.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "codeCoverage": { - "description": "Indicates that test coverage information should be collected and reported in the output. (https://jestjs.io/docs/cli#--coverageboolean)", - "type": "boolean", - "aliases": ["coverage"] - }, - "config": { - "description": "The path to a Jest config file specifying how to find and execute tests. If no `rootDir` is set in the config, the directory containing the config file is assumed to be the `rootDir` for the project. This can also be a JSON-encoded value which Jest will use as configuration.", - "type": "string" - }, - "clearCache": { - "description": "Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory. _Note: clearing the cache will reduce performance_.", - "type": "boolean" - }, - "detectOpenHandles": { - "description": "Attempt to collect and print open handles preventing Jest from exiting cleanly (https://jestjs.io/docs/cli#--detectopenhandles)", - "type": "boolean" - }, - "logHeapUsage": { - "description": "Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.", - "type": "boolean" - }, - "detectLeaks": { - "description": "**EXPERIMENTAL**: Detect memory leaks in tests. After executing a test, it will try to garbage collect the global object used, and fail if it was leaked", - "type": "boolean" - }, - "testFile": { - "description": "The name of the file to test.", - "type": "string", - "x-completion-type": "file", - "x-completion-glob": "**/*.+(spec|test).+(ts|js)" - }, - "tsConfig": { - "description": "The name of the Typescript configuration file. Set the tsconfig option in the jest config file. ", - "type": "string", - "x-deprecated": true - }, - "setupFile": { - "description": "The name of a setup file used by Jest. (use Jest config file https://jestjs.io/docs/en/configuration#setupfilesafterenv-array)", - "type": "string", - "x-deprecated": true - }, - "bail": { - "alias": "b", - "description": "Exit the test suite immediately after `n` number of failing tests. (https://jestjs.io/docs/cli#--bail)", - "oneOf": [{ "type": "number" }, { "type": "boolean" }] - }, - "ci": { - "description": "Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (https://jestjs.io/docs/cli#--ci)", - "type": "boolean" - }, - "color": { - "alias": "colors", - "description": "Forces test results output color highlighting (even if `stdout` is not a TTY). Set to false if you would like to have no colors. (https://jestjs.io/docs/cli#--colors)", - "type": "boolean" - }, - "findRelatedTests": { - "description": "Find and run the tests that cover a comma separated list of source files that were passed in as arguments. (https://jestjs.io/docs/cli#--findrelatedtests-spaceseparatedlistofsourcefiles)", - "type": "string" - }, - "json": { - "description": "Prints the test results in `JSON`. This mode will send all other test output and user messages to `stderr`. (https://jestjs.io/docs/cli#--json)", - "type": "boolean" - }, - "maxWorkers": { - "alias": "w", - "description": "Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (https://jestjs.io/docs/cli#--maxworkersnumstring)", - "oneOf": [{ "type": "number" }, { "type": "string" }] - }, - "onlyChanged": { - "alias": "o", - "description": "Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a `git` or `hg` repository at the moment. (https://jestjs.io/docs/cli#--onlychanged)", - "type": "boolean" - }, - "changedSince": { - "description": "Runs tests related to the changes since the provided branch or commit hash. If the current branch has diverged from the given branch, then only changes made locally will be tested. (https://jestjs.io/docs/cli#--changedsince)", - "type": "string" - }, - "outputFile": { - "description": "Write test results to a file when the `--json` option is also specified. (https://jestjs.io/docs/cli#--outputfilefilename)", - "type": "string" - }, - "passWithNoTests": { - "description": "Will not fail if no tests are found (for example while using `--testPathPattern`.) (https://jestjs.io/docs/cli#--passwithnotests)", - "type": "boolean" - }, - "runInBand": { - "alias": "i", - "description": "Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (https://jestjs.io/docs/cli#--runinband)", - "type": "boolean" - }, - "showConfig": { - "description": "Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)", - "type": "boolean" - }, - "silent": { - "description": "Prevent tests from printing messages through the console. (https://jestjs.io/docs/cli#--silent)", - "type": "boolean" - }, - "testNamePattern": { - "alias": "t", - "description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)", - "type": "string" - }, - "testPathIgnorePatterns": { - "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)", - "type": "array", - "items": { "type": "string" } - }, - "testPathPattern": { - "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/cli#--testpathpatternregex)", - "type": "array", - "items": { "type": "string" }, - "default": [] - }, - "colors": { - "description": "Forces test results output highlighting even if stdout is not a TTY. (https://jestjs.io/docs/cli#--colors)", - "type": "boolean" - }, - "reporters": { - "description": "Run tests with specified reporters. Reporter options are not available via CLI. Example with multiple reporters: `jest --reporters=\"default\" --reporters=\"jest-junit\"`. (https://jestjs.io/docs/cli#--reporters)", - "type": "array", - "items": { "type": "string" } - }, - "verbose": { - "description": "Display individual test results with the test suite hierarchy. (https://jestjs.io/docs/cli#--verbose)", - "type": "boolean" - }, - "coverageReporters": { - "description": "A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter.", - "type": "array", - "items": { "type": "string" } - }, - "coverageDirectory": { - "description": "The directory where Jest should output its coverage files.", - "type": "string" - }, - "testResultsProcessor": { - "description": "Node module that implements a custom results processor. (https://jestjs.io/docs/en/configuration#testresultsprocessor-string)", - "type": "string" - }, - "updateSnapshot": { - "alias": "u", - "description": "Use this flag to re-record snapshots. Can be used together with a test suite pattern or with `--testNamePattern` to re-record snapshot for test matching the pattern. (https://jestjs.io/docs/cli#--updatesnapshot)", - "type": "boolean" - }, - "useStderr": { - "description": "Divert all output to stderr.", - "type": "boolean" - }, - "watch": { - "description": "Watch files for changes and rerun tests related to changed files. If you want to re-run all tests when a file has changed, use the `--watchAll` option. (https://jestjs.io/docs/cli#--watch)", - "type": "boolean" - }, - "watchAll": { - "description": "Watch files for changes and rerun all tests when something changes. If you want to re-run only the tests that depend on the changed files, use the `--watch` option. (https://jestjs.io/docs/cli#--watchall)", - "type": "boolean" - }, - "testLocationInResults": { - "description": "Adds a location field to test results. Used to report location of a test in a reporter. { \"column\": 4, \"line\": 5 } (https://jestjs.io/docs/cli#--testlocationinresults)", - "type": "boolean" - }, - "testTimeout": { - "description": "Default timeout of a test in milliseconds. Default value: `5000`. (https://jestjs.io/docs/cli#--testtimeoutnumber)", - "type": "number" - } - }, - "additionalProperties": false, - "required": ["target", "jestConfig"], - "presets": [] - }, - "description": "Creates and runs the E2E tests for an Nx Plugin.", - "aliases": [], - "hidden": false, - "path": "/packages/nx-plugin/src/executors/e2e/schema.json" - } - ] -} diff --git a/docs/generated/packages/nx-plugin/documents/overview.md b/docs/generated/packages/nx-plugin/documents/overview.md new file mode 100644 index 0000000000000..2f8afa98b2c68 --- /dev/null +++ b/docs/generated/packages/nx-plugin/documents/overview.md @@ -0,0 +1,272 @@ +Nx plugins are npm packages that contain generators and executors to extend a Nx workspace. Generators are blueprints to create new files from templates, and executors run those files. These plugins also update the `nx.json` when generating new libs or apps. + +> A list of plugins that is maintained by Nrwl is found in the [Nrwl/nx repo](https://github.com/nrwl/nx/tree/master/packages). \ +> A list of custom plugins created by the community is found in the [Community](/community) section. +> Plugins are written using Nx Devkit. **Read [Nx Devkit](/packages/devkit/documents/index) for more information.** + +{% youtube +src="https://www.youtube.com/embed/fC1-4fAZDP4" +title="Nx Tutorial: Building Custom Plugins for Nx" +width="100%" /%} + +> For a detailed video explaining the things covered here and more, check out [Creating and Publishing Your Own Nx Plugin](https://www.youtube.com/watch?v=vVT7Al01VZc). + +## Generating a Plugin + +To get started with building a Nx Plugin, run the following command: + +```shell +npx create-nx-plugin my-org --pluginName my-plugin +``` + +This command creates a brand-new workspace, and sets up a pre-configured plugin with the specified name. + +> Note, the command above will create a plugin the package name set to `@my-org/my-plugin`. You can pass `--importPath` to provide a different package name. + +> If you do not want to create a new workspace, install the `@nrwl/nx-plugin` dependency in an already existing workspace with npm or yarn. Then run `nx g @nrwl/nx-plugin:plugin [pluginName]`. + +A new plugin is created with a default generator, executor, and e2e app. + +## Generator + +The created generator contains boilerplate that will do the following: + +- Normalize a schema (the options that the generator accepts) +- Update the `project.json` +- Add the plugin's project to the `nx.json` file +- Add files to the disk using templates + +There will be an exported default function that will be the main entry for the generator. + +### Generator options + +The `schema.d.ts` file contains all the options that the generator supports. By default, it includes `directory`, `tags`, and `name` as the options. If more options need to be added, please update this file and the `schema.json` file. + +{% callout type="note" title="More details" %} +The `schema.d.ts` file is used for type checking inside the implementation file. It should match the properties in `schema.json`. +{% /callout %} + +### Adding more generators + +To add more generators to the plugin, run the following command: +`nx generate @nrwl/nx-plugin:generator [generatorName] --project=[pluginName]`. + +This will scaffold out a new generator and update the necessary files to support it. + +### Generator Testing + +The generator spec file includes boilerplate to help get started with testing. This includes setting up an empty workspace. + +These tests should ensure that files within the tree (created with `createTreeWithEmptyWorkspace`) are in the correct place, and contain the right content. + +Full E2Es are supported (and recommended) and will run everything on the file system like a user would. + +## Executor + +The default executor is set up to just emit a console log. Some examples of what an executor can do are: + +- Support different languages, (Java, Go, Python, C#) +- Compile new UI framework components +- Deploy an app on a CDN +- Publish to NPM +- and many more! + +### Adding more executors + +To add more executors to the plugin, run the following command: +`nx generate @nrwl/nx-plugin:executor [executor] --project=[pluginName]`. + +This will scaffold out a new generator and update the necessary files to support it. + +### Executor testing + +The executor spec file contains boilerplate to run the default exported function from the executor. + +These tests should make sure that the executor is executing and calling the functions that it relies on. + +Full E2Es are supported (and recommended) and will run everything on the file system like a user would. + +## Testing your plugin + +One of the biggest benefits that the Nx Plugin package provides is support for E2E and unit testing. + +When the E2E app runs, a temporary E2E directory is created in the root of the workspace. This directory is a blank Nx workspace, and will have the plugin's built package installed locally. + +### E2E Testing file + +When the plugin is generated, a test file is created in the `my-plugin-e2e` app. Inside this test file, there are already tests for making sure that the executor ran, checking if directories are created with the `--directory` option, and checking if tags are added to the project configuration. + +We'll go over a few parts of a test file below: + +```typescript +it('should create my-plugin', async (done) => { + const plugin = uniq('my-plugin'); + ensureNxProject('@my-org/my-plugin', 'dist/packages/my-plugin'); + await runNxCommandAsync(`generate @my-org/my-plugin:myPlugin ${plugin}`); + + const result = await runNxCommandAsync(`build ${plugin}`); + expect(result.stdout).toContain('Executor ran'); + + done(); +}); +``` + +- The `uniq` function creates a random name with the prefix and a random number. +- The `ensureNxProject` is the function that will create the temporary directory. It takes two arguments, the plugin package name and the dist directory of when it's built. +- The `runNxCommandAsync` will execute a `nx` command in the E2E directory. + +There are additional functions that the `@nrwl/nx-plugin/testing` package exports. Most of them are file utilities to manipulate and read files in the E2E directory. + +## Including Assets + +Sometimes you might want to include some assets with the plugin. This might be a image or some additional binaries. + +To make sure that assets are copied to the dist folder, open the plugin's `project.json` file. Inside the `build` property, add additional assets. By default, all `.md` files in the root, all non-ts files in folders, and the `generators.json` and `executors.json` files are included. + +```jsonc {% fileName="project.json" %} +"build": { + "executor": "@nrwl/node:package", + "options": { + // shortened... + "assets": [ + "packages/my-plugin/*.md", + { + "input": "./packages/my-plugin/src", + "glob": "**/*.!(ts)", + "output": "./src" + }, + { + "input": "./packages/my-plugin", + "glob": "generators.json", + "output": "." + }, + { + "input": "./packages/my-plugin", + "glob": "executors.json", + "output": "." + } + ] + } +} +``` + +## Using your Nx Plugin + +To use your plugin, simply list it in `nx.json` or use its generators and executors as you would for any other plugin. This could look like `nx g @my-org/my-plugin:lib` for generators or `"executor": "@my-org/my-plugin:build"` for executors. It should be usable in all of the same ways as published plugins in your local workspace immediately after generating it. This includes setting it up as the default collection in `nx.json`, which would allow you to run `nx g lib` and hit your plugin's generator. + +## Publishing your Nx Plugin + +In order to use your plugin in other workspaces or share it with the community, you will need to publish it to an npm registry. To publish your plugin follow these steps: + +1. Build your plugin with the command `nx run my-plugin:build` +1. `npm publish ./dist/package/my-plugin` and follow the prompts from npm. +1. That's it! + +{% callout type="warning" title="Version bump" %} +Currently you will have to modify the `package.json` version by yourself or with a tool. +{% /callout %} + +After that, you can then install your plugin like any other npm package, +`npm i -D @my-org/my-plugin` or `yarn add -D @my-org/my-plugin`. + +### Listing your Nx Plugin + +Nx provides a utility (`nx list`) that lists both core and community plugins. To submit your plugin, please follow the steps below: + +- Fork the [Nx repo](https://github.com/nrwl/nx/fork) (if you haven't already) +- Update the [`community/approved-plugins.json` file](https://github.com/nrwl/nx/blob/master/community/approved-plugins.json) with a new entry for your plugin that includes name, url and description +- Use the following commit message template: `chore(core): nx plugin submission [PLUGIN_NAME]` +- push your changes, and run `yarn submit-plugin` + +> The `yarn submit-plugin` command automatically opens the Github pull request process with the correct template. + +We will then verify the plugin, offer suggestions or merge the pull request! + +## Preset + +A Preset is a customization option which you provide when creating a new workspace. TS, Node, React are some internal presets that Nx provides by default. + +{% youtube +src="https://www.youtube.com/embed/yGUrF0-uqaU" +title="Develop a Nx Preset for your Nx Plugin" +width="100%" /%} + +### Custom Preset + +At its core a preset is a generator, which we can create inside of a plugin. +If you **don't** have an existing plugin you can create one by running + +```shell + npx create-nx-plugin my-org --pluginName my-plugin +``` + +To create our preset inside of our plugin we can run + +```shell + nx generate @nrwl/nx-plugin:generator --name=preset --project=happynrwl +``` + +{% callout type="warning" title="Double check" %} +The word `preset` is required for the name of this generator +{% /callout %} + +You should have a similar structure to this: + +```text +happynrwl/ + ├── e2e + ├── jest.config.js + ├── jest.preset.js + ├── nx.json + ├── package-lock.json + ├── package.json + ├── packages + │ └── happynrwl + │ ├── src + │ │ ├── executors + │ │ ├── generators + │ │ │ ├── happynrwl + │ │ │ └── preset // <------------- Here + │ │ └── index.ts + ├── tools + └── tsconfig.base.json +``` + +After the command is finished, the preset generator is created under the folder named **preset**. +The **generator.ts** provides an entry point to the generator. This file contains a function that is called to perform manipulations on a tree that represents the file system. The **schema.json** provides a description of the generator, available options, validation information, and default values. + +Here is the sample generator function which you can customize to meet your needs. + +```typescript +export default async function (tree: Tree, options: PresetGeneratorSchema) { + const normalizedOptions = normalizeOptions(tree, options); + addProjectConfiguration(tree, normalizedOptions.projectName, { + root: normalizedOptions.projectRoot, + projectType: 'application', + sourceRoot: `${normalizedOptions.projectRoot}/src`, + targets: { + exec: { + executor: 'nx:run-commands', + options: { + command: `node ${projectRoot}/src/index.js`, + }, + }, + }, + tags: normalizedOptions.parsedTags, + }); + addFiles(tree, normalizedOptions); + await formatFiles(tree); +} +``` + +To get an in-depth guide on customizing/running or debugging your generator see [local generators](/recipes/generators/local-generators). + +#### Usage + +Before you are able to use your newly created preset you must package and publish it to a registry. + +After you have published your plugin to a registry you can now use your preset when creating a new workspace + +```shell +npx create-nx-workspace my-workspace --preset=my-plugin-name +``` diff --git a/docs/generated/packages/nx-plugin/executors/e2e.json b/docs/generated/packages/nx-plugin/executors/e2e.json new file mode 100644 index 0000000000000..405e971b7b7b5 --- /dev/null +++ b/docs/generated/packages/nx-plugin/executors/e2e.json @@ -0,0 +1,204 @@ +{ + "name": "e2e", + "implementation": "/packages/nx-plugin/src/executors/e2e/e2e.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Nx Plugin Playground Target", + "description": "Creates a playground for a Nx Plugin.", + "cli": "nx", + "type": "object", + "properties": { + "target": { + "description": "The build target for the Nx Plugin project.", + "type": "string" + }, + "jestConfig": { + "type": "string", + "description": "Jest config file.", + "x-completion-type": "file", + "x-completion-glob": "jest.config@(.js|.ts)" + }, + "tsSpecConfig": { + "type": "string", + "description": "The tsconfig file for specs.", + "x-deprecated": "Use the `tsconfig` property for `ts-jest` in the e2e project `jest.config.js` file. It will be removed in the next major release.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "codeCoverage": { + "description": "Indicates that test coverage information should be collected and reported in the output. (https://jestjs.io/docs/cli#--coverageboolean)", + "type": "boolean", + "aliases": ["coverage"] + }, + "config": { + "description": "The path to a Jest config file specifying how to find and execute tests. If no `rootDir` is set in the config, the directory containing the config file is assumed to be the `rootDir` for the project. This can also be a JSON-encoded value which Jest will use as configuration.", + "type": "string" + }, + "clearCache": { + "description": "Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory. _Note: clearing the cache will reduce performance_.", + "type": "boolean" + }, + "detectOpenHandles": { + "description": "Attempt to collect and print open handles preventing Jest from exiting cleanly (https://jestjs.io/docs/cli#--detectopenhandles)", + "type": "boolean" + }, + "logHeapUsage": { + "description": "Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.", + "type": "boolean" + }, + "detectLeaks": { + "description": "**EXPERIMENTAL**: Detect memory leaks in tests. After executing a test, it will try to garbage collect the global object used, and fail if it was leaked", + "type": "boolean" + }, + "testFile": { + "description": "The name of the file to test.", + "type": "string", + "x-completion-type": "file", + "x-completion-glob": "**/*.+(spec|test).+(ts|js)" + }, + "tsConfig": { + "description": "The name of the Typescript configuration file. Set the tsconfig option in the jest config file. ", + "type": "string", + "x-deprecated": true + }, + "setupFile": { + "description": "The name of a setup file used by Jest. (use Jest config file https://jestjs.io/docs/en/configuration#setupfilesafterenv-array)", + "type": "string", + "x-deprecated": true + }, + "bail": { + "alias": "b", + "description": "Exit the test suite immediately after `n` number of failing tests. (https://jestjs.io/docs/cli#--bail)", + "oneOf": [{ "type": "number" }, { "type": "boolean" }] + }, + "ci": { + "description": "Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (https://jestjs.io/docs/cli#--ci)", + "type": "boolean" + }, + "color": { + "alias": "colors", + "description": "Forces test results output color highlighting (even if `stdout` is not a TTY). Set to false if you would like to have no colors. (https://jestjs.io/docs/cli#--colors)", + "type": "boolean" + }, + "findRelatedTests": { + "description": "Find and run the tests that cover a comma separated list of source files that were passed in as arguments. (https://jestjs.io/docs/cli#--findrelatedtests-spaceseparatedlistofsourcefiles)", + "type": "string" + }, + "json": { + "description": "Prints the test results in `JSON`. This mode will send all other test output and user messages to `stderr`. (https://jestjs.io/docs/cli#--json)", + "type": "boolean" + }, + "maxWorkers": { + "alias": "w", + "description": "Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (https://jestjs.io/docs/cli#--maxworkersnumstring)", + "oneOf": [{ "type": "number" }, { "type": "string" }] + }, + "onlyChanged": { + "alias": "o", + "description": "Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a `git` or `hg` repository at the moment. (https://jestjs.io/docs/cli#--onlychanged)", + "type": "boolean" + }, + "changedSince": { + "description": "Runs tests related to the changes since the provided branch or commit hash. If the current branch has diverged from the given branch, then only changes made locally will be tested. (https://jestjs.io/docs/cli#--changedsince)", + "type": "string" + }, + "outputFile": { + "description": "Write test results to a file when the `--json` option is also specified. (https://jestjs.io/docs/cli#--outputfilefilename)", + "type": "string" + }, + "passWithNoTests": { + "description": "Will not fail if no tests are found (for example while using `--testPathPattern`.) (https://jestjs.io/docs/cli#--passwithnotests)", + "type": "boolean" + }, + "runInBand": { + "alias": "i", + "description": "Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (https://jestjs.io/docs/cli#--runinband)", + "type": "boolean" + }, + "showConfig": { + "description": "Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)", + "type": "boolean" + }, + "silent": { + "description": "Prevent tests from printing messages through the console. (https://jestjs.io/docs/cli#--silent)", + "type": "boolean" + }, + "testNamePattern": { + "alias": "t", + "description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)", + "type": "string" + }, + "testPathIgnorePatterns": { + "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)", + "type": "array", + "items": { "type": "string" } + }, + "testPathPattern": { + "description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/cli#--testpathpatternregex)", + "type": "array", + "items": { "type": "string" }, + "default": [] + }, + "colors": { + "description": "Forces test results output highlighting even if stdout is not a TTY. (https://jestjs.io/docs/cli#--colors)", + "type": "boolean" + }, + "reporters": { + "description": "Run tests with specified reporters. Reporter options are not available via CLI. Example with multiple reporters: `jest --reporters=\"default\" --reporters=\"jest-junit\"`. (https://jestjs.io/docs/cli#--reporters)", + "type": "array", + "items": { "type": "string" } + }, + "verbose": { + "description": "Display individual test results with the test suite hierarchy. (https://jestjs.io/docs/cli#--verbose)", + "type": "boolean" + }, + "coverageReporters": { + "description": "A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter.", + "type": "array", + "items": { "type": "string" } + }, + "coverageDirectory": { + "description": "The directory where Jest should output its coverage files.", + "type": "string" + }, + "testResultsProcessor": { + "description": "Node module that implements a custom results processor. (https://jestjs.io/docs/en/configuration#testresultsprocessor-string)", + "type": "string" + }, + "updateSnapshot": { + "alias": "u", + "description": "Use this flag to re-record snapshots. Can be used together with a test suite pattern or with `--testNamePattern` to re-record snapshot for test matching the pattern. (https://jestjs.io/docs/cli#--updatesnapshot)", + "type": "boolean" + }, + "useStderr": { + "description": "Divert all output to stderr.", + "type": "boolean" + }, + "watch": { + "description": "Watch files for changes and rerun tests related to changed files. If you want to re-run all tests when a file has changed, use the `--watchAll` option. (https://jestjs.io/docs/cli#--watch)", + "type": "boolean" + }, + "watchAll": { + "description": "Watch files for changes and rerun all tests when something changes. If you want to re-run only the tests that depend on the changed files, use the `--watch` option. (https://jestjs.io/docs/cli#--watchall)", + "type": "boolean" + }, + "testLocationInResults": { + "description": "Adds a location field to test results. Used to report location of a test in a reporter. { \"column\": 4, \"line\": 5 } (https://jestjs.io/docs/cli#--testlocationinresults)", + "type": "boolean" + }, + "testTimeout": { + "description": "Default timeout of a test in milliseconds. Default value: `5000`. (https://jestjs.io/docs/cli#--testtimeoutnumber)", + "type": "number" + } + }, + "additionalProperties": false, + "required": ["target", "jestConfig"], + "presets": [] + }, + "description": "Creates and runs the E2E tests for an Nx Plugin.", + "aliases": [], + "hidden": false, + "path": "/packages/nx-plugin/src/executors/e2e/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/nx-plugin/generators/e2e-project.json b/docs/generated/packages/nx-plugin/generators/e2e-project.json new file mode 100644 index 0000000000000..83dd9c57a27d0 --- /dev/null +++ b/docs/generated/packages/nx-plugin/generators/e2e-project.json @@ -0,0 +1,54 @@ +{ + "name": "e2e-project", + "factory": "./src/generators/e2e-project/e2e", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxPluginE2E", + "title": "Create an E2E app for a Nx Plugin", + "description": "Create an E2E app for a Nx Plugin.", + "type": "object", + "properties": { + "pluginName": { + "type": "string", + "description": "the name of the plugin to be tested." + }, + "npmPackageName": { + "type": "string", + "description": "the name of the package that would be published to NPM." + }, + "projectDirectory": { + "type": "string", + "description": "the directory where the plugin is placed." + }, + "pluginOutputPath": { + "type": "string", + "description": "the output path of the plugin after it builds." + }, + "jestConfig": { "type": "string", "description": "Jest config file." }, + "tsSpecConfig": { + "type": "string", + "description": "Spec `tsconfig` file.", + "x-deprecated": true + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "minimal": { + "type": "boolean", + "description": "Generate the e2e project with a minimal setup. This would involve not generating tests for a default executor and generator.", + "default": false + } + }, + "required": ["pluginName", "npmPackageName"], + "additionalProperties": false, + "presets": [] + }, + "description": "Create a E2E application for a Nx Plugin.", + "hidden": true, + "implementation": "/packages/nx-plugin/src/generators/e2e-project/e2e.ts", + "aliases": [], + "path": "/packages/nx-plugin/src/generators/e2e-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nx-plugin/generators/executor.json b/docs/generated/packages/nx-plugin/generators/executor.json new file mode 100644 index 0000000000000..be8be623f6e97 --- /dev/null +++ b/docs/generated/packages/nx-plugin/generators/executor.json @@ -0,0 +1,57 @@ +{ + "name": "executor", + "factory": "./src/generators/executor/executor", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxPluginExecutor", + "title": "Create an Executor for an Nx Plugin", + "description": "Create an Executor for an Nx Plugin.", + "type": "object", + "examples": [ + { + "command": "nx g executor my-executor --project=my-plugin", + "description": "Generate `libs/my-plugin/src/executors/my-executor`" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for the executor?" + }, + "name": { + "type": "string", + "description": "Executor name.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the executor?" + }, + "description": { + "type": "string", + "description": "Executor description." + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "includeHasher": { + "type": "boolean", + "default": false, + "description": "Should the boilerplate for a custom hasher be generated?" + } + }, + "required": ["project", "name"], + "additionalProperties": false, + "presets": [] + }, + "description": "Create an executor for an Nx Plugin.", + "implementation": "/packages/nx-plugin/src/generators/executor/executor.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nx-plugin/src/generators/executor/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nx-plugin/generators/generator.json b/docs/generated/packages/nx-plugin/generators/generator.json new file mode 100644 index 0000000000000..6b773ce047814 --- /dev/null +++ b/docs/generated/packages/nx-plugin/generators/generator.json @@ -0,0 +1,53 @@ +{ + "name": "generator", + "factory": "./src/generators/generator/generator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxPluginGenerator", + "title": "Create a Generator for an Nx Plugin", + "description": "Create a Generator for an Nx Plugin.", + "type": "object", + "examples": [ + { + "command": "nx g generator my-generator --project=my-plugin", + "description": "Generate `libs/my-plugin/src/generators/my-generator`" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for the generator?" + }, + "name": { + "type": "string", + "description": "Generator name.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the generator?" + }, + "description": { + "type": "string", + "description": "Generator description.", + "alias": "d" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + } + }, + "required": ["project", "name"], + "additionalProperties": false, + "presets": [] + }, + "description": "Create a generator for an Nx Plugin.", + "implementation": "/packages/nx-plugin/src/generators/generator/generator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nx-plugin/src/generators/generator/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nx-plugin/generators/migration.json b/docs/generated/packages/nx-plugin/generators/migration.json new file mode 100644 index 0000000000000..6514efe75c6b8 --- /dev/null +++ b/docs/generated/packages/nx-plugin/generators/migration.json @@ -0,0 +1,57 @@ +{ + "name": "migration", + "factory": "./src/generators/migration/migration", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxPluginMigration", + "title": "Create a Migration for an Nx Plugin", + "description": "Create a Migration for an Nx Plugin.", + "type": "object", + "examples": [ + { + "command": "nx g migration my-migration --project=my-plugin --version=1.0.0", + "description": "Generate `libs/my-plugin/src/migrations/my-migration`" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for the migration?" + }, + "name": { + "type": "string", + "description": "Migration name.", + "$default": { "$source": "argv", "index": 0 } + }, + "description": { + "type": "string", + "description": "Migration description." + }, + "packageVersion": { + "type": "string", + "description": "Version to use for the migration.", + "alias": "v", + "x-prompt": "What version would you like to use for the migration?" + }, + "packageJsonUpdates": { + "type": "boolean", + "description": "Whether or not to include `package.json` updates.", + "alias": "p", + "default": false + } + }, + "required": ["project", "packageVersion"], + "additionalProperties": false, + "presets": [] + }, + "description": "Create a migration for an Nx Plugin.", + "implementation": "/packages/nx-plugin/src/generators/migration/migration.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nx-plugin/src/generators/migration/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nx-plugin/generators/plugin-lint-checks.json b/docs/generated/packages/nx-plugin/generators/plugin-lint-checks.json new file mode 100644 index 0000000000000..400912e9afcbd --- /dev/null +++ b/docs/generated/packages/nx-plugin/generators/plugin-lint-checks.json @@ -0,0 +1,27 @@ +{ + "name": "plugin-lint-checks", + "factory": "./src/generators/lint-checks/generator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "PluginLint", + "title": "", + "type": "object", + "description": "Adds linting configuration to validate common json files for nx plugins.", + "properties": { + "projectName": { + "type": "string", + "description": "Which project should be the configuration be added to?", + "$default": { "$source": "projectName" } + } + }, + "required": ["projectName"], + "presets": [] + }, + "description": "Adds linting configuration to validate common json files for nx plugins.", + "implementation": "/packages/nx-plugin/src/generators/lint-checks/generator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nx-plugin/src/generators/lint-checks/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nx-plugin/generators/plugin.json b/docs/generated/packages/nx-plugin/generators/plugin.json new file mode 100644 index 0000000000000..6e1bb709c7cc4 --- /dev/null +++ b/docs/generated/packages/nx-plugin/generators/plugin.json @@ -0,0 +1,101 @@ +{ + "name": "plugin", + "factory": "./src/generators/plugin/plugin", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxPluginPlugin", + "title": "Create a Plugin for Nx", + "description": "Create a Plugin for Nx.", + "type": "object", + "examples": [ + { + "command": "g plugin my-plugin --directory=plugins --importPath=@myorg/my-plugin", + "description": "Generate `libs/plugins/my-plugin`" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Plugin name", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the plugin?" + }, + "directory": { + "type": "string", + "description": "A directory where the plugin is placed." + }, + "importPath": { + "type": "string", + "description": "How the plugin will be published, like `@myorg/my-awesome-plugin`. Note this must be a valid NPM name." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting).", + "alias": "t" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update tsconfig.json for development experience." + }, + "skipLintChecks": { + "type": "boolean", + "default": false, + "description": "Do not eslint configuration for plugin json files." + }, + "e2eTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for end to end (E2E) tests.", + "default": "jest" + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "compiler": { + "type": "string", + "enum": ["tsc", "swc"], + "default": "tsc", + "description": "The compiler used by the build and test targets." + }, + "minimal": { + "type": "boolean", + "description": "Generate the plugin with a minimal setup. This would involve not generating a default executor and generator.", + "default": false + } + }, + "required": ["name"], + "additionalProperties": false, + "presets": [] + }, + "description": "Create a Nx Plugin.", + "implementation": "/packages/nx-plugin/src/generators/plugin/plugin.ts", + "aliases": [], + "hidden": false, + "path": "/packages/nx-plugin/src/generators/plugin/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/nx.json b/docs/generated/packages/nx.json deleted file mode 100644 index c441aae870d06..0000000000000 --- a/docs/generated/packages/nx.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "nx", - "packageName": "nx", - "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", - "root": "/packages/nx", - "source": "/packages/nx/src", - "documentation": [ - { - "name": "create-nx-workspace", - "id": "create-nx-workspace", - "file": "generated/cli/create-nx-workspace", - "content": "---\ntitle: 'create-nx-workspace - CLI command'\ndescription: 'Create a new Nx workspace'\n---\n\n# create-nx-workspace\n\nCreate a new Nx workspace\n\n## Usage\n\n```bash\ncreate-nx-workspace [name] [options]\n```\n\nInstall `create-nx-workspace` globally to invoke the command directly, or use `npx create-nx-workspace`, `yarn create nx-workspace`, or `pnpx create-nx-workspace`.\n\n## Options\n\n### allPrompts\n\nType: `boolean`\n\nDefault: `false`\n\nShow all prompts\n\n### appName\n\nType: `string`\n\nThe name of the application when a preset with pregenerated app is selected\n\n### ci\n\nType: `string`\n\nChoices: [github, circleci, azure]\n\nGenerate a CI workflow file\n\n### cli\n\nType: `string`\n\nChoices: [nx, angular]\n\nCLI to power the Nx workspace\n\n### commit.email\n\nType: `string`\n\nE-mail of the committer\n\n### commit.message\n\nType: `string`\n\nDefault: `Initial commit`\n\nCommit message\n\n### commit.name\n\nType: `string`\n\nName of the committer\n\n### defaultBase\n\nType: `string`\n\nDefault: `main`\n\nDefault base to use for new projects\n\n### help\n\nType: `boolean`\n\nShow help\n\n### interactive\n\nType: `boolean`\n\nEnable interactive mode with presets\n\n### name\n\nType: `string`\n\nWorkspace name (e.g. org name)\n\n### nxCloud\n\nType: `boolean`\n\nEnable distributed caching to make your CI faster\n\n### packageManager\n\nType: `string`\n\nChoices: [npm, pnpm, yarn]\n\nDefault: `npm`\n\nPackage manager to use\n\n### preset\n\nType: `string`\n\nCustomizes the initial content of your workspace. Default presets include: [\"apps\", \"empty\", \"core\", \"npm\", \"ts\", \"web-components\", \"angular-monorepo\", \"angular-standalone\", \"react-monorepo\", \"react-standalone\", \"react-native\", \"expo\", \"next\", \"nest\", \"express\", \"react\", \"angular\"]. To build your own see https://nx.dev/packages/nx-plugin#preset\n\n### skipGit\n\nType: `boolean`\n\nDefault: `false`\n\nSkip initializing a git repository.\n\n### style\n\nType: `string`\n\nStyle option to be used when a preset with pregenerated app is selected\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "init", - "id": "init", - "file": "generated/cli/init", - "content": "---\ntitle: 'init - CLI command'\ndescription: 'Adds nx.json file and installs nx if not installed already'\n---\n\n# init\n\nAdds nx.json file and installs nx if not installed already\n\n## Usage\n\n```shell\nnx init\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n" - }, - { - "name": "generate", - "id": "generate", - "tags": ["use-code-generators"], - "file": "generated/cli/generate", - "content": "---\ntitle: 'generate - CLI command'\ndescription: 'Runs a generator that creates and/or modifies files based on a generator from a collection.'\n---\n\n# generate\n\nRuns a generator that creates and/or modifies files based on a generator from a collection.\n\n## Usage\n\n```shell\nnx generate \n```\n\n```shell\nnx g \n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.\n\n### Examples\n\nGenerate a new Angular application:\n\n```shell\nnx generate @nrwl/angular:app myapp\n```\n\nGenerate a new React application:\n\n```shell\nnx generate @nrwl/react:app myapp\n```\n\nGenerate a new web component application:\n\n```shell\nnx generate @nrwl/web:app myapp\n```\n\nGenerate a new Node application:\n\n```shell\nnx generate @nrwl/node:app myapp\n```\n\nGenerate a new Angular library application:\n\n```shell\nnx generate @nrwl/angular:library mylibrary\n```\n\nGenerate a new React library application:\n\n```shell\nnx generate @nrwl/react:library mylibrary\n```\n\nGenerate a new Node library application:\n\n```shell\nnx generate @nrwl/node:library mylibrary\n```\n\n## Options\n\n### defaults\n\nDefault: `false`\n\nWhen true, disables interactive input prompts for options with a default.\n\n### dryRun\n\nDefault: `false`\n\nWhen true, preview the changes without updating files.\n\n### force\n\nDefault: `false`\n\nWhen true, forces overwriting of existing files.\n\n### interactive\n\nDefault: `true`\n\nWhen false, disables interactive input prompts.\n\n### help\n\nShow help and display available generators in the default collection.\n\n### version\n\nShow version number\n" - }, - { - "name": "run", - "tags": ["run-tasks", "use-task-executors"], - "id": "run", - "file": "generated/cli/run", - "content": "---\ntitle: 'run - CLI command'\ndescription: 'Runs an Architect target with an optional custom builder configuration defined in your project.'\n---\n\n# run\n\nRuns an Architect target with an optional custom builder configuration defined in your project.\n\n## Usage\n\n```shell\nnx run [options]\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`.\n\n### Examples\n\nRun the `build` target for the `myapp` :\n\n```shell\nnx run myapp:build\n```\n\nRun the `build` target for the `myapp` project with a `production` configuration:\n\n```shell\nnx run myapp:build:production\n```\n\n## Options\n\n### configuration (-c)\n\nA named builder configuration, defined in the \"configurations\" section of the workspace configuration file. The builder uses the named configuration to run the given target.\n\n### help\n\nShow help\n\n### version\n\nShow version number\n" - }, - { - "name": "daemon", - "id": "daemon", - "file": "generated/cli/daemon", - "content": "---\ntitle: 'daemon - CLI command'\ndescription: 'Prints information about the Nx Daemon process or starts a daemon process'\n---\n\n# daemon\n\nPrints information about the Nx Daemon process or starts a daemon process\n\n## Usage\n\n```shell\nnx daemon\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### help\n\nType: `boolean`\n\nShow help\n\n### start\n\nType: `boolean`\n\nDefault: `false`\n\n### stop\n\nType: `boolean`\n\nDefault: `false`\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "graph", - "id": "dep-graph", - "tags": ["explore-graph"], - "file": "generated/cli/graph", - "content": "---\ntitle: 'graph - CLI command'\ndescription: 'Graph dependencies within workspace'\n---\n\n# graph\n\nGraph dependencies within workspace\n\n## Usage\n\n```shell\nnx graph\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nOpen the project graph of the workspace in the browser:\n\n```shell\n nx graph\n```\n\nSave the project graph into a json file:\n\n```shell\n nx graph --file=output.json\n```\n\nGenerate a static website with project graph into an html file, accompanied by an asset folder called static:\n\n```shell\n nx graph --file=output.html\n```\n\nShow the graph where every node is either an ancestor or a descendant of todos-feature-main:\n\n```shell\n nx graph --focus=todos-feature-main\n```\n\nInclude project-one and project-two in the project graph:\n\n```shell\n nx graph --include=project-one,project-two\n```\n\nExclude project-one and project-two from the project graph:\n\n```shell\n nx graph --exclude=project-one,project-two\n```\n\nShow the graph where every node is either an ancestor or a descendant of todos-feature-main, but exclude project-one and project-two:\n\n```shell\n nx graph --focus=todos-feature-main --exclude=project-one,project-two\n```\n\nWatch for changes to project graph and update in-browser:\n\n```shell\n nx graph --watch\n```\n\n## Options\n\n### exclude\n\nType: `array`\n\nList of projects delimited by commas to exclude from the project graph.\n\n### file\n\nType: `string`\n\nOutput file (e.g. --file=output.json or --file=dep-graph.html)\n\n### focus\n\nType: `string`\n\nUse to show the project graph for a particular project and every node that is either an ancestor or a descendant.\n\n### groupByFolder\n\nType: `boolean`\n\nGroup projects by folder in the project graph\n\n### help\n\nType: `boolean`\n\nShow help\n\n### host\n\nType: `string`\n\nBind the project graph server to a specific ip address.\n\n### open\n\nType: `boolean`\n\nDefault: `true`\n\nOpen the project graph in the browser.\n\n### port\n\nType: `number`\n\nBind the project graph server to a specific port.\n\n### version\n\nType: `boolean`\n\nShow version number\n\n### watch\n\nType: `boolean`\n\nDefault: `false`\n\nWatch for changes to project graph and update in-browser\n" - }, - { - "name": "run-many", - "tags": ["run-tasks", "use-task-executors"], - "id": "run-many", - "file": "generated/cli/run-many", - "content": "---\ntitle: 'run-many - CLI command'\ndescription: 'Run target for multiple listed projects'\n---\n\n# run-many\n\nRun target for multiple listed projects\n\n## Usage\n\n```shell\nnx run-many\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nTest all projects:\n\n```shell\n nx run-many --target=test\n```\n\nTest proj1 and proj2:\n\n```shell\n nx run-many --target=test --projects=proj1,proj2\n```\n\nTest proj1 and proj2 in parallel:\n\n```shell\n nx run-many --target=test --projects=proj1,proj2 --parallel=2\n```\n\nTest all projects ending with `*-app` except `excluded-app`:\n\n```shell\n nx run-many --target=test --projects=*-app --exclude excluded-app\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nDefault: `true`\n\n[deprecated] Run the target on all projects in the workspace\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### help\n\nType: `boolean`\n\nShow help\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### output-style\n\nType: `string`\n\nChoices: [dynamic, static, stream, stream-without-prefixes]\n\nDefines how Nx emits outputs tasks logs\n\n### parallel\n\nType: `string`\n\nMax number of parallel processes [default is 3]\n\n### projects\n\nType: `string`\n\nProjects to run. (comma delimited project names and/or patterns)\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "affected", - "tags": ["run-tasks", "use-task-executors"], - "id": "affected", - "file": "generated/cli/affected", - "content": "---\ntitle: 'affected - CLI command'\ndescription: 'Run target for affected projects'\n---\n\n# affected\n\nRun target for affected projects\n\n## Usage\n\n```shell\nnx affected\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nRun custom target for all affected projects:\n\n```shell\n nx affected --target=custom-target\n```\n\nRun tests in parallel:\n\n```shell\n nx affected --target=test --parallel=5\n```\n\nRun the test target for all projects:\n\n```shell\n nx affected --target=test --all\n```\n\nRun tests for all the projects affected by changing the index.ts file:\n\n```shell\n nx affected --target=test --files=libs/mylib/src/index.ts\n```\n\nRun tests for all the projects affected by the changes between main and HEAD (e.g., PR):\n\n```shell\n nx affected --target=test --base=main --head=HEAD\n```\n\nRun tests for all the projects affected by the last commit on main:\n\n```shell\n nx affected --target=test --base=main~1 --head=main\n```\n\nUse the currently executing project name in your command.:\n\n```shell\n nx affected --target=build --tag=$NX_TARGET_TASK_PROJECT:latest\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### output-style\n\nType: `string`\n\nChoices: [dynamic, static, stream, stream-without-prefixes]\n\nDefines how Nx emits outputs tasks logs\n\n### parallel\n\nType: `string`\n\nMax number of parallel processes [default is 3]\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "affected:graph", - "id": "affected-dep-graph", - "file": "generated/cli/affected-graph", - "content": "---\ntitle: 'affected:graph - CLI command'\ndescription: 'Graph dependencies affected by changes'\n---\n\n# affected:graph\n\nGraph dependencies affected by changes\n\n## Usage\n\n```shell\nnx affected:graph\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file:\n\n```shell\n nx affected:graph --files=libs/mylib/src/index.ts\n```\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR):\n\n```shell\n nx affected:graph --base=main --head=HEAD\n```\n\nSave the project graph of the workspace in a json file, and highlight the projects affected by the changes between main and HEAD (e.g., PR):\n\n```shell\n nx affected:graph --base=main --head=HEAD --file=output.json\n```\n\nGenerate a static website with project graph data in an html file, highlighting the projects affected by the changes between main and HEAD (e.g., PR):\n\n```shell\n nx affected:graph --base=main --head=HEAD --file=output.html\n```\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by the last commit on main:\n\n```shell\n nx affected:graph --base=main~1 --head=main\n```\n\nOpen the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two:\n\n```shell\n nx affected:graph --exclude=project-one,project-two\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### file\n\nType: `string`\n\nOutput file (e.g. --file=output.json or --file=dep-graph.html)\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### focus\n\nType: `string`\n\nUse to show the project graph for a particular project and every node that is either an ancestor or a descendant.\n\n### groupByFolder\n\nType: `boolean`\n\nGroup projects by folder in the project graph\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### host\n\nType: `string`\n\nBind the project graph server to a specific ip address.\n\n### open\n\nType: `boolean`\n\nDefault: `true`\n\nOpen the project graph in the browser.\n\n### port\n\nType: `number`\n\nBind the project graph server to a specific port.\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n\n### watch\n\nType: `boolean`\n\nDefault: `false`\n\nWatch for changes to project graph and update in-browser\n" - }, - { - "name": "affected:apps", - "id": "affected-apps", - "file": "generated/cli/affected-apps", - "content": "---\ntitle: 'affected:apps - CLI command'\ndescription: 'Print applications affected by changes'\n---\n\n# affected:apps\n\n **Deprecated:** Use `nx print-affected --type=app ...` instead. This command will be removed in v15.\n\n Print applications affected by changes\n\n## Usage\n\n```shell\nnx affected:apps\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint the names of all the apps affected by changing the index.ts file:\n\n```shell\n nx affected:apps --files=libs/mylib/src/index.ts\n```\n\nPrint the names of all the apps affected by the changes between main and HEAD (e.g., PR):\n\n```shell\n nx affected:apps --base=main --head=HEAD\n```\n\nPrint the names of all the apps affected by the last commit on main:\n\n```shell\n nx affected:apps --base=main~1 --head=main\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### plain\n\nProduces a plain output for affected:apps and affected:libs\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "affected:libs", - "id": "affected-libs", - "file": "generated/cli/affected-libs", - "content": "---\ntitle: 'affected:libs - CLI command'\ndescription: 'Print libraries affected by changes'\n---\n\n# affected:libs\n\n **Deprecated:** Use `nx print-affected --type=lib ...` instead. This command will be removed in v15.\n\n Print libraries affected by changes\n\n## Usage\n\n```shell\nnx affected:libs\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint the names of all the libs affected by changing the index.ts file:\n\n```shell\n nx affected:libs --files=libs/mylib/src/index.ts\n```\n\nPrint the names of all the libs affected by the changes between main and HEAD (e.g., PR):\n\n```shell\n nx affected:libs --base=main --head=HEAD\n```\n\nPrint the names of all the libs affected by the last commit on main:\n\n```shell\n nx affected:libs --base=main~1 --head=main\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### plain\n\nProduces a plain output for affected:apps and affected:libs\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "print-affected", - "id": "print-affected", - "file": "generated/cli/print-affected", - "content": "---\ntitle: 'print-affected - CLI command'\ndescription: 'Prints information about the projects and targets affected by changes'\n---\n\n# print-affected\n\nPrints information about the projects and targets affected by changes\n\n## Usage\n\n```shell\nnx print-affected\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint information about affected projects and the project graph:\n\n```shell\n nx print-affected\n```\n\nPrint information about the projects affected by the changes between main and HEAD (e.g,. PR):\n\n```shell\n nx print-affected --base=main --head=HEAD\n```\n\nPrints information about the affected projects and a list of tasks to test them:\n\n```shell\n nx print-affected --target=test\n```\n\nPrints the projects property from the print-affected output:\n\n```shell\n nx print-affected --target=build --select=projects\n```\n\nPrints the tasks.target.project property from the print-affected output:\n\n```shell\n nx print-affected --target=build --select=tasks.target.project\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### select\n\nType: `string`\n\nSelect the subset of the returned json document (e.g., --select=projects)\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### type\n\nType: `string`\n\nChoices: [app, lib]\n\nSelect the type of projects to be returned (e.g., --type=app)\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "format:check", - "id": "format-check", - "tags": ["enforce-project-boundaries"], - "file": "generated/cli/format-check", - "content": "---\ntitle: 'format:check - CLI command'\ndescription: 'Check for un-formatted files'\n---\n\n# format:check\n\nCheck for un-formatted files\n\n## Usage\n\n```shell\nnx format:check\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### libs-and-apps\n\nType: `boolean`\n\nFormat only libraries and applications files.\n\n### projects\n\nType: `array`\n\nProjects to format (comma delimited)\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "format:write", - "id": "format-write", - "tags": ["enforce-project-boundaries"], - "file": "generated/cli/format-write", - "content": "---\ntitle: 'format:write - CLI command'\ndescription: 'Overwrite un-formatted files'\n---\n\n# format:write\n\nOverwrite un-formatted files\n\n## Usage\n\n```shell\nnx format:write\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### libs-and-apps\n\nType: `boolean`\n\nFormat only libraries and applications files.\n\n### projects\n\nType: `array`\n\nProjects to format (comma delimited)\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "migrate", - "id": "migrate", - "tags": ["automate-updating-dependencies"], - "file": "generated/cli/migrate", - "content": "---\ntitle: 'migrate - CLI command'\ndescription:\n 'Creates a migrations file or runs migrations from the migrations file.\n - Migrate packages and create migrations.json (e.g., nx migrate @nrwl/workspace@latest)\n - Run migrations (e.g., nx migrate --run-migrations=migrations.json)'\n---\n\n# migrate\n\nCreates a migrations file or runs migrations from the migrations file.\n\n- Migrate packages and create migrations.json (e.g., nx migrate @nrwl/workspace@latest)\n- Run migrations (e.g., nx migrate --run-migrations=migrations.json)\n\n## Usage\n\n```shell\nnx migrate [packageAndVersion]\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nUpdate @nrwl/workspace to \"next\". This will update other packages and will generate migrations.json:\n\n```shell\n nx migrate next\n```\n\nUpdate @nrwl/workspace to \"9.0.0\". This will update other packages and will generate migrations.json:\n\n```shell\n nx migrate 9.0.0\n```\n\nUpdate @nrwl/workspace and generate the list of migrations starting with version 8.0.0 of @nrwl/workspace and @nrwl/node, regardless of what installed locally:\n\n```shell\n nx migrate @nrwl/workspace@9.0.0 --from=\"@nrwl/workspace@8.0.0,@nrwl/node@8.0.0\"\n```\n\nUpdate @nrwl/workspace to \"9.0.0\". If it tries to update @nrwl/react or @nrwl/angular, use version \"9.0.1\":\n\n```shell\n nx migrate @nrwl/workspace@9.0.0 --to=\"@nrwl/react@9.0.1,@nrwl/angular@9.0.1\"\n```\n\nUpdate another-package to \"12.0.0\". This will update other packages and will generate migrations.json file:\n\n```shell\n nx migrate another-package@12.0.0\n```\n\nRun migrations from the provided migrations.json file. You can modify migrations.json and run this command many times:\n\n```shell\n nx migrate --run-migrations=migrations.json\n```\n\nCreate a dedicated commit for each successfully completed migration. You can customize the prefix used for each commit by additionally setting --commit-prefix=\"PREFIX_HERE \":\n\n```shell\n nx migrate --run-migrations --create-commits\n```\n\n## Options\n\n### commitPrefix\n\nType: `string`\n\nDefault: `chore: [nx migration] `\n\nCommit prefix to apply to the commit for each migration, when --create-commits is enabled\n\n### createCommits\n\nType: `boolean`\n\nDefault: `false`\n\nAutomatically create a git commit after each migration runs\n\n### from\n\nType: `string`\n\nUse the provided versions for packages instead of the ones installed in node_modules (e.g., --from=\"@nrwl/react:12.0.0,@nrwl/js:12.0.0\")\n\n### help\n\nType: `boolean`\n\nShow help\n\n### packageAndVersion\n\nType: `string`\n\nThe target package and version (e.g, @nrwl/workspace@13.0.0)\n\n### runMigrations\n\nType: `string`\n\nExecute migrations from a file (when the file isn't provided, execute migrations from migrations.json)\n\n### to\n\nType: `string`\n\nUse the provided versions for packages instead of the ones calculated by the migrator (e.g., --to=\"@nrwl/react:12.0.0,@nrwl/js:12.0.0\")\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "report", - "id": "report", - "file": "generated/cli/report", - "content": "---\ntitle: 'report - CLI command'\ndescription: 'Reports useful version numbers to copy into the Nx issue template'\n---\n\n# report\n\nReports useful version numbers to copy into the Nx issue template\n\n## Usage\n\n```shell\nnx report\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n" - }, - { - "name": "list", - "id": "list", - "file": "generated/cli/list", - "content": "---\ntitle: 'list - CLI command'\ndescription: 'Lists installed plugins, capabilities of installed plugins and other available plugins.'\n---\n\n# list\n\nLists installed plugins, capabilities of installed plugins and other available plugins.\n\n## Usage\n\n```shell\nnx list [plugin]\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nList the plugins installed in the current workspace:\n\n```shell\n nx list\n```\n\nList the generators and executors available in the `@nrwl/web` plugin if it is installed (If the plugin is not installed `nx` will show advice on how to add it to your workspace):\n\n```shell\n nx list @nrwl/web\n```\n\n## Options\n\n### help\n\nType: `boolean`\n\nShow help\n\n### plugin\n\nType: `string`\n\nThe name of an installed plugin to query\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "workspace-lint", - "id": "workspace-lint", - "tags": ["enforce-project-boundaries"], - "file": "generated/cli/workspace-lint", - "content": "---\ntitle: 'workspace-lint - CLI command'\ndescription: 'Lint nx specific workspace files (nx.json, workspace.json)'\n---\n\n# workspace-lint\n\nLint nx specific workspace files (nx.json, workspace.json)\n\n## Usage\n\n```shell\nnx workspace-lint [files..]\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n" - }, - { - "name": "workspace-generator", - "id": "workspace-generator", - "file": "generated/cli/workspace-generator", - "content": "---\ntitle: 'workspace-generator - CLI command'\ndescription: 'Runs a workspace generator from the tools/generators directory'\n---\n\n# workspace-generator\n\nRuns a workspace generator from the tools/generators directory\n\n## Usage\n\n```shell\nnx workspace-generator [name]\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### help\n\nType: `boolean`\n\nShow help\n\n### list-generators\n\nType: `boolean`\n\nList the available workspace-generators\n\n### name\n\nType: `string`\n\nThe name of your generator\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "connect-to-nx-cloud", - "id": "connect-to-nx-cloud", - "tags": ["cache-task-results", "distribute-task-execution"], - "file": "generated/cli/connect", - "content": "---\ntitle: 'connect - CLI command'\ndescription: 'Connect workspace to Nx Cloud'\n---\n\n# connect\n\nConnect workspace to Nx Cloud\n\n## Usage\n\n```shell\nnx connect\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### help\n\nType: `boolean`\n\nShow help\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "reset", - "id": "reset", - "tags": ["cache-task-results"], - "file": "generated/cli/reset", - "content": "---\ntitle: 'reset - CLI command'\ndescription: 'Clears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.'\n---\n\n# reset\n\nClears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.\n\n## Usage\n\n```shell\nnx reset\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n" - }, - { - "name": "repair", - "id": "repair", - "file": "generated/cli/repair", - "content": "---\ntitle: 'repair - CLI command'\ndescription: 'Repair any configuration that is no longer supported by Nx.'\n---\n\n# repair\n\nRepair any configuration that is no longer supported by Nx.\n\n## Usage\n\n```shell\nnx repair\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### help\n\nType: `boolean`\n\nShow help\n\n### verbose\n\nType: `boolean`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "exec", - "id": "exec", - "file": "generated/cli/exec", - "content": "---\ntitle: 'exec - CLI command'\ndescription: 'Executes any command as if it was a target on the project'\n---\n\n# exec\n\nExecutes any command as if it was a target on the project\n\n## Usage\n\n```shell\nnx exec\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### output-style\n\nType: `string`\n\nChoices: [dynamic, static, stream, stream-without-prefixes, compact]\n\nDefines how Nx emits outputs tasks logs\n\n### parallel\n\nType: `string`\n\nMax number of parallel processes [default is 3]\n\n### project\n\nType: `string`\n\nTarget project\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" - }, - { - "name": "watch", - "id": "watch", - "tags": ["workspace-watching"], - "file": "generated/cli/watch", - "content": "---\ntitle: 'watch - CLI command'\ndescription: 'Watch for changes within projects, and execute commands'\n---\n\n# watch\n\nWatch for changes within projects, and execute commands\n\n## Usage\n\n```shell\nnx watch\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nWatch the \"app\" project and echo the project name and the files that changed:\n\n```shell\n nx watch --projects=app -- echo \\$NX_PROJECT_NAME \\$NX_FILE_CHANGES\n```\n\nWatch \"app1\" and \"app2\" and echo the project name whenever a specified project or its dependencies change:\n\n```shell\n nx watch --projects=app1,app2 --includeDependencies -- echo \\$NX_PROJECT_NAME\n```\n\nWatch all projects (including newly created projects) in the workspace:\n\n```shell\n nx watch --all -- echo \\$NX_PROJECT_NAME\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nWatch all projects.\n\n### help\n\nType: `boolean`\n\nShow help\n\n### includeDependentProjects\n\nType: `boolean`\n\nWhen watching selected projects, include dependent projects as well.\n\n### projects\n\nType: `string`\n\nProjects to watch (comma delimited).\n\n### verbose\n\nType: `boolean`\n\nRun watch mode in verbose mode, where commands are logged before execution.\n\n### version\n\nType: `boolean`\n\nShow version number\n" - } - ], - "generators": [], - "executors": [ - { - "name": "noop", - "implementation": "/packages/nx/src/executors/noop/noop.impl.ts", - "schema": { - "version": 2, - "title": "Noop", - "description": "An executor that does nothing.", - "type": "object", - "cli": "nx", - "outputCapture": "pipe", - "properties": {}, - "additionalProperties": false, - "presets": [] - }, - "description": "An executor that does nothing", - "aliases": [], - "hidden": false, - "path": "/packages/nx/src/executors/noop/schema.json" - }, - { - "name": "run-commands", - "implementation": "/packages/nx/src/executors/run-commands/run-commands.impl.ts", - "schema": { - "version": 2, - "title": "Run Commands", - "description": "Run any custom commands with Nx.", - "type": "object", - "cli": "nx", - "outputCapture": "pipe", - "presets": [ - { "name": "Arguments forwarding", "keys": ["commands"] }, - { - "name": "Custom done conditions", - "keys": ["commands", "readyWhen"] - }, - { "name": "Setting the cwd", "keys": ["commands", "cwd"] } - ], - "properties": { - "commands": { - "type": "array", - "description": "Commands to run in child process.", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "command": { - "type": "string", - "description": "Command to run in child process." - }, - "forwardAllArgs": { - "type": "boolean", - "description": "Whether arguments should be forwarded when interpolation is not present." - }, - "prefix": { - "type": "string", - "description": "Prefix in front of every line out of the output" - }, - "color": { - "type": "string", - "description": "Color of the output", - "enum": [ - "black", - "red", - "green", - "yellow", - "blue", - "magenta", - "cyan", - "white" - ] - }, - "bgColor": { - "type": "string", - "description": "Background color of the output", - "enum": [ - "bgBlack", - "bgRed", - "bgGreen", - "bgYellow", - "bgBlue", - "bgMagenta", - "bgCyan", - "bgWhite" - ] - }, - "description": { - "type": "string", - "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command." - } - }, - "additionalProperties": false, - "required": ["command"] - }, - { "type": "string" } - ] - } - }, - "command": { - "type": "string", - "description": "Command to run in child process." - }, - "parallel": { - "type": "boolean", - "description": "Run commands in parallel.", - "default": true - }, - "readyWhen": { - "type": "string", - "description": "String to appear in `stdout` or `stderr` that indicates that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete." - }, - "args": { - "type": "string", - "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)" - }, - "envFile": { - "type": "string", - "description": "You may specify a custom .env file path." - }, - "color": { - "type": "boolean", - "description": "Use colors when showing output of command.", - "default": false - }, - "outputPath": { - "description": "Allows you to specify where the build artifacts are stored. This allows Nx Cloud to pick them up correctly, in the case that the build artifacts are placed somewhere other than the top level dist folder.", - "oneOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "string" } } - ] - }, - "cwd": { - "type": "string", - "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path." - }, - "__unparsed__": { - "hidden": true, - "type": "array", - "items": { "type": "string" }, - "$default": { "$source": "unparsed" } - } - }, - "additionalProperties": true, - "oneOf": [{ "required": ["commands"] }, { "required": ["command"] }], - "examplesFile": "`project.json`:\n\n```json\n{\n // ...\n \"targets\": {\n //...\n \"ls-project-root\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"ls apps/frontend/src\"\n }\n }\n }\n}\n```\n\n```bash\nnx run frontend:ls-project-root\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Chaining commands\" %}\n\nThe `commands` option accepts as many commands as you want. By default, they all run in parallel.\nYou can run them sequentially by setting `parallel: false`:\n\n```json\n\"create-script\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"commands\": [\n \"mkdir -p apps/frontend/scripts\",\n \"touch apps/frontend/scripts/my-script.sh\",\n \"chmod +x apps/frontend/scripts/my-script.sh\"\n ],\n \"parallel\": false\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Setting the cwd\" %}\n\nBy setting the `cwd` option, each command will run in the `apps/frontend` folder.\n\n```json\n\"create-script\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"cwd\": \"apps/frontend\",\n \"commands\": [\n \"mkdir -p scripts\",\n \"touch scripts/my-script.sh\",\n \"chmod +x scripts/my-script.sh\"\n ],\n \"parallel\": false\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Interpolating Args\" %}\n\nYou can use custom arguments in your scripts with `{args.[someFlag]}`:\n\n```json\n\"create-script\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"cwd\": \"apps/frontend\",\n \"commands\": [\n \"mkdir -p scripts\",\n \"touch scripts/{args.name}.sh\",\n \"chmod +x scripts/{args.name}.sh\"\n ],\n \"parallel\": false\n }\n}\n```\n\nWe run the above with:\n\n```bash\nnx run frontend:create-script --args=\"--name=example\"\n```\n\nor simply with:\n\n```bash\nnx run frontend:create-script --name=example\n```\n\n{% /tab %}\n{% tab label=\"Arguments forwarding\" %}\nWhen interpolation is not present in the command, all arguments are forwarded to the command by default.\n\nThis is useful when you need to pass raw argument strings to your command.\n\nFor example, when you run:\n\n```bash\nnx run frontend:webpack --args=\"--config=example.config.js\"\n```\n\n```json\n\"webpack\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"webpack\"\n }\n}\n```\n\nThe above command will execute: `webpack --config=example.config.js`\n\nThis functionality can be disabled by using `commands` and expanding each `command` into an object\nthat sets the `forwardAllArgs` option to `false` as shown below:\n\n```json\n\"webpack\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"commands\": [\n {\n \"command\": \"webpack\",\n \"forwardAllArgs\": false\n }\n ]\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Shorthand\" %}\nWhen you only need to run a single command, you can use a shorthand for nx:run-commands:\n\n```json\n\"webpack\": {\n \"command\": \"webpack\"\n}\n```\n\n{% /tab %}\n{% tab label=\"Custom done conditions\" %}\n\nNormally, `run-commands` considers the commands done when all of them have finished running. If you don't need to wait until they're all done, you can set a special string that considers the commands finished the moment the string appears in `stdout` or `stderr`:\n\n```json\n\"finish-when-ready\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"commands\": [\n \"sleep 5 && echo 'FINISHED'\",\n \"echo 'READY'\"\n ],\n \"readyWhen\": \"READY\",\n \"parallel\": true\n }\n}\n```\n\n```bash\nnx run frontend:finish-when-ready\n```\n\nThe above commands will finish immediately, instead of waiting for 5 seconds.\n{% /tab %}\n{% tab label=\"Nx Affected\" %}\n\nThe true power of `run-commands` comes from the fact that it runs through `nx`, which knows about your project graph. So you can run **custom commands** only for the projects that have been affected by a change.\n\nWe can create some configurations to generate docs, and if run using `nx affected`, it will only generate documentation for the projects that have been changed:\n\n```bash\nnx affected --target=generate-docs\n```\n\n```json\n//...\n\"frontend\": {\n \"targets\": {\n //...\n \"generate-docs\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"npx compodoc -p apps/frontend/tsconfig.app.json\"\n }\n }\n }\n},\n\"api\": {\n \"targets\": {\n //...\n \"generate-docs\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"npx compodoc -p apps/api/tsconfig.app.json\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n" - }, - "description": "Run any custom commands with Nx.", - "aliases": [], - "hidden": false, - "path": "/packages/nx/src/executors/run-commands/schema.json" - }, - { - "name": "run-script", - "implementation": "/packages/nx/src/executors/run-script/run-script.impl.ts", - "schema": { - "version": 2, - "title": "Run Script", - "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": "An npm script name in the `package.json` file of the project (e.g., `build`)." - }, - "__unparsed__": { - "hidden": true, - "type": "array", - "items": { "type": "string" }, - "$default": { "$source": "unparsed" } - } - }, - "additionalProperties": true, - "required": ["script"], - "examplesFile": "`workspace.json`:\n\n```json\n\"frontend\": {\n \"root\": \"packages/frontend\",\n \"targets\": {\n \"build\": {\n \"executor\": \"nx:run-script\",\n \"options\": {\n \"script\": \"build-my-project\"\n }\n }\n }\n}\n```\n\n```bash\nnx run frontend:build\n```\n\nThe `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory.\n\n#### Caching Artifacts\n\nBy 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:\n\n```json\n\"frontend\": {\n \"root\": \"packages/frontend\",\n \"targets\": {\n \"build\": {\n \"executor\": \"nx:run-script\",\n \"outputs\": [\"{projectRoot}/dist\", \"{projectRoot}/docs\"],\n \"options\": {\n \"script\": \"build-my-project\"\n }\n }\n }\n}\n```\n", - "presets": [] - }, - "description": "Run an NPM script using Nx.", - "aliases": [], - "hidden": false, - "path": "/packages/nx/src/executors/run-script/schema.json" - } - ] -} diff --git a/docs/generated/packages/nx/documents/affected-apps.md b/docs/generated/packages/nx/documents/affected-apps.md new file mode 100644 index 0000000000000..3a012aa50e8d7 --- /dev/null +++ b/docs/generated/packages/nx/documents/affected-apps.md @@ -0,0 +1,100 @@ +--- +title: 'affected:apps - CLI command' +description: 'Print applications affected by changes' +--- + +# affected:apps + + **Deprecated:** Use `nx print-affected --type=app ...` instead. This command will be removed in v15. + + Print applications affected by changes + +## Usage + +```shell +nx affected:apps +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Print the names of all the apps affected by changing the index.ts file: + +```shell + nx affected:apps --files=libs/mylib/src/index.ts +``` + +Print the names of all the apps affected by the changes between main and HEAD (e.g., PR): + +```shell + nx affected:apps --base=main --head=HEAD +``` + +Print the names of all the apps affected by the last commit on main: + +```shell + nx affected:apps --base=main~1 --head=main +``` + +## Options + +### all + +Type: `boolean` + +All projects + +### base + +Type: `string` + +Base of the current branch (usually main) + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### files + +Type: `array` + +Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas + +### head + +Type: `string` + +Latest commit of the current branch (usually HEAD) + +### help + +Type: `boolean` + +Show help + +### plain + +Produces a plain output for affected:apps and affected:libs + +### uncommitted + +Type: `boolean` + +Uncommitted changes + +### untracked + +Type: `boolean` + +Untracked changes + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/affected-dep-graph.md b/docs/generated/packages/nx/documents/affected-dep-graph.md new file mode 100644 index 0000000000000..e7d73c28ce78f --- /dev/null +++ b/docs/generated/packages/nx/documents/affected-dep-graph.md @@ -0,0 +1,158 @@ +--- +title: 'affected:graph - CLI command' +description: 'Graph dependencies affected by changes' +--- + +# affected:graph + +Graph dependencies affected by changes + +## Usage + +```shell +nx affected:graph +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Open the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file: + +```shell + nx affected:graph --files=libs/mylib/src/index.ts +``` + +Open the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR): + +```shell + nx affected:graph --base=main --head=HEAD +``` + +Save the project graph of the workspace in a json file, and highlight the projects affected by the changes between main and HEAD (e.g., PR): + +```shell + nx affected:graph --base=main --head=HEAD --file=output.json +``` + +Generate a static website with project graph data in an html file, highlighting the projects affected by the changes between main and HEAD (e.g., PR): + +```shell + nx affected:graph --base=main --head=HEAD --file=output.html +``` + +Open the project graph of the workspace in the browser, and highlight the projects affected by the last commit on main: + +```shell + nx affected:graph --base=main~1 --head=main +``` + +Open the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two: + +```shell + nx affected:graph --exclude=project-one,project-two +``` + +## Options + +### all + +Type: `boolean` + +All projects + +### base + +Type: `string` + +Base of the current branch (usually main) + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### file + +Type: `string` + +Output file (e.g. --file=output.json or --file=dep-graph.html) + +### files + +Type: `array` + +Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas + +### focus + +Type: `string` + +Use to show the project graph for a particular project and every node that is either an ancestor or a descendant. + +### groupByFolder + +Type: `boolean` + +Group projects by folder in the project graph + +### head + +Type: `string` + +Latest commit of the current branch (usually HEAD) + +### help + +Type: `boolean` + +Show help + +### host + +Type: `string` + +Bind the project graph server to a specific ip address. + +### open + +Type: `boolean` + +Default: `true` + +Open the project graph in the browser. + +### port + +Type: `number` + +Bind the project graph server to a specific port. + +### uncommitted + +Type: `boolean` + +Uncommitted changes + +### untracked + +Type: `boolean` + +Untracked changes + +### version + +Type: `boolean` + +Show version number + +### watch + +Type: `boolean` + +Default: `false` + +Watch for changes to project graph and update in-browser diff --git a/docs/generated/packages/nx/documents/affected-libs.md b/docs/generated/packages/nx/documents/affected-libs.md new file mode 100644 index 0000000000000..5a2d6cd60b67e --- /dev/null +++ b/docs/generated/packages/nx/documents/affected-libs.md @@ -0,0 +1,100 @@ +--- +title: 'affected:libs - CLI command' +description: 'Print libraries affected by changes' +--- + +# affected:libs + + **Deprecated:** Use `nx print-affected --type=lib ...` instead. This command will be removed in v15. + + Print libraries affected by changes + +## Usage + +```shell +nx affected:libs +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Print the names of all the libs affected by changing the index.ts file: + +```shell + nx affected:libs --files=libs/mylib/src/index.ts +``` + +Print the names of all the libs affected by the changes between main and HEAD (e.g., PR): + +```shell + nx affected:libs --base=main --head=HEAD +``` + +Print the names of all the libs affected by the last commit on main: + +```shell + nx affected:libs --base=main~1 --head=main +``` + +## Options + +### all + +Type: `boolean` + +All projects + +### base + +Type: `string` + +Base of the current branch (usually main) + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### files + +Type: `array` + +Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas + +### head + +Type: `string` + +Latest commit of the current branch (usually HEAD) + +### help + +Type: `boolean` + +Show help + +### plain + +Produces a plain output for affected:apps and affected:libs + +### uncommitted + +Type: `boolean` + +Uncommitted changes + +### untracked + +Type: `boolean` + +Untracked changes + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/affected.md b/docs/generated/packages/nx/documents/affected.md new file mode 100644 index 0000000000000..b7896570a2a1c --- /dev/null +++ b/docs/generated/packages/nx/documents/affected.md @@ -0,0 +1,182 @@ +--- +title: 'affected - CLI command' +description: 'Run target for affected projects' +--- + +# affected + +Run target for affected projects + +## Usage + +```shell +nx affected +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Run custom target for all affected projects: + +```shell + nx affected --target=custom-target +``` + +Run tests in parallel: + +```shell + nx affected --target=test --parallel=5 +``` + +Run the test target for all projects: + +```shell + nx affected --target=test --all +``` + +Run tests for all the projects affected by changing the index.ts file: + +```shell + nx affected --target=test --files=libs/mylib/src/index.ts +``` + +Run tests for all the projects affected by the changes between main and HEAD (e.g., PR): + +```shell + nx affected --target=test --base=main --head=HEAD +``` + +Run tests for all the projects affected by the last commit on main: + +```shell + nx affected --target=test --base=main~1 --head=main +``` + +Use the currently executing project name in your command.: + +```shell + nx affected --target=build --tag=$NX_TARGET_TASK_PROJECT:latest +``` + +## Options + +### all + +Type: `boolean` + +All projects + +### base + +Type: `string` + +Base of the current branch (usually main) + +### configuration + +Type: `string` + +This is the configuration to use when performing tasks on projects + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### files + +Type: `array` + +Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas + +### head + +Type: `string` + +Latest commit of the current branch (usually HEAD) + +### help + +Type: `boolean` + +Show help + +### nx-bail + +Type: `boolean` + +Default: `false` + +Stop command execution after the first failed task + +### nx-ignore-cycles + +Type: `boolean` + +Default: `false` + +Ignore cycles in the task graph + +### output-style + +Type: `string` + +Choices: [dynamic, static, stream, stream-without-prefixes] + +Defines how Nx emits outputs tasks logs + +### parallel + +Type: `string` + +Max number of parallel processes [default is 3] + +### runner + +Type: `string` + +This is the name of the tasks runner configured in nx.json + +### skip-nx-cache + +Type: `boolean` + +Default: `false` + +Rerun the tasks even when the results are available in the cache + +### target + +Type: `string` + +Task to run for affected projects + +### uncommitted + +Type: `boolean` + +Uncommitted changes + +### untracked + +Type: `boolean` + +Untracked changes + +### verbose + +Type: `boolean` + +Default: `false` + +Prints additional information about the commands (e.g., stack traces) + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/connect-to-nx-cloud.md b/docs/generated/packages/nx/documents/connect-to-nx-cloud.md new file mode 100644 index 0000000000000..247c3df195843 --- /dev/null +++ b/docs/generated/packages/nx/documents/connect-to-nx-cloud.md @@ -0,0 +1,30 @@ +--- +title: 'connect - CLI command' +description: 'Connect workspace to Nx Cloud' +--- + +# connect + +Connect workspace to Nx Cloud + +## Usage + +```shell +nx connect +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +## Options + +### help + +Type: `boolean` + +Show help + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/create-nx-workspace.md b/docs/generated/packages/nx/documents/create-nx-workspace.md new file mode 100644 index 0000000000000..b004b08625f1c --- /dev/null +++ b/docs/generated/packages/nx/documents/create-nx-workspace.md @@ -0,0 +1,136 @@ +--- +title: 'create-nx-workspace - CLI command' +description: 'Create a new Nx workspace' +--- + +# create-nx-workspace + +Create a new Nx workspace + +## Usage + +```bash +create-nx-workspace [name] [options] +``` + +Install `create-nx-workspace` globally to invoke the command directly, or use `npx create-nx-workspace`, `yarn create nx-workspace`, or `pnpx create-nx-workspace`. + +## Options + +### allPrompts + +Type: `boolean` + +Default: `false` + +Show all prompts + +### appName + +Type: `string` + +The name of the application when a preset with pregenerated app is selected + +### ci + +Type: `string` + +Choices: [github, circleci, azure] + +Generate a CI workflow file + +### cli + +Type: `string` + +Choices: [nx, angular] + +CLI to power the Nx workspace + +### commit.email + +Type: `string` + +E-mail of the committer + +### commit.message + +Type: `string` + +Default: `Initial commit` + +Commit message + +### commit.name + +Type: `string` + +Name of the committer + +### defaultBase + +Type: `string` + +Default: `main` + +Default base to use for new projects + +### help + +Type: `boolean` + +Show help + +### interactive + +Type: `boolean` + +Enable interactive mode with presets + +### name + +Type: `string` + +Workspace name (e.g. org name) + +### nxCloud + +Type: `boolean` + +Enable distributed caching to make your CI faster + +### packageManager + +Type: `string` + +Choices: [npm, pnpm, yarn] + +Default: `npm` + +Package manager to use + +### preset + +Type: `string` + +Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "react-native", "expo", "next", "nest", "express", "react", "angular"]. To build your own see https://nx.dev/packages/nx-plugin#preset + +### skipGit + +Type: `boolean` + +Default: `false` + +Skip initializing a git repository. + +### style + +Type: `string` + +Style option to be used when a preset with pregenerated app is selected + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/daemon.md b/docs/generated/packages/nx/documents/daemon.md new file mode 100644 index 0000000000000..d9f12325e5710 --- /dev/null +++ b/docs/generated/packages/nx/documents/daemon.md @@ -0,0 +1,42 @@ +--- +title: 'daemon - CLI command' +description: 'Prints information about the Nx Daemon process or starts a daemon process' +--- + +# daemon + +Prints information about the Nx Daemon process or starts a daemon process + +## Usage + +```shell +nx daemon +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +## Options + +### help + +Type: `boolean` + +Show help + +### start + +Type: `boolean` + +Default: `false` + +### stop + +Type: `boolean` + +Default: `false` + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/dep-graph.md b/docs/generated/packages/nx/documents/dep-graph.md new file mode 100644 index 0000000000000..4152b0323e001 --- /dev/null +++ b/docs/generated/packages/nx/documents/dep-graph.md @@ -0,0 +1,132 @@ +--- +title: 'graph - CLI command' +description: 'Graph dependencies within workspace' +--- + +# graph + +Graph dependencies within workspace + +## Usage + +```shell +nx graph +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Open the project graph of the workspace in the browser: + +```shell + nx graph +``` + +Save the project graph into a json file: + +```shell + nx graph --file=output.json +``` + +Generate a static website with project graph into an html file, accompanied by an asset folder called static: + +```shell + nx graph --file=output.html +``` + +Show the graph where every node is either an ancestor or a descendant of todos-feature-main: + +```shell + nx graph --focus=todos-feature-main +``` + +Include project-one and project-two in the project graph: + +```shell + nx graph --include=project-one,project-two +``` + +Exclude project-one and project-two from the project graph: + +```shell + nx graph --exclude=project-one,project-two +``` + +Show the graph where every node is either an ancestor or a descendant of todos-feature-main, but exclude project-one and project-two: + +```shell + nx graph --focus=todos-feature-main --exclude=project-one,project-two +``` + +Watch for changes to project graph and update in-browser: + +```shell + nx graph --watch +``` + +## Options + +### exclude + +Type: `array` + +List of projects delimited by commas to exclude from the project graph. + +### file + +Type: `string` + +Output file (e.g. --file=output.json or --file=dep-graph.html) + +### focus + +Type: `string` + +Use to show the project graph for a particular project and every node that is either an ancestor or a descendant. + +### groupByFolder + +Type: `boolean` + +Group projects by folder in the project graph + +### help + +Type: `boolean` + +Show help + +### host + +Type: `string` + +Bind the project graph server to a specific ip address. + +### open + +Type: `boolean` + +Default: `true` + +Open the project graph in the browser. + +### port + +Type: `number` + +Bind the project graph server to a specific port. + +### version + +Type: `boolean` + +Show version number + +### watch + +Type: `boolean` + +Default: `false` + +Watch for changes to project graph and update in-browser diff --git a/docs/generated/packages/nx/documents/exec.md b/docs/generated/packages/nx/documents/exec.md new file mode 100644 index 0000000000000..fe4658f799db8 --- /dev/null +++ b/docs/generated/packages/nx/documents/exec.md @@ -0,0 +1,102 @@ +--- +title: 'exec - CLI command' +description: 'Executes any command as if it was a target on the project' +--- + +# exec + +Executes any command as if it was a target on the project + +## Usage + +```shell +nx exec +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +## Options + +### configuration + +Type: `string` + +This is the configuration to use when performing tasks on projects + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### nx-bail + +Type: `boolean` + +Default: `false` + +Stop command execution after the first failed task + +### nx-ignore-cycles + +Type: `boolean` + +Default: `false` + +Ignore cycles in the task graph + +### output-style + +Type: `string` + +Choices: [dynamic, static, stream, stream-without-prefixes, compact] + +Defines how Nx emits outputs tasks logs + +### parallel + +Type: `string` + +Max number of parallel processes [default is 3] + +### project + +Type: `string` + +Target project + +### runner + +Type: `string` + +This is the name of the tasks runner configured in nx.json + +### skip-nx-cache + +Type: `boolean` + +Default: `false` + +Rerun the tasks even when the results are available in the cache + +### target + +Type: `string` + +Task to run for affected projects + +### verbose + +Type: `boolean` + +Default: `false` + +Prints additional information about the commands (e.g., stack traces) + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/format-check.md b/docs/generated/packages/nx/documents/format-check.md new file mode 100644 index 0000000000000..4c5d2795cbb59 --- /dev/null +++ b/docs/generated/packages/nx/documents/format-check.md @@ -0,0 +1,86 @@ +--- +title: 'format:check - CLI command' +description: 'Check for un-formatted files' +--- + +# format:check + +Check for un-formatted files + +## Usage + +```shell +nx format:check +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +## Options + +### all + +Type: `boolean` + +All projects + +### base + +Type: `string` + +Base of the current branch (usually main) + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### files + +Type: `array` + +Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas + +### head + +Type: `string` + +Latest commit of the current branch (usually HEAD) + +### help + +Type: `boolean` + +Show help + +### libs-and-apps + +Type: `boolean` + +Format only libraries and applications files. + +### projects + +Type: `array` + +Projects to format (comma delimited) + +### uncommitted + +Type: `boolean` + +Uncommitted changes + +### untracked + +Type: `boolean` + +Untracked changes + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/format-write.md b/docs/generated/packages/nx/documents/format-write.md new file mode 100644 index 0000000000000..80df4c283724b --- /dev/null +++ b/docs/generated/packages/nx/documents/format-write.md @@ -0,0 +1,86 @@ +--- +title: 'format:write - CLI command' +description: 'Overwrite un-formatted files' +--- + +# format:write + +Overwrite un-formatted files + +## Usage + +```shell +nx format:write +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +## Options + +### all + +Type: `boolean` + +All projects + +### base + +Type: `string` + +Base of the current branch (usually main) + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### files + +Type: `array` + +Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas + +### head + +Type: `string` + +Latest commit of the current branch (usually HEAD) + +### help + +Type: `boolean` + +Show help + +### libs-and-apps + +Type: `boolean` + +Format only libraries and applications files. + +### projects + +Type: `array` + +Projects to format (comma delimited) + +### uncommitted + +Type: `boolean` + +Uncommitted changes + +### untracked + +Type: `boolean` + +Untracked changes + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/generate.md b/docs/generated/packages/nx/documents/generate.md new file mode 100644 index 0000000000000..a4a6e4d5c67ea --- /dev/null +++ b/docs/generated/packages/nx/documents/generate.md @@ -0,0 +1,98 @@ +--- +title: 'generate - CLI command' +description: 'Runs a generator that creates and/or modifies files based on a generator from a collection.' +--- + +# generate + +Runs a generator that creates and/or modifies files based on a generator from a collection. + +## Usage + +```shell +nx generate +``` + +```shell +nx g +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`. + +### Examples + +Generate a new Angular application: + +```shell +nx generate @nrwl/angular:app myapp +``` + +Generate a new React application: + +```shell +nx generate @nrwl/react:app myapp +``` + +Generate a new web component application: + +```shell +nx generate @nrwl/web:app myapp +``` + +Generate a new Node application: + +```shell +nx generate @nrwl/node:app myapp +``` + +Generate a new Angular library application: + +```shell +nx generate @nrwl/angular:library mylibrary +``` + +Generate a new React library application: + +```shell +nx generate @nrwl/react:library mylibrary +``` + +Generate a new Node library application: + +```shell +nx generate @nrwl/node:library mylibrary +``` + +## Options + +### defaults + +Default: `false` + +When true, disables interactive input prompts for options with a default. + +### dryRun + +Default: `false` + +When true, preview the changes without updating files. + +### force + +Default: `false` + +When true, forces overwriting of existing files. + +### interactive + +Default: `true` + +When false, disables interactive input prompts. + +### help + +Show help and display available generators in the default collection. + +### version + +Show version number diff --git a/docs/generated/packages/nx/documents/init.md b/docs/generated/packages/nx/documents/init.md new file mode 100644 index 0000000000000..25a3d60b02e5b --- /dev/null +++ b/docs/generated/packages/nx/documents/init.md @@ -0,0 +1,16 @@ +--- +title: 'init - CLI command' +description: 'Adds nx.json file and installs nx if not installed already' +--- + +# init + +Adds nx.json file and installs nx if not installed already + +## Usage + +```shell +nx init +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. diff --git a/docs/generated/packages/nx/documents/list.md b/docs/generated/packages/nx/documents/list.md new file mode 100644 index 0000000000000..ae5c2bf3eb085 --- /dev/null +++ b/docs/generated/packages/nx/documents/list.md @@ -0,0 +1,50 @@ +--- +title: 'list - CLI command' +description: 'Lists installed plugins, capabilities of installed plugins and other available plugins.' +--- + +# list + +Lists installed plugins, capabilities of installed plugins and other available plugins. + +## Usage + +```shell +nx list [plugin] +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +List the plugins installed in the current workspace: + +```shell + nx list +``` + +List the generators and executors available in the `@nrwl/web` plugin if it is installed (If the plugin is not installed `nx` will show advice on how to add it to your workspace): + +```shell + nx list @nrwl/web +``` + +## Options + +### help + +Type: `boolean` + +Show help + +### plugin + +Type: `string` + +The name of an installed plugin to query + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/migrate.md b/docs/generated/packages/nx/documents/migrate.md new file mode 100644 index 0000000000000..81655296c2d06 --- /dev/null +++ b/docs/generated/packages/nx/documents/migrate.md @@ -0,0 +1,120 @@ +--- +title: 'migrate - CLI command' +description: + 'Creates a migrations file or runs migrations from the migrations file. + - Migrate packages and create migrations.json (e.g., nx migrate @nrwl/workspace@latest) + - Run migrations (e.g., nx migrate --run-migrations=migrations.json)' +--- + +# migrate + +Creates a migrations file or runs migrations from the migrations file. + +- Migrate packages and create migrations.json (e.g., nx migrate @nrwl/workspace@latest) +- Run migrations (e.g., nx migrate --run-migrations=migrations.json) + +## Usage + +```shell +nx migrate [packageAndVersion] +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Update @nrwl/workspace to "next". This will update other packages and will generate migrations.json: + +```shell + nx migrate next +``` + +Update @nrwl/workspace to "9.0.0". This will update other packages and will generate migrations.json: + +```shell + nx migrate 9.0.0 +``` + +Update @nrwl/workspace and generate the list of migrations starting with version 8.0.0 of @nrwl/workspace and @nrwl/node, regardless of what installed locally: + +```shell + nx migrate @nrwl/workspace@9.0.0 --from="@nrwl/workspace@8.0.0,@nrwl/node@8.0.0" +``` + +Update @nrwl/workspace to "9.0.0". If it tries to update @nrwl/react or @nrwl/angular, use version "9.0.1": + +```shell + nx migrate @nrwl/workspace@9.0.0 --to="@nrwl/react@9.0.1,@nrwl/angular@9.0.1" +``` + +Update another-package to "12.0.0". This will update other packages and will generate migrations.json file: + +```shell + nx migrate another-package@12.0.0 +``` + +Run migrations from the provided migrations.json file. You can modify migrations.json and run this command many times: + +```shell + nx migrate --run-migrations=migrations.json +``` + +Create a dedicated commit for each successfully completed migration. You can customize the prefix used for each commit by additionally setting --commit-prefix="PREFIX_HERE ": + +```shell + nx migrate --run-migrations --create-commits +``` + +## Options + +### commitPrefix + +Type: `string` + +Default: `chore: [nx migration] ` + +Commit prefix to apply to the commit for each migration, when --create-commits is enabled + +### createCommits + +Type: `boolean` + +Default: `false` + +Automatically create a git commit after each migration runs + +### from + +Type: `string` + +Use the provided versions for packages instead of the ones installed in node_modules (e.g., --from="@nrwl/react:12.0.0,@nrwl/js:12.0.0") + +### help + +Type: `boolean` + +Show help + +### packageAndVersion + +Type: `string` + +The target package and version (e.g, @nrwl/workspace@13.0.0) + +### runMigrations + +Type: `string` + +Execute migrations from a file (when the file isn't provided, execute migrations from migrations.json) + +### to + +Type: `string` + +Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nrwl/react:12.0.0,@nrwl/js:12.0.0") + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/print-affected.md b/docs/generated/packages/nx/documents/print-affected.md new file mode 100644 index 0000000000000..27a0e86547bcb --- /dev/null +++ b/docs/generated/packages/nx/documents/print-affected.md @@ -0,0 +1,132 @@ +--- +title: 'print-affected - CLI command' +description: 'Prints information about the projects and targets affected by changes' +--- + +# print-affected + +Prints information about the projects and targets affected by changes + +## Usage + +```shell +nx print-affected +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Print information about affected projects and the project graph: + +```shell + nx print-affected +``` + +Print information about the projects affected by the changes between main and HEAD (e.g,. PR): + +```shell + nx print-affected --base=main --head=HEAD +``` + +Prints information about the affected projects and a list of tasks to test them: + +```shell + nx print-affected --target=test +``` + +Prints the projects property from the print-affected output: + +```shell + nx print-affected --target=build --select=projects +``` + +Prints the tasks.target.project property from the print-affected output: + +```shell + nx print-affected --target=build --select=tasks.target.project +``` + +## Options + +### all + +Type: `boolean` + +All projects + +### base + +Type: `string` + +Base of the current branch (usually main) + +### configuration + +Type: `string` + +This is the configuration to use when performing tasks on projects + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### files + +Type: `array` + +Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas + +### head + +Type: `string` + +Latest commit of the current branch (usually HEAD) + +### help + +Type: `boolean` + +Show help + +### select + +Type: `string` + +Select the subset of the returned json document (e.g., --select=projects) + +### target + +Type: `string` + +Task to run for affected projects + +### type + +Type: `string` + +Choices: [app, lib] + +Select the type of projects to be returned (e.g., --type=app) + +### uncommitted + +Type: `boolean` + +Uncommitted changes + +### untracked + +Type: `boolean` + +Untracked changes + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/repair.md b/docs/generated/packages/nx/documents/repair.md new file mode 100644 index 0000000000000..ec8253216a81a --- /dev/null +++ b/docs/generated/packages/nx/documents/repair.md @@ -0,0 +1,36 @@ +--- +title: 'repair - CLI command' +description: 'Repair any configuration that is no longer supported by Nx.' +--- + +# repair + +Repair any configuration that is no longer supported by Nx. + +## Usage + +```shell +nx repair +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +## Options + +### help + +Type: `boolean` + +Show help + +### verbose + +Type: `boolean` + +Prints additional information about the commands (e.g., stack traces) + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/report.md b/docs/generated/packages/nx/documents/report.md new file mode 100644 index 0000000000000..6b7e88a2901a7 --- /dev/null +++ b/docs/generated/packages/nx/documents/report.md @@ -0,0 +1,16 @@ +--- +title: 'report - CLI command' +description: 'Reports useful version numbers to copy into the Nx issue template' +--- + +# report + +Reports useful version numbers to copy into the Nx issue template + +## Usage + +```shell +nx report +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. diff --git a/docs/generated/packages/nx/documents/reset.md b/docs/generated/packages/nx/documents/reset.md new file mode 100644 index 0000000000000..7f036bb07d82d --- /dev/null +++ b/docs/generated/packages/nx/documents/reset.md @@ -0,0 +1,16 @@ +--- +title: 'reset - CLI command' +description: 'Clears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.' +--- + +# reset + +Clears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon. + +## Usage + +```shell +nx reset +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. diff --git a/docs/generated/packages/nx/documents/run-many.md b/docs/generated/packages/nx/documents/run-many.md new file mode 100644 index 0000000000000..8db25d371fd70 --- /dev/null +++ b/docs/generated/packages/nx/documents/run-many.md @@ -0,0 +1,142 @@ +--- +title: 'run-many - CLI command' +description: 'Run target for multiple listed projects' +--- + +# run-many + +Run target for multiple listed projects + +## Usage + +```shell +nx run-many +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Test all projects: + +```shell + nx run-many --target=test +``` + +Test proj1 and proj2: + +```shell + nx run-many --target=test --projects=proj1,proj2 +``` + +Test proj1 and proj2 in parallel: + +```shell + nx run-many --target=test --projects=proj1,proj2 --parallel=2 +``` + +Test all projects ending with `*-app` except `excluded-app`: + +```shell + nx run-many --target=test --projects=*-app --exclude excluded-app +``` + +## Options + +### all + +Type: `boolean` + +Default: `true` + +[deprecated] Run the target on all projects in the workspace + +### configuration + +Type: `string` + +This is the configuration to use when performing tasks on projects + +### exclude + +Type: `array` + +Default: `[]` + +Exclude certain projects from being processed + +### help + +Type: `boolean` + +Show help + +### nx-bail + +Type: `boolean` + +Default: `false` + +Stop command execution after the first failed task + +### nx-ignore-cycles + +Type: `boolean` + +Default: `false` + +Ignore cycles in the task graph + +### output-style + +Type: `string` + +Choices: [dynamic, static, stream, stream-without-prefixes] + +Defines how Nx emits outputs tasks logs + +### parallel + +Type: `string` + +Max number of parallel processes [default is 3] + +### projects + +Type: `string` + +Projects to run. (comma delimited project names and/or patterns) + +### runner + +Type: `string` + +This is the name of the tasks runner configured in nx.json + +### skip-nx-cache + +Type: `boolean` + +Default: `false` + +Rerun the tasks even when the results are available in the cache + +### target + +Type: `string` + +Task to run for affected projects + +### verbose + +Type: `boolean` + +Default: `false` + +Prints additional information about the commands (e.g., stack traces) + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/run.md b/docs/generated/packages/nx/documents/run.md new file mode 100644 index 0000000000000..98bd15d0bb5da --- /dev/null +++ b/docs/generated/packages/nx/documents/run.md @@ -0,0 +1,44 @@ +--- +title: 'run - CLI command' +description: 'Runs an Architect target with an optional custom builder configuration defined in your project.' +--- + +# run + +Runs an Architect target with an optional custom builder configuration defined in your project. + +## Usage + +```shell +nx run [options] +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpx nx`. + +### Examples + +Run the `build` target for the `myapp` : + +```shell +nx run myapp:build +``` + +Run the `build` target for the `myapp` project with a `production` configuration: + +```shell +nx run myapp:build:production +``` + +## Options + +### configuration (-c) + +A named builder configuration, defined in the "configurations" section of the workspace configuration file. The builder uses the named configuration to run the given target. + +### help + +Show help + +### version + +Show version number diff --git a/docs/generated/packages/nx/documents/watch.md b/docs/generated/packages/nx/documents/watch.md new file mode 100644 index 0000000000000..6d608b5f0ea72 --- /dev/null +++ b/docs/generated/packages/nx/documents/watch.md @@ -0,0 +1,74 @@ +--- +title: 'watch - CLI command' +description: 'Watch for changes within projects, and execute commands' +--- + +# watch + +Watch for changes within projects, and execute commands + +## Usage + +```shell +nx watch +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +### Examples + +Watch the "app" project and echo the project name and the files that changed: + +```shell + nx watch --projects=app -- echo \$NX_PROJECT_NAME \$NX_FILE_CHANGES +``` + +Watch "app1" and "app2" and echo the project name whenever a specified project or its dependencies change: + +```shell + nx watch --projects=app1,app2 --includeDependencies -- echo \$NX_PROJECT_NAME +``` + +Watch all projects (including newly created projects) in the workspace: + +```shell + nx watch --all -- echo \$NX_PROJECT_NAME +``` + +## Options + +### all + +Type: `boolean` + +Watch all projects. + +### help + +Type: `boolean` + +Show help + +### includeDependentProjects + +Type: `boolean` + +When watching selected projects, include dependent projects as well. + +### projects + +Type: `string` + +Projects to watch (comma delimited). + +### verbose + +Type: `boolean` + +Run watch mode in verbose mode, where commands are logged before execution. + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/workspace-generator.md b/docs/generated/packages/nx/documents/workspace-generator.md new file mode 100644 index 0000000000000..1c471c86aac55 --- /dev/null +++ b/docs/generated/packages/nx/documents/workspace-generator.md @@ -0,0 +1,42 @@ +--- +title: 'workspace-generator - CLI command' +description: 'Runs a workspace generator from the tools/generators directory' +--- + +# workspace-generator + +Runs a workspace generator from the tools/generators directory + +## Usage + +```shell +nx workspace-generator [name] +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. + +## Options + +### help + +Type: `boolean` + +Show help + +### list-generators + +Type: `boolean` + +List the available workspace-generators + +### name + +Type: `string` + +The name of your generator + +### version + +Type: `boolean` + +Show version number diff --git a/docs/generated/packages/nx/documents/workspace-lint.md b/docs/generated/packages/nx/documents/workspace-lint.md new file mode 100644 index 0000000000000..d119c1a14d6d7 --- /dev/null +++ b/docs/generated/packages/nx/documents/workspace-lint.md @@ -0,0 +1,16 @@ +--- +title: 'workspace-lint - CLI command' +description: 'Lint nx specific workspace files (nx.json, workspace.json)' +--- + +# workspace-lint + +Lint nx specific workspace files (nx.json, workspace.json) + +## Usage + +```shell +nx workspace-lint [files..] +``` + +Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. diff --git a/docs/generated/packages/nx/executors/noop.json b/docs/generated/packages/nx/executors/noop.json new file mode 100644 index 0000000000000..a4eb444a3f231 --- /dev/null +++ b/docs/generated/packages/nx/executors/noop.json @@ -0,0 +1,20 @@ +{ + "name": "noop", + "implementation": "/packages/nx/src/executors/noop/noop.impl.ts", + "schema": { + "version": 2, + "title": "Noop", + "description": "An executor that does nothing.", + "type": "object", + "cli": "nx", + "outputCapture": "pipe", + "properties": {}, + "additionalProperties": false, + "presets": [] + }, + "description": "An executor that does nothing", + "aliases": [], + "hidden": false, + "path": "/packages/nx/src/executors/noop/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/nx/executors/run-commands.json b/docs/generated/packages/nx/executors/run-commands.json new file mode 100644 index 0000000000000..fd35bc9b6910f --- /dev/null +++ b/docs/generated/packages/nx/executors/run-commands.json @@ -0,0 +1,130 @@ +{ + "name": "run-commands", + "implementation": "/packages/nx/src/executors/run-commands/run-commands.impl.ts", + "schema": { + "version": 2, + "title": "Run Commands", + "description": "Run any custom commands with Nx.", + "type": "object", + "cli": "nx", + "outputCapture": "pipe", + "presets": [ + { "name": "Arguments forwarding", "keys": ["commands"] }, + { "name": "Custom done conditions", "keys": ["commands", "readyWhen"] }, + { "name": "Setting the cwd", "keys": ["commands", "cwd"] } + ], + "properties": { + "commands": { + "type": "array", + "description": "Commands to run in child process.", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "Command to run in child process." + }, + "forwardAllArgs": { + "type": "boolean", + "description": "Whether arguments should be forwarded when interpolation is not present." + }, + "prefix": { + "type": "string", + "description": "Prefix in front of every line out of the output" + }, + "color": { + "type": "string", + "description": "Color of the output", + "enum": [ + "black", + "red", + "green", + "yellow", + "blue", + "magenta", + "cyan", + "white" + ] + }, + "bgColor": { + "type": "string", + "description": "Background color of the output", + "enum": [ + "bgBlack", + "bgRed", + "bgGreen", + "bgYellow", + "bgBlue", + "bgMagenta", + "bgCyan", + "bgWhite" + ] + }, + "description": { + "type": "string", + "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command." + } + }, + "additionalProperties": false, + "required": ["command"] + }, + { "type": "string" } + ] + } + }, + "command": { + "type": "string", + "description": "Command to run in child process." + }, + "parallel": { + "type": "boolean", + "description": "Run commands in parallel.", + "default": true + }, + "readyWhen": { + "type": "string", + "description": "String to appear in `stdout` or `stderr` that indicates that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete." + }, + "args": { + "type": "string", + "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)" + }, + "envFile": { + "type": "string", + "description": "You may specify a custom .env file path." + }, + "color": { + "type": "boolean", + "description": "Use colors when showing output of command.", + "default": false + }, + "outputPath": { + "description": "Allows you to specify where the build artifacts are stored. This allows Nx Cloud to pick them up correctly, in the case that the build artifacts are placed somewhere other than the top level dist folder.", + "oneOf": [ + { "type": "string" }, + { "type": "array", "items": { "type": "string" } } + ] + }, + "cwd": { + "type": "string", + "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path." + }, + "__unparsed__": { + "hidden": true, + "type": "array", + "items": { "type": "string" }, + "$default": { "$source": "unparsed" } + } + }, + "additionalProperties": true, + "oneOf": [{ "required": ["commands"] }, { "required": ["command"] }], + "examplesFile": "`project.json`:\n\n```json\n{\n // ...\n \"targets\": {\n //...\n \"ls-project-root\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"ls apps/frontend/src\"\n }\n }\n }\n}\n```\n\n```bash\nnx run frontend:ls-project-root\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Chaining commands\" %}\n\nThe `commands` option accepts as many commands as you want. By default, they all run in parallel.\nYou can run them sequentially by setting `parallel: false`:\n\n```json\n\"create-script\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"commands\": [\n \"mkdir -p apps/frontend/scripts\",\n \"touch apps/frontend/scripts/my-script.sh\",\n \"chmod +x apps/frontend/scripts/my-script.sh\"\n ],\n \"parallel\": false\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Setting the cwd\" %}\n\nBy setting the `cwd` option, each command will run in the `apps/frontend` folder.\n\n```json\n\"create-script\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"cwd\": \"apps/frontend\",\n \"commands\": [\n \"mkdir -p scripts\",\n \"touch scripts/my-script.sh\",\n \"chmod +x scripts/my-script.sh\"\n ],\n \"parallel\": false\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Interpolating Args\" %}\n\nYou can use custom arguments in your scripts with `{args.[someFlag]}`:\n\n```json\n\"create-script\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"cwd\": \"apps/frontend\",\n \"commands\": [\n \"mkdir -p scripts\",\n \"touch scripts/{args.name}.sh\",\n \"chmod +x scripts/{args.name}.sh\"\n ],\n \"parallel\": false\n }\n}\n```\n\nWe run the above with:\n\n```bash\nnx run frontend:create-script --args=\"--name=example\"\n```\n\nor simply with:\n\n```bash\nnx run frontend:create-script --name=example\n```\n\n{% /tab %}\n{% tab label=\"Arguments forwarding\" %}\nWhen interpolation is not present in the command, all arguments are forwarded to the command by default.\n\nThis is useful when you need to pass raw argument strings to your command.\n\nFor example, when you run:\n\n```bash\nnx run frontend:webpack --args=\"--config=example.config.js\"\n```\n\n```json\n\"webpack\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"webpack\"\n }\n}\n```\n\nThe above command will execute: `webpack --config=example.config.js`\n\nThis functionality can be disabled by using `commands` and expanding each `command` into an object\nthat sets the `forwardAllArgs` option to `false` as shown below:\n\n```json\n\"webpack\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"commands\": [\n {\n \"command\": \"webpack\",\n \"forwardAllArgs\": false\n }\n ]\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Shorthand\" %}\nWhen you only need to run a single command, you can use a shorthand for nx:run-commands:\n\n```json\n\"webpack\": {\n \"command\": \"webpack\"\n}\n```\n\n{% /tab %}\n{% tab label=\"Custom done conditions\" %}\n\nNormally, `run-commands` considers the commands done when all of them have finished running. If you don't need to wait until they're all done, you can set a special string that considers the commands finished the moment the string appears in `stdout` or `stderr`:\n\n```json\n\"finish-when-ready\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"commands\": [\n \"sleep 5 && echo 'FINISHED'\",\n \"echo 'READY'\"\n ],\n \"readyWhen\": \"READY\",\n \"parallel\": true\n }\n}\n```\n\n```bash\nnx run frontend:finish-when-ready\n```\n\nThe above commands will finish immediately, instead of waiting for 5 seconds.\n{% /tab %}\n{% tab label=\"Nx Affected\" %}\n\nThe true power of `run-commands` comes from the fact that it runs through `nx`, which knows about your project graph. So you can run **custom commands** only for the projects that have been affected by a change.\n\nWe can create some configurations to generate docs, and if run using `nx affected`, it will only generate documentation for the projects that have been changed:\n\n```bash\nnx affected --target=generate-docs\n```\n\n```json\n//...\n\"frontend\": {\n \"targets\": {\n //...\n \"generate-docs\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"npx compodoc -p apps/frontend/tsconfig.app.json\"\n }\n }\n }\n},\n\"api\": {\n \"targets\": {\n //...\n \"generate-docs\": {\n \"executor\": \"nx:run-commands\",\n \"options\": {\n \"command\": \"npx compodoc -p apps/api/tsconfig.app.json\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n" + }, + "description": "Run any custom commands with Nx.", + "aliases": [], + "hidden": false, + "path": "/packages/nx/src/executors/run-commands/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/nx/executors/run-script.json b/docs/generated/packages/nx/executors/run-script.json new file mode 100644 index 0000000000000..9c9150636010b --- /dev/null +++ b/docs/generated/packages/nx/executors/run-script.json @@ -0,0 +1,33 @@ +{ + "name": "run-script", + "implementation": "/packages/nx/src/executors/run-script/run-script.impl.ts", + "schema": { + "version": 2, + "title": "Run Script", + "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": "An npm script name in the `package.json` file of the project (e.g., `build`)." + }, + "__unparsed__": { + "hidden": true, + "type": "array", + "items": { "type": "string" }, + "$default": { "$source": "unparsed" } + } + }, + "additionalProperties": true, + "required": ["script"], + "examplesFile": "`workspace.json`:\n\n```json\n\"frontend\": {\n \"root\": \"packages/frontend\",\n \"targets\": {\n \"build\": {\n \"executor\": \"nx:run-script\",\n \"options\": {\n \"script\": \"build-my-project\"\n }\n }\n }\n}\n```\n\n```bash\nnx run frontend:build\n```\n\nThe `build` target is going to run `npm run build-my-project` (or `yarn build-my-project`) in the `packages/frontend` directory.\n\n#### Caching Artifacts\n\nBy 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:\n\n```json\n\"frontend\": {\n \"root\": \"packages/frontend\",\n \"targets\": {\n \"build\": {\n \"executor\": \"nx:run-script\",\n \"outputs\": [\"{projectRoot}/dist\", \"{projectRoot}/docs\"],\n \"options\": {\n \"script\": \"build-my-project\"\n }\n }\n }\n}\n```\n", + "presets": [] + }, + "description": "Run an NPM script using Nx.", + "aliases": [], + "hidden": false, + "path": "/packages/nx/src/executors/run-script/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native.json b/docs/generated/packages/react-native.json deleted file mode 100644 index afdc1eb868efb..0000000000000 --- a/docs/generated/packages/react-native.json +++ /dev/null @@ -1,969 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "react-native", - "packageName": "@nrwl/react-native", - "description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.", - "root": "/packages/react-native", - "source": "/packages/react-native/src", - "documentation": [ - { - "id": "overview", - "name": "Overview", - "path": "/packages/react-native", - "file": "shared/react-native-plugin", - "content": "React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.\n\nThe Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides:\n\n- Integration with libraries such as Jest, Detox, and Storybook.\n- Scaffolding for creating buildable libraries that can be published to npm.\n- Utilities for automatic workspace refactoring.\n\n## Setting Up React Native\n\n### Create a New Workspace\n\nThe easiest way to create your workspace is via `npx`.\n\n```shell\nnpx create-nx-workspace your-workspace-name \\\n--preset=react-native \\\n--appName=your-app-name\n```\n\n{% callout type=\"note\" title=\"Don't know what you need?\" %}\nYou can also run the command without arguments to go through the interactive prompts.\n{% /callout %}\n\n```shell\nnpx create-nx-workspace your-workspace-name\n```\n\n### Adding React Native to an Existing Workspace\n\nFor existing Nx workspaces, install the `@nrwl/react-native` package to add React Native capabilities to it.\n\n```shell\nnpm install @nrwl/react-native --save-dev\n\n# Or with yarn\nyarn add @nrwl/react-native --dev\n```\n\n### Generating Applications\n\nTo create additional React Native apps run:\n\n```shell\nnx g @nrwl/react-native:app your-app-name\n```\n\n### Generating Libraries\n\nTo generate a new library run:\n\n```shell\nnpx nx g @nrwl/react-native:lib your-lib-name\n```\n\n### Generating Components\n\nTo generate a new component inside library run:\n\n```shell\nnpx nx g @nrwl/react-native:component your-component-name --project=your-lib-name --export\n```\n\nReplace `your-lib-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`\n\n## Using React Native\n\n- [run-ios](/packages/react-native/executors/run-ios) - Builds your app and starts it on iOS simulator or device\n- [run-android](/packages/react-native/executors/run-android) - Builds your app and starts it on a connected Android emulator or device\n- [build-android](/packages/react-native/executors/build-android) - Release Build for Android\n- [start](/packages/react-native/executors/start) - Starts the server that communicates with connected devices\n- [bundle](/packages/react-native/executors/bundle) - Builds the JavaScript bundle for offline use\n- [sync-deps](/packages/react-native/executors/sync-deps) - Syncs dependencies to package.json (required for autolinking)\n- [ensure-symlink](/packages/react-native/executors/ensure-symlink) - Ensure workspace node_modules is symlink under app's node_modules folder\n\n## More Documentation\n\n- [Using Detox](/packages/detox)\n- [Using Jest](/packages/jest)\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#reactNativeInitGenerator", - "schema": { - "cli": "nx", - "$id": "NxReactNativeInit", - "$schema": "http://json-schema.org/schema", - "title": "Add Nx React Native Schematics", - "description": "Add Nx React native schematics.", - "type": "object", - "properties": { - "unitTestRunner": { - "description": "Adds the specified unit test runner.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "e2eTestRunner": { - "description": "Adds the specified E2E test runner.", - "type": "string", - "enum": ["detox", "none"], - "default": "detox" - }, - "js": { - "type": "boolean", - "default": false, - "description": "Use JavaScript instead of TypeScript" - }, - "skipPackageJson": { - "description": "Do not add dependencies to `package.json`.", - "type": "boolean", - "default": false - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/react-native` plugin.", - "hidden": true, - "implementation": "/packages/react-native/src/generators/init/init#reactNativeInitGenerator.ts", - "aliases": [], - "path": "/packages/react-native/src/generators/init/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application#reactNativeApplicationGenerator", - "schema": { - "cli": "nx", - "$id": "NxReactNativeApplication", - "$schema": "http://json-schema.org/schema", - "title": "Create a React Application for Nx", - "description": "Create a React Application for Nx.", - "examples": [ - { - "command": "nx g app myapp --directory=nested", - "description": "Generate `apps/nested/myapp`" - }, - { - "command": "nx g app myapp --classComponent", - "description": "Use class components instead of functional components" - } - ], - "type": "object", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the application?" - }, - "displayName": { - "description": "The display name to show in the application. Defaults to name.", - "type": "string" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string" - }, - "skipFormat": { - "description": "Skip formatting files", - "type": "boolean", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting).", - "alias": "t" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files", - "default": false - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "e2eTestRunner": { - "description": "Adds the specified e2e test runner.", - "type": "string", - "enum": ["detox", "none"], - "default": "detox" - }, - "install": { - "type": "boolean", - "description": "Runs `pod install` for native modules before building iOS app.", - "default": true - }, - "skipPackageJson": { - "description": "Do not add dependencies to `package.json`.", - "type": "boolean", - "default": false - } - }, - "required": [], - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create a React Native application.", - "implementation": "/packages/react-native/src/generators/application/application#reactNativeApplicationGenerator.ts", - "hidden": false, - "path": "/packages/react-native/src/generators/application/schema.json" - }, - { - "name": "library", - "factory": "./src/generators/library/library#reactNativeLibraryGenerator", - "schema": { - "cli": "nx", - "$id": "NxReactNativeLibrary", - "$schema": "http://json-schema.org/schema", - "title": "Create a React Native Library for Nx", - "description": "Create a React Native Library for Nx.", - "type": "object", - "examples": [ - { - "command": "nx g lib mylib --directory=myapp", - "description": "Generate `libs/myapp/mylib`" - } - ], - "properties": { - "name": { - "type": "string", - "description": "Library name.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "type": "string", - "description": "A directory where the lib is placed." - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting).", - "alias": "t" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update `tsconfig.json` for development experience." - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. `App.tsx`).", - "alias": "P", - "default": false - }, - "publishable": { - "type": "boolean", - "description": "Create a publishable library." - }, - "buildable": { - "type": "boolean", - "default": false, - "description": "Generate a buildable library." - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like `@myorg/my-awesome-lib`." - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "globalCss": { - "type": "boolean", - "description": "When `true`, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Whether to enable tsconfig strict mode or not.", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "skipPackageJson": { - "description": "Do not add dependencies to `package.json`.", - "type": "boolean", - "default": false - } - }, - "required": ["name"], - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Create a React Native library.", - "implementation": "/packages/react-native/src/generators/library/library#reactNativeLibraryGenerator.ts", - "hidden": false, - "path": "/packages/react-native/src/generators/library/schema.json" - }, - { - "name": "component", - "factory": "./src/generators/component/component#reactNativeComponentGenerator", - "schema": { - "cli": "nx", - "$id": "NxReactNativeApplication", - "$schema": "http://json-schema.org/schema", - "title": "Create a React Native Component for Nx", - "description": "Create a React native Component for Nx.", - "type": "object", - "examples": [ - { - "command": "nx g component my-component --project=mylib", - "description": "Generate a component in the `mylib` library" - }, - { - "command": "nx g component my-component --project=mylib --classComponent", - "description": "Generate a class component in the `mylib` library" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for this component?" - }, - "name": { - "type": "string", - "description": "The name of the component.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the component?" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "skipTests": { - "type": "boolean", - "description": "When true, does not create `spec.ts` test files for the new component.", - "default": false - }, - "directory": { - "type": "string", - "description": "Create the component under this directory (can be nested)." - }, - "flat": { - "type": "boolean", - "description": "Create component at the source root rather than its own directory.", - "default": false - }, - "export": { - "type": "boolean", - "description": "When true, the component is exported from the project `index.ts` (if it exists).", - "alias": "e", - "default": false, - "x-prompt": "Should this component be exported in the project?" - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. `App.tsx`).", - "alias": "P", - "default": false - }, - "classComponent": { - "type": "boolean", - "alias": "C", - "description": "Use class components instead of functional component.", - "default": false - } - }, - "required": ["name", "project"], - "presets": [] - }, - "description": "Create a React Native component.", - "aliases": ["c"], - "implementation": "/packages/react-native/src/generators/component/component#reactNativeComponentGenerator.ts", - "hidden": false, - "path": "/packages/react-native/src/generators/component/schema.json" - }, - { - "name": "storybook-configuration", - "factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactNativeStorybookConfigure", - "title": "React native Storybook configuration", - "description": "Set up Storybook for a React-Native app or library.", - "type": "object", - "properties": { - "name": { - "type": "string", - "aliases": ["project", "projectName"], - "description": "Project for which to generate Storybook configuration.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "For which project do you want to generate Storybook configuration?", - "x-dropdown": "projects" - }, - "generateStories": { - "type": "boolean", - "description": "Automatically generate *.stories.ts files for components declared in this project?", - "x-prompt": "Automatically generate *.stories.ts files for components declared in this project?", - "default": true - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript story files rather than TypeScript story files.", - "default": false - }, - "tsConfiguration": { - "type": "boolean", - "description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "ignorePaths": { - "type": "array", - "description": "Paths to ignore when looking for components.", - "items": { "type": "string", "description": "Path to ignore." }, - "examples": [ - "apps/my-app/src/not-stories/**", - "**/**/src/**/not-stories/**", - "libs/my-lib/**/*.something.ts", - "**/**/src/**/*.other.*", - "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" - ] - } - }, - "required": ["name"], - "presets": [] - }, - "description": "Set up Storybook for a React-native application or library.", - "hidden": false, - "implementation": "/packages/react-native/src/generators/storybook-configuration/configuration#storybookConfigurationGenerator.ts", - "aliases": [], - "path": "/packages/react-native/src/generators/storybook-configuration/schema.json" - }, - { - "name": "component-story", - "factory": "./src/generators/component-story/component-story#componentStoryGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactNativeComponentStory", - "title": "React native component story", - "description": "Generate storybook story for a react-native component.", - "type": "object", - "properties": { - "project": { - "type": "string", - "aliases": ["name", "projectName"], - "description": "The project where to add the components.", - "examples": ["shared-ui-component"], - "$default": { "$source": "projectName", "index": 0 }, - "x-prompt": "What's the name of the project where the component lives?" - }, - "componentPath": { - "type": "string", - "description": "Relative path to the component file from the library root.", - "examples": ["lib/components"], - "x-prompt": "What's path of the component relative to the project's lib root?" - } - }, - "required": ["project", "componentPath"], - "presets": [] - }, - "description": "Generate Storybook story for a React-native component.", - "hidden": false, - "implementation": "/packages/react-native/src/generators/component-story/component-story#componentStoryGenerator.ts", - "aliases": [], - "path": "/packages/react-native/src/generators/component-story/schema.json" - }, - { - "name": "stories", - "factory": "./src/generators/stories/stories#storiesGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactNativeStorybookStories", - "title": "Generate React Native Storybook stories", - "description": "Generate stories/specs for all components declared in a React Native project.", - "type": "object", - "properties": { - "project": { - "type": "string", - "aliases": ["name", "projectName"], - "description": "Project for which to generate stories.", - "$default": { "$source": "projectName", "index": 0 }, - "x-prompt": "For which project do you want to generate stories?" - }, - "ignorePaths": { - "type": "array", - "description": "Paths to ignore when looking for components.", - "items": { "type": "string", "description": "Path to ignore." }, - "examples": [ - "apps/my-app/src/not-stories/**", - "**/**/src/**/not-stories/**", - "libs/my-lib/**/*.something.ts", - "**/**/src/**/*.other.*", - "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" - ] - } - }, - "required": ["project"], - "presets": [] - }, - "description": "Create stories/specs for all components declared in an application or library.", - "hidden": false, - "implementation": "/packages/react-native/src/generators/stories/stories#storiesGenerator.ts", - "aliases": [], - "path": "/packages/react-native/src/generators/stories/schema.json" - }, - { - "name": "upgrade-native", - "factory": "./src/generators/upgrade-native/upgrade-native#reactNativeUpgradeNativeGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactNativeUpgradeNativeConfigure", - "title": "React native upgrade native configuration", - "description": "Upgrade native iOS and Android code to latest.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Application project name to upgrade native files.", - "$default": { "$source": "argv", "index": 0 }, - "x-dropdown": "project" - }, - "displayName": { - "description": "The display name to show in the application. Defaults to name.", - "type": "string" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files", - "default": false - }, - "e2eTestRunner": { - "description": "Adds the specified e2e test runner.", - "type": "string", - "enum": ["detox", "none"], - "default": "detox" - }, - "install": { - "type": "boolean", - "description": "Runs `pod install` for native modules before building iOS app.", - "default": true - } - }, - "required": ["name"], - "presets": [] - }, - "description": "Destructive command to upgrade native iOS and Android code to latest.", - "hidden": false, - "implementation": "/packages/react-native/src/generators/upgrade-native/upgrade-native#reactNativeUpgradeNativeGenerator.ts", - "aliases": [], - "path": "/packages/react-native/src/generators/upgrade-native/schema.json" - } - ], - "executors": [ - { - "name": "run-android", - "implementation": "/packages/react-native/src/executors/run-android/run-android.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxReactNativeRunAndroid", - "$schema": "http://json-schema.org/schema", - "title": "Run Android application", - "description": "Run Android target options.", - "type": "object", - "presets": [ - { - "name": "Run Android without cache", - "keys": ["variant", "sync", "port", "packager", "resetCache"] - } - ], - "properties": { - "variant": { - "type": "string", - "description": "Specify your app's build variant (e.g. `debug`, `release`).", - "default": "debug", - "examples": ["debug", "release"] - }, - "appId": { - "type": "string", - "description": "Specify an `applicationId` to launch after build. If not specified, `package` from `AndroidManifest.xml` will be used." - }, - "appIdSuffix": { - "type": "string", - "description": "Specify an `applicationIdSuffix` to launch after build." - }, - "mainActivity": { - "type": "string", - "description": "Name of the activity to start.", - "default": "MainActivity" - }, - "deviceId": { - "type": "string", - "description": "Builds your app and starts it on a specific device/simulator with the given device id (listed by running `adb devices` on the command line)." - }, - "tasks": { - "type": "string", - "description": "Run custom Gradle tasks. If this argument is provided, then `--variant` option is ignored. Example: `yarn react-native run-android --tasks clean,installDebug`." - }, - "jetifier": { - "type": "boolean", - "description": "Run Jetifier – the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet.", - "default": true - }, - "sync": { - "type": "boolean", - "description": "Syncs npm dependencies to `package.json` (for React Native autolink).", - "default": true - }, - "port": { - "type": "number", - "description": "The port where the packager server is listening on.", - "default": 8081 - }, - "terminal": { - "type": "string", - "description": "Launches the Metro Bundler in a new window using the specified terminal path." - }, - "packager": { - "type": "boolean", - "description": "Starts the packager server.", - "default": true - }, - "resetCache": { - "type": "boolean", - "description": "Resets metro cache.", - "default": false - }, - "interactive": { - "type": "boolean", - "description": "Run packager server in interactive mode.", - "default": true - } - }, - "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:run-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Run on a specific device/simulator\" %}\nTo see all the avaiable emulators, run command:\n\n```bash\nemulator -list-avds\n```\n\nThe `deviceId` option allows you to launch your android app in a specific device/simulator:\n\n```json\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {\n \"deviceId\": \"Pixel_5_API_30\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run the debug/release app\" %}\nThe `variant` option allows to specify the build variant, such as `debug` or `release`.\n\n```json\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {\n \"variant\": \"release\"\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n" - }, - "description": "Runs Android application.", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/run-android/schema.json" - }, - { - "name": "run-ios", - "implementation": "/packages/react-native/src/executors/run-ios/run-ios.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxReactNativeRunIos", - "$schema": "http://json-schema.org/schema", - "title": "Run iOS application", - "description": "Run iOS target options.", - "type": "object", - "presets": [ - { - "name": "Run iOS without cache", - "keys": [ - "xcodeConfiguration", - "install", - "sync", - "port", - "packager", - "resetCache" - ] - } - ], - "properties": { - "xcodeConfiguration": { - "type": "string", - "description": "Explicitly set the Xcode configuration to use.", - "default": "Debug", - "examples": ["Debug", "Release"] - }, - "scheme": { - "type": "string", - "description": "Explicitly set the Xcode scheme to use." - }, - "simulator": { - "type": "string", - "description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: `iPhone X (12.1)`.", - "default": "iPhone 13", - "examples": ["iPhone 13", "iPhone X"] - }, - "device": { - "type": "string", - "description": "Explicitly set device to use by name. The value is not required if you have a single device connected." - }, - "install": { - "type": "boolean", - "description": "Runs `pod install` for native modules before building iOS app.", - "default": true - }, - "sync": { - "type": "boolean", - "description": "Syncs npm dependencies to `package.json` (for React Native autolink). Always true when `--install` is used.", - "default": true - }, - "port": { - "type": "number", - "description": "The port where the packager server is listening on.", - "default": 8081 - }, - "terminal": { - "type": "string", - "description": "Launches the Metro Bundler in a new window using the specified terminal path." - }, - "packager": { - "type": "boolean", - "description": "Starts the packager server.", - "default": true - }, - "resetCache": { - "type": "boolean", - "description": "Resets metro cache.", - "default": false - }, - "interactive": { - "type": "boolean", - "description": "Run packager server in interactive mode.", - "default": true - } - }, - "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:run-ios\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Run on a simulator\" %}\nTo see all the avaiable simulators, run command:\n\n```bash\nxcrun simctl list\n```\n\nThe `simulator` option allows you to launch your iOS app in a specific simulator:\n\n```json\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {\n \"simulator\": \"iPhone 13 Pro\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run on a device\" %}\nThe `device` option allows you to launch your iOS app in a specific device.\n\n```json\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {\n \"device\": \"deviceName\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run the Debug/Release app\" %}\nThe `xcodeConfiguration` option allows to specify the xcode configuartion, such as `Debug` or `Release`.\n\n```json\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {\n \"xcodeConfiguration\": \"Release\"\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n" - }, - "description": "Runs iOS application.", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/run-ios/schema.json" - }, - { - "name": "bundle", - "implementation": "/packages/react-native/src/executors/bundle/bundle.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxReactNativeBundle", - "$schema": "http://json-schema.org/schema", - "title": "Offline JS Bundle for React Native", - "description": "JS Bundle target options.", - "type": "object", - "properties": { - "entryFile": { - "type": "string", - "description": "The entry file relative to project root.", - "x-completion-type": "file", - "x-completion-glob": "main@(.js|.ts)" - }, - "platform": { - "enum": ["ios", "android"], - "alias": "p", - "description": "Platform to build for." - }, - "transformer": { - "type": "string", - "description": "Specify a custom transformer to be used." - }, - "dev": { - "type": "boolean", - "description": "Generate a development build.", - "default": true - }, - "minify": { - "type": "boolean", - "description": "Allows overriding whether bundle is minified." - }, - "bundleOutput": { - "type": "string", - "description": "The output path of the generated files.", - "x-completion-type": "directory" - }, - "maxWorkers": { - "type": "number", - "description": "The number of workers we should parallelize the transformer on." - }, - "sourcemapOutput": { - "type": "string", - "description": "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map." - }, - "sourcemapSourcesRoot": { - "type": "string", - "description": "Path to make sourcemaps sources entries relative to, ex. /root/dir." - }, - "sourcemapUseAbsolutePath": { - "type": "boolean", - "description": "Report SourceMapURL using its full path.", - "default": false - }, - "assetsDest": { - "type": "string", - "description": "Directory name where to store assets referenced in the bundle." - }, - "resetCache": { - "type": "boolean", - "description": "Removes cached files.", - "default": false - }, - "readGlobalCache": { - "type": "boolean", - "description": "Removes cached files.", - "default": false - } - }, - "required": ["platform", "entryFile", "bundleOutput"], - "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"outputs\": [\"{projectRoot}/build\"],\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\"\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\"\n }\n }\n }\n}\n```\n\n```bash\nnx run mobile:bundle-ios\nnx run mobile:bundle-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Bundle with sourcemap\" %}\nThe `sourcemapOutput` option allows you to specify the path of the source map relative to app folder:\n\n```json\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\",\n \"sourcemapOutput\": \"../../dist/apps/mobile/ios/main.map\",\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\",\n \"sourcemapOutput\": \"../../dist/apps/mobile/android/main.map\",\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Create a dev/release bundle\" %}\n\nThe `dev` option determines whether to create a dev or release bundle. The default value is `true`, by setting it as `false`, warnings are disabled and the bundle is minified.\n\n```json\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\",\n \"dev\": false\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\",\n \"dev\": false\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Create a minified bundle\" %}\n\nThe `minify` option allows you to create a minified bundle:\n\n```json\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\",\n \"minify\": true\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\",\n \"minify\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", - "presets": [] - }, - "description": "Builds the JavaScript bundle for offline use.", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/bundle/schema.json" - }, - { - "name": "build-android", - "implementation": "/packages/react-native/src/executors/build-android/build-android.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxReactNativeBuildAndroid", - "$schema": "http://json-schema.org/schema", - "title": "Release Build for Android", - "description": "Build target options for Android.", - "type": "object", - "properties": { - "apk": { - "type": "boolean", - "description": "Generate apk file(s) rather than a bundle (`.aab`)." - }, - "debug": { - "type": "boolean", - "description": "Generate a debug build instead of a release build." - }, - "gradleTask": { - "type": "string", - "description": "Override default gradle task incase of multi build variants" - } - }, - "required": [], - "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:build-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Build with custom gradleTask\" %}\nThe `gradleTask` option accepts any custom gradle task, such as `assembleDebug`, `assembleRelease`, `bundleDebug`, `bundleRelease`:\n\n```json\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {\n \"gradleTask\": \"assembleDebug\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Create a build with apk format\" %}\n\nThe `apk` option allows you determine the format of android build. If set as true, it will create a build with `.apk` extension under apk folder; if set as false, it will create with `.aab` extension under bundle folder.\n\n```json\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {\n \"apk\": true\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Build for debug/release\" %}\n\nIf set `debug` option as `true`, it will create a debug build; if set as `false`, it will create a release build.\n\n```json\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {\n \"debug\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", - "presets": [] - }, - "description": "Release Build for Android.", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/build-android/schema.json" - }, - { - "name": "start", - "implementation": "/packages/react-native/src/executors/start/start.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxReactNativeStart", - "$schema": "http://json-schema.org/schema", - "title": "Packager Server for React Native", - "description": "Packager Server target options.", - "type": "object", - "properties": { - "port": { - "type": "number", - "description": "The port to listen on.", - "default": 8081 - }, - "resetCache": { - "type": "boolean", - "description": "Resets metro cache.", - "default": false - }, - "interactive": { - "type": "boolean", - "description": "Run packager server in interactive mode.", - "default": true - } - }, - "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"start\": {\n \"executor\": \"@nrwl/react-native:start\",\n \"options\": {\n \"port\": 8081\n }\n }\n }\n}\n```\n\n```bash\nnx run mobile:start\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Starts the server non-interactively\" %}\nThe `interactive` option allows you to specify whether to use interactive mode:\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/react-native:start\",\n \"options\": {\n \"port\": 8081,\n \"interactive\": false\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Starts the server with cache reset\" %}\n\nThe `resetCache` option allows you to remove cached files.\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/react-native:start\",\n \"options\": {\n \"port\": 8081,\n \"resetCache\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", - "presets": [] - }, - "description": "Starts the Javascript server that communicates with connected devices.", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/start/schema.json" - }, - { - "name": "sync-deps", - "implementation": "/packages/react-native/src/executors/sync-deps/sync-deps.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxReactNativeSyncDeps", - "$schema": "http://json-schema.org/schema", - "title": "Sync Deps for React Native", - "description": "Updates `package.json` with project dependencies.", - "type": "object", - "properties": { - "include": { - "type": "array", - "items": { "type": "string" }, - "default": [], - "description": "An array of additional npm packages to include." - }, - "exclude": { - "type": "array", - "items": { "type": "string" }, - "default": [], - "description": "An array of npm packages to exclude." - } - }, - "presets": [] - }, - "description": "Syncs dependencies to `package.json` (required for autolinking).", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/sync-deps/schema.json" - }, - { - "name": "ensure-symlink", - "implementation": "/packages/react-native/src/executors/ensure-symlink/ensure-symlink.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxReactNativeEnsureSymlink", - "$schema": "http://json-schema.org/schema", - "title": "Ensure Symlink for React Native", - "description": "Ensure workspace node_modules is symlink under app's node_modules folder.", - "type": "object", - "properties": {}, - "presets": [] - }, - "description": "Ensure workspace `node_modules` is symlink under app's `node_modules` folder.", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/ensure-symlink/schema.json" - }, - { - "name": "storybook", - "implementation": "/packages/react-native/src/executors/storybook/storybook.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "React Native Storybook Load Stories", - "cli": "nx", - "description": "Load stories for react native.", - "type": "object", - "properties": { - "searchDir": { - "type": "array", - "items": { "type": "string" }, - "default": [], - "description": "The directory or directories, relative to the project root, to search for files in." - }, - "outputFile": { - "type": "string", - "description": "The output file that will be written. It is relative to the project directory.", - "default": "./.storybook/story-loader.js" - }, - "pattern": { - "type": "string", - "description": "The pattern of files to look at. It can be a specific file, or any valid glob. Note: if using the CLI, globs with `**/*...` must be escaped with quotes", - "default": "**/*.stories.@(js|jsx|ts|tsx|md)" - }, - "silent": { - "type": "boolean", - "description": "Silences output.", - "default": false - } - }, - "required": ["searchDir", "outputFile", "pattern"], - "presets": [] - }, - "description": "Serve React Native Storybook.", - "aliases": [], - "hidden": false, - "path": "/packages/react-native/src/executors/storybook/schema.json" - } - ] -} diff --git a/docs/generated/packages/react-native/documents/overview.md b/docs/generated/packages/react-native/documents/overview.md new file mode 100644 index 0000000000000..07dbeb54aaa59 --- /dev/null +++ b/docs/generated/packages/react-native/documents/overview.md @@ -0,0 +1,79 @@ +React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform. + +The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: + +- Integration with libraries such as Jest, Detox, and Storybook. +- Scaffolding for creating buildable libraries that can be published to npm. +- Utilities for automatic workspace refactoring. + +## Setting Up React Native + +### Create a New Workspace + +The easiest way to create your workspace is via `npx`. + +```shell +npx create-nx-workspace your-workspace-name \ +--preset=react-native \ +--appName=your-app-name +``` + +{% callout type="note" title="Don't know what you need?" %} +You can also run the command without arguments to go through the interactive prompts. +{% /callout %} + +```shell +npx create-nx-workspace your-workspace-name +``` + +### Adding React Native to an Existing Workspace + +For existing Nx workspaces, install the `@nrwl/react-native` package to add React Native capabilities to it. + +```shell +npm install @nrwl/react-native --save-dev + +# Or with yarn +yarn add @nrwl/react-native --dev +``` + +### Generating Applications + +To create additional React Native apps run: + +```shell +nx g @nrwl/react-native:app your-app-name +``` + +### Generating Libraries + +To generate a new library run: + +```shell +npx nx g @nrwl/react-native:lib your-lib-name +``` + +### Generating Components + +To generate a new component inside library run: + +```shell +npx nx g @nrwl/react-native:component your-component-name --project=your-lib-name --export +``` + +Replace `your-lib-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json` + +## Using React Native + +- [run-ios](/packages/react-native/executors/run-ios) - Builds your app and starts it on iOS simulator or device +- [run-android](/packages/react-native/executors/run-android) - Builds your app and starts it on a connected Android emulator or device +- [build-android](/packages/react-native/executors/build-android) - Release Build for Android +- [start](/packages/react-native/executors/start) - Starts the server that communicates with connected devices +- [bundle](/packages/react-native/executors/bundle) - Builds the JavaScript bundle for offline use +- [sync-deps](/packages/react-native/executors/sync-deps) - Syncs dependencies to package.json (required for autolinking) +- [ensure-symlink](/packages/react-native/executors/ensure-symlink) - Ensure workspace node_modules is symlink under app's node_modules folder + +## More Documentation + +- [Using Detox](/packages/detox) +- [Using Jest](/packages/jest) diff --git a/docs/generated/packages/react-native/executors/build-android.json b/docs/generated/packages/react-native/executors/build-android.json new file mode 100644 index 0000000000000..3be3792e0e492 --- /dev/null +++ b/docs/generated/packages/react-native/executors/build-android.json @@ -0,0 +1,36 @@ +{ + "name": "build-android", + "implementation": "/packages/react-native/src/executors/build-android/build-android.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxReactNativeBuildAndroid", + "$schema": "http://json-schema.org/schema", + "title": "Release Build for Android", + "description": "Build target options for Android.", + "type": "object", + "properties": { + "apk": { + "type": "boolean", + "description": "Generate apk file(s) rather than a bundle (`.aab`)." + }, + "debug": { + "type": "boolean", + "description": "Generate a debug build instead of a release build." + }, + "gradleTask": { + "type": "string", + "description": "Override default gradle task incase of multi build variants" + } + }, + "required": [], + "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:build-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Build with custom gradleTask\" %}\nThe `gradleTask` option accepts any custom gradle task, such as `assembleDebug`, `assembleRelease`, `bundleDebug`, `bundleRelease`:\n\n```json\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {\n \"gradleTask\": \"assembleDebug\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Create a build with apk format\" %}\n\nThe `apk` option allows you determine the format of android build. If set as true, it will create a build with `.apk` extension under apk folder; if set as false, it will create with `.aab` extension under bundle folder.\n\n```json\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {\n \"apk\": true\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Build for debug/release\" %}\n\nIf set `debug` option as `true`, it will create a debug build; if set as `false`, it will create a release build.\n\n```json\n \"build-android\": {\n \"executor\": \"@nrwl/react-native:build-android\",\n \"outputs\": [\n \"{projectRoot}/build/outputs/bundle\",\n \"{projectRoot}/build/outputs/apk\"\n ],\n \"options\": {\n \"debug\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", + "presets": [] + }, + "description": "Release Build for Android.", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/build-android/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/executors/bundle.json b/docs/generated/packages/react-native/executors/bundle.json new file mode 100644 index 0000000000000..3b7238b1d75bb --- /dev/null +++ b/docs/generated/packages/react-native/executors/bundle.json @@ -0,0 +1,84 @@ +{ + "name": "bundle", + "implementation": "/packages/react-native/src/executors/bundle/bundle.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxReactNativeBundle", + "$schema": "http://json-schema.org/schema", + "title": "Offline JS Bundle for React Native", + "description": "JS Bundle target options.", + "type": "object", + "properties": { + "entryFile": { + "type": "string", + "description": "The entry file relative to project root.", + "x-completion-type": "file", + "x-completion-glob": "main@(.js|.ts)" + }, + "platform": { + "enum": ["ios", "android"], + "alias": "p", + "description": "Platform to build for." + }, + "transformer": { + "type": "string", + "description": "Specify a custom transformer to be used." + }, + "dev": { + "type": "boolean", + "description": "Generate a development build.", + "default": true + }, + "minify": { + "type": "boolean", + "description": "Allows overriding whether bundle is minified." + }, + "bundleOutput": { + "type": "string", + "description": "The output path of the generated files.", + "x-completion-type": "directory" + }, + "maxWorkers": { + "type": "number", + "description": "The number of workers we should parallelize the transformer on." + }, + "sourcemapOutput": { + "type": "string", + "description": "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map." + }, + "sourcemapSourcesRoot": { + "type": "string", + "description": "Path to make sourcemaps sources entries relative to, ex. /root/dir." + }, + "sourcemapUseAbsolutePath": { + "type": "boolean", + "description": "Report SourceMapURL using its full path.", + "default": false + }, + "assetsDest": { + "type": "string", + "description": "Directory name where to store assets referenced in the bundle." + }, + "resetCache": { + "type": "boolean", + "description": "Removes cached files.", + "default": false + }, + "readGlobalCache": { + "type": "boolean", + "description": "Removes cached files.", + "default": false + } + }, + "required": ["platform", "entryFile", "bundleOutput"], + "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"outputs\": [\"{projectRoot}/build\"],\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\"\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\"\n }\n }\n }\n}\n```\n\n```bash\nnx run mobile:bundle-ios\nnx run mobile:bundle-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Bundle with sourcemap\" %}\nThe `sourcemapOutput` option allows you to specify the path of the source map relative to app folder:\n\n```json\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\",\n \"sourcemapOutput\": \"../../dist/apps/mobile/ios/main.map\",\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\",\n \"sourcemapOutput\": \"../../dist/apps/mobile/android/main.map\",\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Create a dev/release bundle\" %}\n\nThe `dev` option determines whether to create a dev or release bundle. The default value is `true`, by setting it as `false`, warnings are disabled and the bundle is minified.\n\n```json\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\",\n \"dev\": false\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\",\n \"dev\": false\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Create a minified bundle\" %}\n\nThe `minify` option allows you to create a minified bundle:\n\n```json\n \"bundle-ios\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"ios\",\n \"bundleOutput\": \"dist/apps/mobile/ios/main.jsbundle\",\n \"minify\": true\n }\n },\n \"bundle-android\": {\n \"executor\": \"@nrwl/react-native:bundle\",\n \"options\": {\n \"entryFile\": \"src/main.tsx\",\n \"platform\": \"android\",\n \"bundleOutput\": \"dist/apps/mobile/android/main.jsbundle\",\n \"minify\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", + "presets": [] + }, + "description": "Builds the JavaScript bundle for offline use.", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/bundle/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/executors/ensure-symlink.json b/docs/generated/packages/react-native/executors/ensure-symlink.json new file mode 100644 index 0000000000000..cbf8a092f7a01 --- /dev/null +++ b/docs/generated/packages/react-native/executors/ensure-symlink.json @@ -0,0 +1,21 @@ +{ + "name": "ensure-symlink", + "implementation": "/packages/react-native/src/executors/ensure-symlink/ensure-symlink.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxReactNativeEnsureSymlink", + "$schema": "http://json-schema.org/schema", + "title": "Ensure Symlink for React Native", + "description": "Ensure workspace node_modules is symlink under app's node_modules folder.", + "type": "object", + "properties": {}, + "presets": [] + }, + "description": "Ensure workspace `node_modules` is symlink under app's `node_modules` folder.", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/ensure-symlink/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/executors/run-android.json b/docs/generated/packages/react-native/executors/run-android.json new file mode 100644 index 0000000000000..2f3275d38897f --- /dev/null +++ b/docs/generated/packages/react-native/executors/run-android.json @@ -0,0 +1,89 @@ +{ + "name": "run-android", + "implementation": "/packages/react-native/src/executors/run-android/run-android.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxReactNativeRunAndroid", + "$schema": "http://json-schema.org/schema", + "title": "Run Android application", + "description": "Run Android target options.", + "type": "object", + "presets": [ + { + "name": "Run Android without cache", + "keys": ["variant", "sync", "port", "packager", "resetCache"] + } + ], + "properties": { + "variant": { + "type": "string", + "description": "Specify your app's build variant (e.g. `debug`, `release`).", + "default": "debug", + "examples": ["debug", "release"] + }, + "appId": { + "type": "string", + "description": "Specify an `applicationId` to launch after build. If not specified, `package` from `AndroidManifest.xml` will be used." + }, + "appIdSuffix": { + "type": "string", + "description": "Specify an `applicationIdSuffix` to launch after build." + }, + "mainActivity": { + "type": "string", + "description": "Name of the activity to start.", + "default": "MainActivity" + }, + "deviceId": { + "type": "string", + "description": "Builds your app and starts it on a specific device/simulator with the given device id (listed by running `adb devices` on the command line)." + }, + "tasks": { + "type": "string", + "description": "Run custom Gradle tasks. If this argument is provided, then `--variant` option is ignored. Example: `yarn react-native run-android --tasks clean,installDebug`." + }, + "jetifier": { + "type": "boolean", + "description": "Run Jetifier – the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet.", + "default": true + }, + "sync": { + "type": "boolean", + "description": "Syncs npm dependencies to `package.json` (for React Native autolink).", + "default": true + }, + "port": { + "type": "number", + "description": "The port where the packager server is listening on.", + "default": 8081 + }, + "terminal": { + "type": "string", + "description": "Launches the Metro Bundler in a new window using the specified terminal path." + }, + "packager": { + "type": "boolean", + "description": "Starts the packager server.", + "default": true + }, + "resetCache": { + "type": "boolean", + "description": "Resets metro cache.", + "default": false + }, + "interactive": { + "type": "boolean", + "description": "Run packager server in interactive mode.", + "default": true + } + }, + "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:run-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Run on a specific device/simulator\" %}\nTo see all the avaiable emulators, run command:\n\n```bash\nemulator -list-avds\n```\n\nThe `deviceId` option allows you to launch your android app in a specific device/simulator:\n\n```json\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {\n \"deviceId\": \"Pixel_5_API_30\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run the debug/release app\" %}\nThe `variant` option allows to specify the build variant, such as `debug` or `release`.\n\n```json\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {\n \"variant\": \"release\"\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n" + }, + "description": "Runs Android application.", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/run-android/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/executors/run-ios.json b/docs/generated/packages/react-native/executors/run-ios.json new file mode 100644 index 0000000000000..6cf4765e1e7ca --- /dev/null +++ b/docs/generated/packages/react-native/executors/run-ios.json @@ -0,0 +1,89 @@ +{ + "name": "run-ios", + "implementation": "/packages/react-native/src/executors/run-ios/run-ios.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxReactNativeRunIos", + "$schema": "http://json-schema.org/schema", + "title": "Run iOS application", + "description": "Run iOS target options.", + "type": "object", + "presets": [ + { + "name": "Run iOS without cache", + "keys": [ + "xcodeConfiguration", + "install", + "sync", + "port", + "packager", + "resetCache" + ] + } + ], + "properties": { + "xcodeConfiguration": { + "type": "string", + "description": "Explicitly set the Xcode configuration to use.", + "default": "Debug", + "examples": ["Debug", "Release"] + }, + "scheme": { + "type": "string", + "description": "Explicitly set the Xcode scheme to use." + }, + "simulator": { + "type": "string", + "description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: `iPhone X (12.1)`.", + "default": "iPhone 13", + "examples": ["iPhone 13", "iPhone X"] + }, + "device": { + "type": "string", + "description": "Explicitly set device to use by name. The value is not required if you have a single device connected." + }, + "install": { + "type": "boolean", + "description": "Runs `pod install` for native modules before building iOS app.", + "default": true + }, + "sync": { + "type": "boolean", + "description": "Syncs npm dependencies to `package.json` (for React Native autolink). Always true when `--install` is used.", + "default": true + }, + "port": { + "type": "number", + "description": "The port where the packager server is listening on.", + "default": 8081 + }, + "terminal": { + "type": "string", + "description": "Launches the Metro Bundler in a new window using the specified terminal path." + }, + "packager": { + "type": "boolean", + "description": "Starts the packager server.", + "default": true + }, + "resetCache": { + "type": "boolean", + "description": "Resets metro cache.", + "default": false + }, + "interactive": { + "type": "boolean", + "description": "Run packager server in interactive mode.", + "default": true + } + }, + "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:run-ios\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Run on a simulator\" %}\nTo see all the avaiable simulators, run command:\n\n```bash\nxcrun simctl list\n```\n\nThe `simulator` option allows you to launch your iOS app in a specific simulator:\n\n```json\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {\n \"simulator\": \"iPhone 13 Pro\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run on a device\" %}\nThe `device` option allows you to launch your iOS app in a specific device.\n\n```json\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {\n \"device\": \"deviceName\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run the Debug/Release app\" %}\nThe `xcodeConfiguration` option allows to specify the xcode configuartion, such as `Debug` or `Release`.\n\n```json\n \"run-ios\": {\n \"executor\": \"@nrwl/react-native:run-ios\",\n \"options\": {\n \"xcodeConfiguration\": \"Release\"\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n" + }, + "description": "Runs iOS application.", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/run-ios/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/executors/start.json b/docs/generated/packages/react-native/executors/start.json new file mode 100644 index 0000000000000..2824c8238064e --- /dev/null +++ b/docs/generated/packages/react-native/executors/start.json @@ -0,0 +1,38 @@ +{ + "name": "start", + "implementation": "/packages/react-native/src/executors/start/start.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxReactNativeStart", + "$schema": "http://json-schema.org/schema", + "title": "Packager Server for React Native", + "description": "Packager Server target options.", + "type": "object", + "properties": { + "port": { + "type": "number", + "description": "The port to listen on.", + "default": 8081 + }, + "resetCache": { + "type": "boolean", + "description": "Resets metro cache.", + "default": false + }, + "interactive": { + "type": "boolean", + "description": "Run packager server in interactive mode.", + "default": true + } + }, + "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"start\": {\n \"executor\": \"@nrwl/react-native:start\",\n \"options\": {\n \"port\": 8081\n }\n }\n }\n}\n```\n\n```bash\nnx run mobile:start\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Starts the server non-interactively\" %}\nThe `interactive` option allows you to specify whether to use interactive mode:\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/react-native:start\",\n \"options\": {\n \"port\": 8081,\n \"interactive\": false\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Starts the server with cache reset\" %}\n\nThe `resetCache` option allows you to remove cached files.\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/react-native:start\",\n \"options\": {\n \"port\": 8081,\n \"resetCache\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", + "presets": [] + }, + "description": "Starts the Javascript server that communicates with connected devices.", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/start/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/executors/storybook.json b/docs/generated/packages/react-native/executors/storybook.json new file mode 100644 index 0000000000000..4352e22efe51b --- /dev/null +++ b/docs/generated/packages/react-native/executors/storybook.json @@ -0,0 +1,42 @@ +{ + "name": "storybook", + "implementation": "/packages/react-native/src/executors/storybook/storybook.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "React Native Storybook Load Stories", + "cli": "nx", + "description": "Load stories for react native.", + "type": "object", + "properties": { + "searchDir": { + "type": "array", + "items": { "type": "string" }, + "default": [], + "description": "The directory or directories, relative to the project root, to search for files in." + }, + "outputFile": { + "type": "string", + "description": "The output file that will be written. It is relative to the project directory.", + "default": "./.storybook/story-loader.js" + }, + "pattern": { + "type": "string", + "description": "The pattern of files to look at. It can be a specific file, or any valid glob. Note: if using the CLI, globs with `**/*...` must be escaped with quotes", + "default": "**/*.stories.@(js|jsx|ts|tsx|md)" + }, + "silent": { + "type": "boolean", + "description": "Silences output.", + "default": false + } + }, + "required": ["searchDir", "outputFile", "pattern"], + "presets": [] + }, + "description": "Serve React Native Storybook.", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/storybook/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/executors/sync-deps.json b/docs/generated/packages/react-native/executors/sync-deps.json new file mode 100644 index 0000000000000..3c1a8f4b50b2e --- /dev/null +++ b/docs/generated/packages/react-native/executors/sync-deps.json @@ -0,0 +1,34 @@ +{ + "name": "sync-deps", + "implementation": "/packages/react-native/src/executors/sync-deps/sync-deps.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "cli": "nx", + "$id": "NxReactNativeSyncDeps", + "$schema": "http://json-schema.org/schema", + "title": "Sync Deps for React Native", + "description": "Updates `package.json` with project dependencies.", + "type": "object", + "properties": { + "include": { + "type": "array", + "items": { "type": "string" }, + "default": [], + "description": "An array of additional npm packages to include." + }, + "exclude": { + "type": "array", + "items": { "type": "string" }, + "default": [], + "description": "An array of npm packages to exclude." + } + }, + "presets": [] + }, + "description": "Syncs dependencies to `package.json` (required for autolinking).", + "aliases": [], + "hidden": false, + "path": "/packages/react-native/src/executors/sync-deps/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react-native/generators/application.json b/docs/generated/packages/react-native/generators/application.json new file mode 100644 index 0000000000000..4db4dc846f5d4 --- /dev/null +++ b/docs/generated/packages/react-native/generators/application.json @@ -0,0 +1,95 @@ +{ + "name": "application", + "factory": "./src/generators/application/application#reactNativeApplicationGenerator", + "schema": { + "cli": "nx", + "$id": "NxReactNativeApplication", + "$schema": "http://json-schema.org/schema", + "title": "Create a React Application for Nx", + "description": "Create a React Application for Nx.", + "examples": [ + { + "command": "nx g app myapp --directory=nested", + "description": "Generate `apps/nested/myapp`" + }, + { + "command": "nx g app myapp --classComponent", + "description": "Use class components instead of functional components" + } + ], + "type": "object", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the application?" + }, + "displayName": { + "description": "The display name to show in the application. Defaults to name.", + "type": "string" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string" + }, + "skipFormat": { + "description": "Skip formatting files", + "type": "boolean", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting).", + "alias": "t" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files", + "default": false + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "e2eTestRunner": { + "description": "Adds the specified e2e test runner.", + "type": "string", + "enum": ["detox", "none"], + "default": "detox" + }, + "install": { + "type": "boolean", + "description": "Runs `pod install` for native modules before building iOS app.", + "default": true + }, + "skipPackageJson": { + "description": "Do not add dependencies to `package.json`.", + "type": "boolean", + "default": false + } + }, + "required": [], + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create a React Native application.", + "implementation": "/packages/react-native/src/generators/application/application#reactNativeApplicationGenerator.ts", + "hidden": false, + "path": "/packages/react-native/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react-native/generators/component-story.json b/docs/generated/packages/react-native/generators/component-story.json new file mode 100644 index 0000000000000..947ae39cc5585 --- /dev/null +++ b/docs/generated/packages/react-native/generators/component-story.json @@ -0,0 +1,36 @@ +{ + "name": "component-story", + "factory": "./src/generators/component-story/component-story#componentStoryGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactNativeComponentStory", + "title": "React native component story", + "description": "Generate storybook story for a react-native component.", + "type": "object", + "properties": { + "project": { + "type": "string", + "aliases": ["name", "projectName"], + "description": "The project where to add the components.", + "examples": ["shared-ui-component"], + "$default": { "$source": "projectName", "index": 0 }, + "x-prompt": "What's the name of the project where the component lives?" + }, + "componentPath": { + "type": "string", + "description": "Relative path to the component file from the library root.", + "examples": ["lib/components"], + "x-prompt": "What's path of the component relative to the project's lib root?" + } + }, + "required": ["project", "componentPath"], + "presets": [] + }, + "description": "Generate Storybook story for a React-native component.", + "hidden": false, + "implementation": "/packages/react-native/src/generators/component-story/component-story#componentStoryGenerator.ts", + "aliases": [], + "path": "/packages/react-native/src/generators/component-story/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react-native/generators/component.json b/docs/generated/packages/react-native/generators/component.json new file mode 100644 index 0000000000000..f4de57fae8bae --- /dev/null +++ b/docs/generated/packages/react-native/generators/component.json @@ -0,0 +1,83 @@ +{ + "name": "component", + "factory": "./src/generators/component/component#reactNativeComponentGenerator", + "schema": { + "cli": "nx", + "$id": "NxReactNativeApplication", + "$schema": "http://json-schema.org/schema", + "title": "Create a React Native Component for Nx", + "description": "Create a React native Component for Nx.", + "type": "object", + "examples": [ + { + "command": "nx g component my-component --project=mylib", + "description": "Generate a component in the `mylib` library" + }, + { + "command": "nx g component my-component --project=mylib --classComponent", + "description": "Generate a class component in the `mylib` library" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for this component?" + }, + "name": { + "type": "string", + "description": "The name of the component.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the component?" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "skipTests": { + "type": "boolean", + "description": "When true, does not create `spec.ts` test files for the new component.", + "default": false + }, + "directory": { + "type": "string", + "description": "Create the component under this directory (can be nested)." + }, + "flat": { + "type": "boolean", + "description": "Create component at the source root rather than its own directory.", + "default": false + }, + "export": { + "type": "boolean", + "description": "When true, the component is exported from the project `index.ts` (if it exists).", + "alias": "e", + "default": false, + "x-prompt": "Should this component be exported in the project?" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. `App.tsx`).", + "alias": "P", + "default": false + }, + "classComponent": { + "type": "boolean", + "alias": "C", + "description": "Use class components instead of functional component.", + "default": false + } + }, + "required": ["name", "project"], + "presets": [] + }, + "description": "Create a React Native component.", + "aliases": ["c"], + "implementation": "/packages/react-native/src/generators/component/component#reactNativeComponentGenerator.ts", + "hidden": false, + "path": "/packages/react-native/src/generators/component/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react-native/generators/init.json b/docs/generated/packages/react-native/generators/init.json new file mode 100644 index 0000000000000..26568b4105d2e --- /dev/null +++ b/docs/generated/packages/react-native/generators/init.json @@ -0,0 +1,49 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#reactNativeInitGenerator", + "schema": { + "cli": "nx", + "$id": "NxReactNativeInit", + "$schema": "http://json-schema.org/schema", + "title": "Add Nx React Native Schematics", + "description": "Add Nx React native schematics.", + "type": "object", + "properties": { + "unitTestRunner": { + "description": "Adds the specified unit test runner.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "e2eTestRunner": { + "description": "Adds the specified E2E test runner.", + "type": "string", + "enum": ["detox", "none"], + "default": "detox" + }, + "js": { + "type": "boolean", + "default": false, + "description": "Use JavaScript instead of TypeScript" + }, + "skipPackageJson": { + "description": "Do not add dependencies to `package.json`.", + "type": "boolean", + "default": false + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/react-native` plugin.", + "hidden": true, + "implementation": "/packages/react-native/src/generators/init/init#reactNativeInitGenerator.ts", + "aliases": [], + "path": "/packages/react-native/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react-native/generators/library.json b/docs/generated/packages/react-native/generators/library.json new file mode 100644 index 0000000000000..341694eba4d2f --- /dev/null +++ b/docs/generated/packages/react-native/generators/library.json @@ -0,0 +1,111 @@ +{ + "name": "library", + "factory": "./src/generators/library/library#reactNativeLibraryGenerator", + "schema": { + "cli": "nx", + "$id": "NxReactNativeLibrary", + "$schema": "http://json-schema.org/schema", + "title": "Create a React Native Library for Nx", + "description": "Create a React Native Library for Nx.", + "type": "object", + "examples": [ + { + "command": "nx g lib mylib --directory=myapp", + "description": "Generate `libs/myapp/mylib`" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Library name.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "type": "string", + "description": "A directory where the lib is placed." + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting).", + "alias": "t" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update `tsconfig.json` for development experience." + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. `App.tsx`).", + "alias": "P", + "default": false + }, + "publishable": { + "type": "boolean", + "description": "Create a publishable library." + }, + "buildable": { + "type": "boolean", + "default": false, + "description": "Generate a buildable library." + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like `@myorg/my-awesome-lib`." + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "globalCss": { + "type": "boolean", + "description": "When `true`, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Whether to enable tsconfig strict mode or not.", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "skipPackageJson": { + "description": "Do not add dependencies to `package.json`.", + "type": "boolean", + "default": false + } + }, + "required": ["name"], + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Create a React Native library.", + "implementation": "/packages/react-native/src/generators/library/library#reactNativeLibraryGenerator.ts", + "hidden": false, + "path": "/packages/react-native/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react-native/generators/stories.json b/docs/generated/packages/react-native/generators/stories.json new file mode 100644 index 0000000000000..85a99c800d541 --- /dev/null +++ b/docs/generated/packages/react-native/generators/stories.json @@ -0,0 +1,41 @@ +{ + "name": "stories", + "factory": "./src/generators/stories/stories#storiesGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactNativeStorybookStories", + "title": "Generate React Native Storybook stories", + "description": "Generate stories/specs for all components declared in a React Native project.", + "type": "object", + "properties": { + "project": { + "type": "string", + "aliases": ["name", "projectName"], + "description": "Project for which to generate stories.", + "$default": { "$source": "projectName", "index": 0 }, + "x-prompt": "For which project do you want to generate stories?" + }, + "ignorePaths": { + "type": "array", + "description": "Paths to ignore when looking for components.", + "items": { "type": "string", "description": "Path to ignore." }, + "examples": [ + "apps/my-app/src/not-stories/**", + "**/**/src/**/not-stories/**", + "libs/my-lib/**/*.something.ts", + "**/**/src/**/*.other.*", + "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" + ] + } + }, + "required": ["project"], + "presets": [] + }, + "description": "Create stories/specs for all components declared in an application or library.", + "hidden": false, + "implementation": "/packages/react-native/src/generators/stories/stories#storiesGenerator.ts", + "aliases": [], + "path": "/packages/react-native/src/generators/stories/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react-native/generators/storybook-configuration.json b/docs/generated/packages/react-native/generators/storybook-configuration.json new file mode 100644 index 0000000000000..e2d496ca59d5b --- /dev/null +++ b/docs/generated/packages/react-native/generators/storybook-configuration.json @@ -0,0 +1,68 @@ +{ + "name": "storybook-configuration", + "factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactNativeStorybookConfigure", + "title": "React native Storybook configuration", + "description": "Set up Storybook for a React-Native app or library.", + "type": "object", + "properties": { + "name": { + "type": "string", + "aliases": ["project", "projectName"], + "description": "Project for which to generate Storybook configuration.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "For which project do you want to generate Storybook configuration?", + "x-dropdown": "projects" + }, + "generateStories": { + "type": "boolean", + "description": "Automatically generate *.stories.ts files for components declared in this project?", + "x-prompt": "Automatically generate *.stories.ts files for components declared in this project?", + "default": true + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript story files rather than TypeScript story files.", + "default": false + }, + "tsConfiguration": { + "type": "boolean", + "description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "ignorePaths": { + "type": "array", + "description": "Paths to ignore when looking for components.", + "items": { "type": "string", "description": "Path to ignore." }, + "examples": [ + "apps/my-app/src/not-stories/**", + "**/**/src/**/not-stories/**", + "libs/my-lib/**/*.something.ts", + "**/**/src/**/*.other.*", + "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" + ] + } + }, + "required": ["name"], + "presets": [] + }, + "description": "Set up Storybook for a React-native application or library.", + "hidden": false, + "implementation": "/packages/react-native/src/generators/storybook-configuration/configuration#storybookConfigurationGenerator.ts", + "aliases": [], + "path": "/packages/react-native/src/generators/storybook-configuration/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react-native/generators/upgrade-native.json b/docs/generated/packages/react-native/generators/upgrade-native.json new file mode 100644 index 0000000000000..9cd08dd38077c --- /dev/null +++ b/docs/generated/packages/react-native/generators/upgrade-native.json @@ -0,0 +1,48 @@ +{ + "name": "upgrade-native", + "factory": "./src/generators/upgrade-native/upgrade-native#reactNativeUpgradeNativeGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactNativeUpgradeNativeConfigure", + "title": "React native upgrade native configuration", + "description": "Upgrade native iOS and Android code to latest.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application project name to upgrade native files.", + "$default": { "$source": "argv", "index": 0 }, + "x-dropdown": "project" + }, + "displayName": { + "description": "The display name to show in the application. Defaults to name.", + "type": "string" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files", + "default": false + }, + "e2eTestRunner": { + "description": "Adds the specified e2e test runner.", + "type": "string", + "enum": ["detox", "none"], + "default": "detox" + }, + "install": { + "type": "boolean", + "description": "Runs `pod install` for native modules before building iOS app.", + "default": true + } + }, + "required": ["name"], + "presets": [] + }, + "description": "Destructive command to upgrade native iOS and Android code to latest.", + "hidden": false, + "implementation": "/packages/react-native/src/generators/upgrade-native/upgrade-native#reactNativeUpgradeNativeGenerator.ts", + "aliases": [], + "path": "/packages/react-native/src/generators/upgrade-native/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react.json b/docs/generated/packages/react.json deleted file mode 100644 index 2966f613a39b1..0000000000000 --- a/docs/generated/packages/react.json +++ /dev/null @@ -1,1645 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "react", - "packageName": "@nrwl/react", - "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.", - "root": "/packages/react", - "source": "/packages/react/src", - "documentation": [ - { - "name": "Overview", - "id": "overview", - "path": "/packages/react", - "file": "shared/react-plugin", - "content": "The React plugin contains executors and generators for managing React applications and libraries within an Nx workspace.\nIt provides:\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n- Generators for applications, libraries, components, hooks, and more.\n- Library build support for publishing packages to npm or other registries.\n- Utilities for automatic workspace refactoring.\n\n## Setting Up React\n\nTo create a new workspace with React, run `npx create-nx-workspace@latest --preset=react`.\n\nTo add the React plugin to an existing workspace, run one of the following:\n\n```shell\n# For npm users\nnpm install -D @nrwl/react\n\n# For yarn users\nyarn add -D @nrwl/react\n```\n\n### Creating Applications and Libraries\n\nYou can add a new application with the following:\n\n```shell\nnx g @nrwl/react:app my-new-app\n```\n\nTo start the application in development mode, run `nx serve my-new-app`.\n\nAnd add a new library as follows:\n\n```shell\nnx g @nrwl/react:lib my-new-lib\n\n# If you want the library to be buildable or publishable to npm\nnx g @nrwl/react:lib my-new-lib --buildable\nnx g @nrwl/react:lib my-new-lib \\\n--publishable \\\n--importPath=@myorg/my-new-lib\n```\n\nRead more about [building and publishing libraries here](/more-concepts/buildable-and-publishable-libraries).\n\n### Creating Components\n\nAdding a component to an existing project can be done with:\n\n```shell\nnx g @nrwl/react:component my-new-component \\\n--project=my-new-app\n\n# Note: If you want to export the component\n# from the library use --export\nnx g @nrwl/react:component my-new-component \\\n--project=my-new-lib \\\n--export\n```\n\nReplace `my-new-app` and `my-new-lib` with the name of your projects.\n\n### Creating Hooks\n\nIf you want to add a new hook, run the following\n\n```shell\nnx g @nrwl/react:hook my-new-hook --project=my-new-lib\n```\n\nReplace `my-new-lib` with the name of your project.\n\n## Using React\n\n### Testing Projects\n\nYou can run unit tests with:\n\n```shell\nnx test my-new-app\nnx test my-new-lib\n```\n\nReplace `my-new-app` with the name or your project. This command works for both applications and libraries.\n\nYou can also run E2E tests for applications:\n\n```shell\nnx e2e my-new-app-e2e\n```\n\nReplace `my-new-app-e2e` with the name or your project with `-e2e` appended.\n\n### Building Projects\n\nReact applications can be build with:\n\n```shell\nnx build my-new-app\n```\n\nAnd if you generated a library with `--buildable`, then you can build a library as well:\n\n```shell\nnx build my-new-lib\n```\n\nThe output is in the `dist` folder. You can customize the output folder by setting `outputPath` in the\nproject's `project.json` file.\n\nThe application in `dist` is deployable, and you can try it out locally with:\n\n```shell\nnpx http-server dist/apps/my-new-app\n```\n\nThe library in `dist` is publishable to npm or a private registry.\n\n## More Documentation\n\n- [Using Cypress](/packages/cypress)\n- [Using Jest](/packages/jest)\n- [Using Storybook](/storybook/overview-react)\n" - } - ], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#reactInitGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxReactNgInit", - "title": "Init React Plugin", - "description": "Initialize a React Plugin.", - "cli": "nx", - "type": "object", - "properties": { - "unitTestRunner": { - "description": "Adds the specified unit test runner.", - "type": "string", - "enum": ["jest", "none"], - "default": "jest" - }, - "e2eTestRunner": { - "description": "Adds the specified E2E test runner.", - "type": "string", - "enum": ["cypress", "none"], - "default": "cypress" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "description": "Do not add dependencies to `package.json`.", - "type": "boolean", - "default": false - }, - "skipBabelConfig": { - "description": "Do not generate a root babel.config.json (if babel is not needed).", - "type": "boolean", - "default": false - }, - "skipHelperLibs": { - "description": "Do not install helpers libs (tslib, core-js, regenerator-runtime).", - "type": "boolean", - "default": false, - "hidden": true - }, - "js": { - "type": "boolean", - "default": false, - "description": "Use JavaScript instead of TypeScript" - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/react` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/react/src/generators/init/init#reactInitGenerator.ts", - "path": "/packages/react/src/generators/init/schema.json" - }, - { - "name": "application", - "factory": "./src/generators/application/application#applicationGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactApp", - "title": "Create a React Application", - "description": "Create a React application for Nx.", - "examples": [ - { - "command": "nx g app myapp --directory=myorg", - "description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`" - }, - { - "command": "nx g app myapp --classComponent", - "description": "Use class components instead of functional components" - }, - { - "command": "nx g app myapp --routing", - "description": "Set up React Router" - } - ], - "type": "object", - "properties": { - "name": { - "description": "The name of the application.", - "type": "string", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the application?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string", - "alias": "dir" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "alias": "s", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - }, - { "value": "none", "label": "None" } - ] - } - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "routing": { - "type": "boolean", - "description": "Generate application with routes.", - "x-prompt": "Would you like to add React Router to this application?", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipWorkspaceJson": { - "description": "Skip updating `workspace.json` with default options based on values provided to this app (e.g. babel, style).", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "vitest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "inSourceTests": { - "type": "boolean", - "default": false, - "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["cypress", "none"], - "description": "Test runner to use for end to end (E2E) tests.", - "default": "cypress" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting).", - "alias": "t" - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. `App.tsx`).", - "alias": "P", - "default": false - }, - "classComponent": { - "type": "boolean", - "description": "Use class components instead of functional component.", - "alias": "C", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "globalCss": { - "type": "boolean", - "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Creates an application with strict mode and strict type checking.", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "compiler": { - "type": "string", - "description": "The compiler to use.", - "enum": ["babel", "swc"], - "default": "babel" - }, - "skipDefaultProject": { - "description": "Skip setting the project as the default project. When `false` (the default), the project is set as the default project only if there is no default project already set.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "description": "Do not add dependencies to `package.json`.", - "type": "boolean", - "default": false - }, - "rootProject": { - "description": "Create a application at the root of the workspace", - "type": "boolean", - "default": false, - "hidden": true - }, - "bundler": { - "description": "The bundler to use.", - "type": "string", - "enum": ["vite", "webpack"], - "x-prompt": "Which bundler do you want to use to build the application?", - "default": "webpack" - }, - "minimal": { - "description": "Generate a React app with a minimal setup, no separate test files.", - "type": "boolean", - "default": false - } - }, - "required": [], - "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/react:application my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Application using Vite as bundler\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/react:app my-app --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory and style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n```bash\nnx g @nrwl/react:app my-app --directory=my-dir --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Add tags\" %}\n\nAdd tags to the application (used for linting).\n\n```bash\nnx g @nrwl/react:app my-app --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n", - "presets": [] - }, - "aliases": ["app"], - "x-type": "application", - "description": "Create a React application.", - "implementation": "/packages/react/src/generators/application/application#applicationGenerator.ts", - "hidden": false, - "path": "/packages/react/src/generators/application/schema.json" - }, - { - "name": "library", - "factory": "./src/generators/library/library#libraryGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactLibrary", - "title": "Create a React Library", - "description": "Create a React Library for an Nx workspace.", - "type": "object", - "examples": [ - { - "command": "nx g lib mylib --directory=myapp", - "description": "Generate `libs/myapp/mylib`" - }, - { - "command": "nx g lib mylib --appProject=myapp", - "description": "Generate a library with routes and add them to `myapp`" - } - ], - "properties": { - "name": { - "type": "string", - "description": "Library name", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the library?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "type": "string", - "description": "A directory where the lib is placed.", - "alias": "dir" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "alias": "s", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - }, - { "value": "none", "label": "None" } - ] - } - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint", "none"], - "default": "eslint" - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "vitest", "none"], - "description": "Test runner to use for unit tests." - }, - "inSourceTests": { - "type": "boolean", - "default": false, - "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files." - }, - "tags": { - "type": "string", - "description": "Add tags to the library (used for linting).", - "alias": "t" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update `tsconfig.json` for development experience." - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. `App.tsx`).", - "alias": "P", - "default": false - }, - "routing": { - "type": "boolean", - "description": "Generate library with routes." - }, - "appProject": { - "type": "string", - "description": "The application project to add the library route to.", - "alias": "a" - }, - "publishable": { - "type": "boolean", - "description": "Create a publishable library." - }, - "buildable": { - "type": "boolean", - "default": false, - "description": "Generate a buildable library that uses rollup to bundle. Use 'bundler' option instead for greater control (none, vite, rollup).", - "x-deprecated": true - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like `@myorg/my-awesome-lib`." - }, - "component": { - "type": "boolean", - "description": "Generate a default component.", - "default": true - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "globalCss": { - "type": "boolean", - "description": "When `true`, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Whether to enable tsconfig strict mode or not.", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "bundler": { - "type": "string", - "description": "The bundler to use. Choosing 'none' means this library is not buildable.", - "enum": ["none", "vite", "rollup"], - "default": "none", - "x-prompt": "Which bundler would you like to use to build the library? Choose 'none' to skip build setup." - }, - "compiler": { - "type": "string", - "enum": ["babel", "swc"], - "default": "babel", - "description": "Which compiler to use. Only applies to `bundler: 'rollup'`." - }, - "skipPackageJson": { - "description": "Do not add dependencies to `package.json`.", - "type": "boolean", - "default": false - }, - "minimal": { - "description": "Create a React library with a minimal setup, no separate test files.", - "type": "boolean", - "default": false - } - }, - "required": ["name"], - "presets": [] - }, - "aliases": ["lib"], - "x-type": "library", - "description": "Create a React library.", - "implementation": "/packages/react/src/generators/library/library#libraryGenerator.ts", - "hidden": false, - "path": "/packages/react/src/generators/library/schema.json" - }, - { - "name": "component", - "factory": "./src/generators/component/component#componentGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactComponent", - "title": "Create a React Component", - "description": "Create a React Component for Nx.", - "type": "object", - "examples": [ - { - "command": "nx g component my-component --project=mylib", - "description": "Generate a component in the `mylib` library" - }, - { - "command": "nx g component my-component --project=mylib --classComponent", - "description": "Generate a class component in the `mylib` library" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for this component?" - }, - "name": { - "type": "string", - "description": "The name of the component.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the component?" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "alias": "s", - "default": "css", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - }, - { "value": "none", "label": "None" } - ] - } - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "skipTests": { - "type": "boolean", - "description": "When true, does not create `spec.ts` test files for the new component.", - "default": false - }, - "directory": { - "type": "string", - "description": "Create the component under this directory (can be nested).", - "alias": "dir" - }, - "flat": { - "type": "boolean", - "description": "Create component at the source root rather than its own directory.", - "default": false - }, - "export": { - "type": "boolean", - "description": "When true, the component is exported from the project `index.ts` (if it exists).", - "alias": "e", - "default": false, - "x-prompt": "Should this component be exported in the project?" - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. `App.tsx`).", - "alias": "P", - "default": false - }, - "pascalCaseDirectory": { - "type": "boolean", - "description": "Use pascal case directory name (e.g. `App/App.tsx`).", - "alias": "R", - "default": false - }, - "classComponent": { - "type": "boolean", - "alias": "C", - "description": "Use class components instead of functional component.", - "default": false - }, - "routing": { - "type": "boolean", - "description": "Generate a library with routes." - }, - "globalCss": { - "type": "boolean", - "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.", - "default": false - }, - "fileName": { - "type": "string", - "description": "Create a component with this file name." - }, - "inSourceTests": { - "type": "boolean", - "default": false, - "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html" - } - }, - "required": ["name", "project"], - "presets": [] - }, - "description": "Create a React component.", - "aliases": ["c"], - "implementation": "/packages/react/src/generators/component/component#componentGenerator.ts", - "hidden": false, - "path": "/packages/react/src/generators/component/schema.json" - }, - { - "name": "redux", - "factory": "./src/generators/redux/redux#reduxGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "redux", - "title": "Create Redux state", - "description": "Create a Redux state slice for a React project.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Redux slice name.", - "$default": { "$source": "argv", "index": 0 } - }, - "project": { - "type": "string", - "description": "The name of the project to add the slice to. If it is an application, then the store configuration will be updated too.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for this slice?" - }, - "directory": { - "type": "string", - "alias": "dir", - "default": "", - "description": "The name of the folder used to contain/group the generated Redux files." - }, - "appProject": { - "type": "string", - "description": "The application project to add the slice to.", - "alias": "a" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - } - }, - "required": ["name"], - "presets": [] - }, - "description": "Create a Redux slice for a project.", - "aliases": ["slice"], - "implementation": "/packages/react/src/generators/redux/redux#reduxGenerator.ts", - "hidden": false, - "path": "/packages/react/src/generators/redux/schema.json" - }, - { - "name": "storybook-configuration", - "factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactStorybookConfigure", - "title": "React Storybook Configure", - "description": "Set up Storybook for a React app or library.", - "type": "object", - "properties": { - "name": { - "type": "string", - "aliases": ["project", "projectName"], - "description": "Project for which to generate Storybook configuration.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "For which project do you want to generate Storybook configuration?", - "x-dropdown": "projects" - }, - "configureCypress": { - "type": "boolean", - "description": "Run the cypress-configure generator.", - "x-prompt": "Configure a cypress e2e app to run against the storybook instance?", - "default": true - }, - "generateStories": { - "type": "boolean", - "description": "Automatically generate `*.stories.ts` files for components declared in this project?", - "x-prompt": "Automatically generate *.stories.ts files for components declared in this project?", - "default": true - }, - "generateCypressSpecs": { - "type": "boolean", - "description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.", - "x-prompt": "Automatically generate test files in the Cypress E2E app generated by the cypress-configure generator?", - "default": true - }, - "cypressDirectory": { - "type": "string", - "description": "A directory where the Cypress project will be placed. Placed at the root by default." - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript story files rather than TypeScript story files.", - "default": false - }, - "tsConfiguration": { - "type": "boolean", - "description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.", - "default": false - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean" - }, - "ignorePaths": { - "type": "array", - "description": "Paths to ignore when looking for components.", - "items": { "type": "string", "description": "Path to ignore." }, - "examples": [ - "apps/my-app/src/not-stories/**", - "**/**/src/**/not-stories/**", - "libs/my-lib/**/*.something.ts", - "**/**/src/**/*.other.*", - "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" - ] - }, - "configureTestRunner": { - "type": "boolean", - "description": "Add a Storybook Test-Runner target." - }, - "bundler": { - "description": "The Storybook builder to use.", - "enum": ["vite", "webpack"] - } - }, - "required": ["name"], - "examplesFile": "This generator will set up Storybook for your React project.\n\n```bash\nnx g @nrwl/react:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/storybook/overview-react#generate-storybook-configuration-for-an-react-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `configureCypress`. If you choose `yes`, a Cypress e2e app will be created (or configured) to run against the project's Storybook instance. You can read more about this in the [Storybook for React - Cypress section](/storybook/overview-react#cypress-tests-for-stories).\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n- Whether you want to `configureTestRunner`. If you choose `yes`, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner).\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration using TypeScript\n\n```bash\nnx g @nrwl/react:storybook-configuration ui --tsConfiguration=true\n```\n\nThis will generate a Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/react:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nrwl/react:storybook-configuration ui --generateStories=true --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n", - "presets": [] - }, - "description": "Set up storybook for a React app or library.", - "hidden": false, - "implementation": "/packages/react/src/generators/storybook-configuration/configuration#storybookConfigurationGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/storybook-configuration/schema.json" - }, - { - "name": "component-story", - "factory": "./src/generators/component-story/component-story#componentStoryGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactComponentStory", - "title": "Create component story", - "description": "Generate storybook story for a react component.", - "type": "object", - "properties": { - "project": { - "type": "string", - "aliases": ["name", "projectName"], - "description": "The project where to add the components.", - "examples": ["shared-ui-component"], - "$default": { "$source": "projectName", "index": 0 }, - "x-prompt": "What's name of the project where the component lives?" - }, - "componentPath": { - "type": "string", - "description": "Relative path to the component file from the library root.", - "examples": ["lib/components"], - "x-prompt": "What's path of the component relative to the project's lib root?" - } - }, - "required": ["project", "componentPath"], - "presets": [] - }, - "description": "Generate storybook story for a React component", - "hidden": false, - "implementation": "/packages/react/src/generators/component-story/component-story#componentStoryGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/component-story/schema.json" - }, - { - "name": "stories", - "factory": "./src/generators/stories/stories#storiesGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactStorybookStories", - "title": "Generate React Storybook stories", - "description": "Generate stories/specs for all components declared in a project.", - "type": "object", - "properties": { - "project": { - "type": "string", - "aliases": ["name", "projectName"], - "description": "Project for which to generate stories.", - "$default": { "$source": "projectName", "index": 0 }, - "x-prompt": "For which project do you want to generate stories?" - }, - "generateCypressSpecs": { - "type": "boolean", - "description": "Automatically generate `*.spec.ts` files in the cypress e2e app generated by the cypress-configure generator.", - "x-prompt": "Do you want to generate Cypress specs as well?" - }, - "cypressProject": { - "type": "string", - "description": "The Cypress project to generate the stories under. This is inferred from `project` by default." - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "ignorePaths": { - "type": "array", - "description": "Paths to ignore when looking for components.", - "items": { "type": "string", "description": "Path to ignore." }, - "examples": [ - "apps/my-app/src/not-stories/**", - "**/**/src/**/not-stories/**", - "libs/my-lib/**/*.something.ts", - "**/**/src/**/*.other.*", - "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" - ] - } - }, - "required": ["project"], - "examplesFile": "This generator will generate stories for all your components in your project.\n\n```bash\nnx g @nrwl/react:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/storybook/overview-react#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/react:stories --name=ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nrwl/react:stories --name=ui --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n", - "presets": [] - }, - "description": "Create stories/specs for all components declared in an app or library.", - "hidden": false, - "implementation": "/packages/react/src/generators/stories/stories#storiesGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/stories/schema.json" - }, - { - "name": "component-cypress-spec", - "factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactComponentCypressSpec", - "title": "Create component Cypress spec", - "description": "Create a Cypress spec for a UI component that has a story.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The project name for which to generate tests.", - "examples": ["shared-ui-component"], - "$default": { "$source": "projectName", "index": 0 }, - "x-prompt": "What's name of the project for which to generate tests?" - }, - "componentPath": { - "type": "string", - "description": "Relative path to the component file from the library root?", - "examples": ["lib/components"], - "x-prompt": "What's path of the component relative to the project's lib root for which to generate a test?" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "cypressProject": { - "type": "string", - "description": "The Cypress project to generate the stories under. By default, inferred from `project`." - } - }, - "required": ["project", "componentPath"], - "presets": [] - }, - "description": "Create a Cypress spec for a UI component that has a story.", - "hidden": false, - "implementation": "/packages/react/src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/component-cypress-spec/schema.json" - }, - { - "name": "hook", - "factory": "./src/generators/hook/hook#hookGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactHook", - "title": "Create a React Hook for Nx", - "description": "Create a React component using Hooks in a dedicated React project.", - "type": "object", - "examples": [ - { - "command": "nx g hook my-hook --project=mylib", - "description": "Generate a hook in the `mylib` library" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the project for this hook?" - }, - "name": { - "type": "string", - "description": "The name of the hook.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use for the hook?" - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "skipTests": { - "type": "boolean", - "description": "When true, does not create `spec.ts` test files for the new hook.", - "default": false - }, - "directory": { - "type": "string", - "description": "Create the hook under this directory (can be nested)." - }, - "flat": { - "type": "boolean", - "description": "Create hook at the source root rather than its own directory.", - "default": false - }, - "export": { - "type": "boolean", - "description": "When true, the hook is exported from the project `index.ts` (if it exists).", - "alias": "e", - "default": false, - "x-prompt": "Should this hook be exported in the project?" - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case hook file name (e.g. `useHook.ts`).", - "alias": "P", - "default": false - }, - "pascalCaseDirectory": { - "type": "boolean", - "description": "Use pascal case directory name (e.g. `useHook/useHook.ts`).", - "alias": "R", - "default": false - } - }, - "required": ["name", "project"], - "presets": [] - }, - "description": "Create a hook.", - "aliases": ["c"], - "implementation": "/packages/react/src/generators/hook/hook#hookGenerator.ts", - "hidden": false, - "path": "/packages/react/src/generators/hook/schema.json" - }, - { - "name": "host", - "factory": "./src/generators/host/host#hostGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorReactHost", - "cli": "nx", - "title": "Generate Module Federation Setup for React Host App", - "description": "Create Module Federation configuration files for given React Host Application.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the host application to generate the Module Federation configuration", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use as the host application?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string", - "alias": "dir" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "alias": "s", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - }, - { "value": "none", "label": "None" } - ] - } - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipWorkspaceJson": { - "description": "Skip updating workspace.json with default options based on values provided to this app (e.g. babel, style).", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["cypress", "none"], - "description": "Test runner to use for end to end (e2e) tests.", - "default": "cypress" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting).", - "alias": "t" - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. App.tsx).", - "alias": "P", - "default": false - }, - "classComponent": { - "type": "boolean", - "description": "Use class components instead of functional component.", - "alias": "C", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "globalCss": { - "type": "boolean", - "description": "Default is false. When true, the component is generated with *.css/*.scss instead of *.module.css/*.module.scss", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Creates an application with strict mode and strict type checking", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into /project.json rather than including it inside workspace.json", - "type": "boolean" - }, - "compiler": { - "type": "string", - "description": "The compiler to use", - "enum": ["babel", "swc"], - "default": "babel" - }, - "remotes": { - "type": "array", - "description": "A list of remote application names that the host application should consume.", - "default": [] - }, - "devServerPort": { - "type": "number", - "description": "The port for the dev server of the remote app.", - "default": 4200 - }, - "ssr": { - "description": "Whether to configure SSR for the host application", - "type": "boolean", - "default": false - } - }, - "required": ["name"], - "additionalProperties": false, - "presets": [] - }, - "x-type": "application", - "description": "Generate a host react application", - "implementation": "/packages/react/src/generators/host/host#hostGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/react/src/generators/host/schema.json" - }, - { - "name": "remote", - "factory": "./src/generators/remote/remote#remoteGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorReactRemote", - "cli": "nx", - "title": "Generate Module Federation Setup for React Remote App", - "description": "Create Module Federation configuration files for given React Remote Application.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the remote application to generate the Module Federation configuration", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What name would you like to use as the remote application?", - "pattern": "^[a-zA-Z].*$" - }, - "directory": { - "description": "The directory of the new application.", - "type": "string", - "alias": "dir" - }, - "style": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css", - "alias": "s", - "x-prompt": { - "message": "Which stylesheet format would you like to use?", - "type": "list", - "items": [ - { "value": "css", "label": "CSS" }, - { - "value": "scss", - "label": "SASS(.scss) [ http://sass-lang.com ]" - }, - { - "value": "styl", - "label": "Stylus(.styl) [ http://stylus-lang.com ]" - }, - { - "value": "less", - "label": "LESS [ http://lesscss.org ]" - }, - { - "value": "styled-components", - "label": "styled-components [ https://styled-components.com ]" - }, - { - "value": "@emotion/styled", - "label": "emotion [ https://emotion.sh ]" - }, - { - "value": "styled-jsx", - "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" - }, - { "value": "none", "label": "None" } - ] - } - }, - "linter": { - "description": "The tool to use for running lint checks.", - "type": "string", - "enum": ["eslint"], - "default": "eslint" - }, - "routing": { - "type": "boolean", - "description": "Generate application with routes.", - "default": false - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipWorkspaceJson": { - "description": "Skip updating workspace.json with default options based on values provided to this app (e.g. babel, style).", - "type": "boolean", - "default": false - }, - "unitTestRunner": { - "type": "string", - "enum": ["jest", "none"], - "description": "Test runner to use for unit tests.", - "default": "jest" - }, - "e2eTestRunner": { - "type": "string", - "enum": ["cypress", "none"], - "description": "Test runner to use for end to end (e2e) tests.", - "default": "cypress" - }, - "tags": { - "type": "string", - "description": "Add tags to the application (used for linting).", - "alias": "t" - }, - "pascalCaseFiles": { - "type": "boolean", - "description": "Use pascal case component file name (e.g. App.tsx).", - "alias": "P", - "default": false - }, - "classComponent": { - "type": "boolean", - "description": "Use class components instead of functional component.", - "alias": "C", - "default": false - }, - "js": { - "type": "boolean", - "description": "Generate JavaScript files rather than TypeScript files.", - "default": false - }, - "globalCss": { - "type": "boolean", - "description": "Default is false. When true, the component is generated with *.css/*.scss instead of *.module.css/*.module.scss.", - "default": false - }, - "strict": { - "type": "boolean", - "description": "Creates an application with strict mode and strict type checking.", - "default": true - }, - "setParserOptionsProject": { - "type": "boolean", - "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", - "default": false - }, - "standaloneConfig": { - "description": "Split the project configuration into /project.json rather than including it inside workspace.json", - "type": "boolean" - }, - "compiler": { - "type": "string", - "description": "The compiler to use.", - "enum": ["babel", "swc"], - "default": "babel" - }, - "host": { - "type": "string", - "description": "The host / shell application for this remote." - }, - "devServerPort": { - "type": "number", - "description": "The port for the dev server of the remote app.", - "default": 4200 - }, - "ssr": { - "description": "Whether to configure SSR for the host application", - "type": "boolean", - "default": false - } - }, - "required": ["name"], - "additionalProperties": false, - "presets": [] - }, - "x-type": "application", - "description": "Generate a remote react application", - "implementation": "/packages/react/src/generators/remote/remote#remoteGenerator.ts", - "aliases": [], - "hidden": false, - "path": "/packages/react/src/generators/remote/schema.json" - }, - { - "name": "cypress-component-configuration", - "factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator", - "schema": { - "$schema": "https://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactCypressComponentTestConfiguration", - "title": "Add Cypress component testing", - "description": "Add a Cypress component testing configuration to an existing project.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/react:cypress-component-configuration --project=my-react-project", - "description": "Add component testing to your react project" - }, - { - "command": "nx g @nrwl/react:cypress-component-configuration --project=my-react-project --generate-tests", - "description": "Add component testing to your react project and generate component tests for your existing components" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project to add cypress component testing configuration to", - "x-dropdown": "projects", - "x-prompt": "What project should we add Cypress component testing to?" - }, - "generateTests": { - "type": "boolean", - "description": "Generate default component tests for existing components in the project", - "x-prompt": "Automatically generate tests for components declared in this project?", - "default": false - }, - "buildTarget": { - "type": "string", - "description": "A build target used to configure Cypress component testing in the format of `project:target[:configuration]`. The build target should be from a React app. If not provided we will try to infer it from your projects usage.", - "pattern": "^[^:\\s]+:[^:\\s]+(:\\S+)?$" - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting files", - "default": false - }, - "bundler": { - "description": "The bundler to use for Cypress Component Testing.", - "type": "string", - "enum": ["vite", "webpack"], - "hidden": true - } - }, - "required": ["project"], - "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nReact component testing with Nx requires **Cypress version 10.7.0** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you want to test components via Storybook with Cypress, then check out the [storybook-configuration generator docs](/packages/react/generators/storybook-configuration)\n{% /callout %}\n\nThis generator is designed to get your React project up and running with Cypress Component Testing.\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project\n```\n\nRunning this generator, adds the required files to the specified project with a preconfigured `cypress.config.ts` designed for Nx workspaces.\n\nThe following file will be added to projects where the Component Testing build target is using `webpack` for bundling:\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/react/plugins/component-testing';\n\nexport default defineConfig({\n component: nxComponentTestingPreset(__filename, {\n bundler: 'webpack',\n }),\n});\n```\n\nThe following file will be added to projects where the Component Testing build target is using `vite` for bundling:\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/react/plugins/component-testing';\n\nexport default defineConfig({\n component: nxComponentTestingPreset(__filename, {\n bundler: 'vite',\n }),\n});\n```\n\nHere is an example on how to add custom options to the configuration\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/react/plugins/component-testing';\n\nexport default defineConfig({\n component: {\n ...nxComponentTestingPreset(__filename, {\n bundler: 'webpack',\n }),\n // extra options here\n },\n});\n```\n\n## The `bundler` option\n\nComponent testing supports two different bundlers: `webpack` and `vite`. The Nx generator will pick up the bundler used in the specified project's build target. If the build target is using `@nrwl/webpack:webpack`, then the generator will use `webpack` as the bundler. If the build target is using `@nrwl/vite:build`, then the generator will use `vite` as the bundler.\n\nYou can manually set the bundler by passing `--bundler=webpack` or `--bundler=vite` to the generator, but that is not needed since the generator will pick up the correct bundler for you. However, if you want to use a different bundler than the one that is used in the build target, then you can manually set it using that flag.\n\n## Specifying a Build Target\n\nComponent testing requires a _build target_ to correctly run the component test dev server. This option can be manually specified with `--build-target=some-react-app:build`, but Nx will infer this usage from the [project graph](/concepts/mental-model#the-project-graph) if one isn't provided.\n\nFor React projects, the build target needs to be using the `@nrwl/webpack:webpack` executor.\nThe generator will throw an error if a build target can't be found and suggest passing one in manually.\n\nLetting Nx infer the build target by default\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project\n```\n\nManually specifying the build target\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project --build-target:some-react-app:build --generate-tests\n```\n\n{% callout type=\"note\" title=\"Build Target with Configuration\" %}\nIf you're wanting to use a build target with a specific configuration. i.e. `my-app:build:production`,\nthen manually providing `--build-target=my-app:build:production` is the best way to do that.\n{% /callout %}\n\n## Auto Generating Tests\n\nYou can optionally use the `--generate-tests` flag to generate a test file for each component in your project.\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project --generate-tests\n```\n\n## Running Component Tests\n\nA new `component-test` target will be added to the specified project to run your component tests.\n\n```shell\nnx g component-test my-cool-react-project\n```\n\nHere is an example of the project configuration that is generated. The `--build-target` option is added as the `devServerTarget` which can be changed as needed.\n\n```json {% fileName=\"project.json\" %}\n{\n \"targets\" {\n \"component-test\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"/cypress.config.ts\",\n \"testingType\": \"component\",\n \"devServerTarget\": \"some-react-app:build\",\n \"skipServe\": true\n }\n }\n }\n}\n```\n\nNx also supports [Angular component testing](/packages/angular/generators/cypress-component-configuration).\n", - "presets": [] - }, - "description": "Setup Cypress component testing for a React project", - "hidden": false, - "implementation": "/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/cypress-component-configuration/schema.json" - }, - { - "name": "component-test", - "factory": "./src/generators/component-test/component-test#componentTestGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactCypressComponentTest", - "title": "Add Cypress component test", - "description": "Add a Cypress component test for a component.", - "type": "object", - "examples": [ - { - "command": "nx g @nrwl/react:component-test --project=my-react-project --component-path=src/lib/fancy-component.tsx", - "description": "Create a cypress component test for FancyComponent" - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project the component is apart of", - "x-dropdown": "projects", - "x-prompt": "What project is this component apart of?" - }, - "componentPath": { - "type": "string", - "description": "Path to component, from the project source root", - "x-prompt": "What is the path to the component?" - } - }, - "required": ["project", "componentPath"], - "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nReact component testing with Nx requires **Cypress version 10** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you're wanting to create Cypress tests for a Storybook story, then check out the [component-cypress-spec generator docs](/packages/react/generators/component-cypress-spec)\n\nIf you're wanting to create Storybook stories for a component, then check out the [stories generator docs](/packages/react/generators/stories) or [component-story generator docs](/packages/react/generators/component-cypress-spec)\n\n{% /callout %}\n\nThis generator is used to create a Cypress component test file for a given React component.\n\n```shell\nnx g @nrwl/react:component-test --project=my-cool-react-project --componentPath=src/my-fancy-button.tsx\n```\n\nTest file are generated with the `.cy.` suffix. this is to prevent colliding with any existing `.spec.` files contained in the project.\n\nIt's currently expected the generated `.cy.` file will live side by side with the component. It is also assumed the project is already setup for component testing. If it isn't, then you can run the [cypress-component-project generator](/packages/react/generators/cypress-component-configuration) to set up the project for component testing.\n", - "presets": [] - }, - "description": "Generate a Cypress component test for a React component", - "hidden": false, - "implementation": "/packages/react/src/generators/component-test/component-test#componentTestGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/component-test/schema.json" - }, - { - "name": "setup-tailwind", - "factory": "./src/generators/setup-tailwind/setup-tailwind#setupTailwindGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "cli": "nx", - "$id": "NxReactTailwindSetupGenerator", - "title": "Configures Tailwind CSS for an application or a buildable/publishable library.", - "description": "Adds the Tailwind CSS configuration files for a given React project and installs, if needed, the packages required for Tailwind CSS to work.", - "type": "object", - "examples": [ - { - "command": "nx g setup-tailwind --project=my-app", - "description": "Initialize Tailwind configuration for the `my-app` project." - } - ], - "properties": { - "project": { - "type": "string", - "description": "The name of the project to add the Tailwind CSS setup for.", - "alias": "p", - "$default": { "$source": "argv", "index": 0 }, - "x-dropdown": "projects", - "x-prompt": "What project would you like to add the Tailwind CSS setup?" - }, - "buildTarget": { - "type": "string", - "description": "The name of the target used to build the project. This option is not needed in most cases.", - "default": "build" - }, - "skipFormat": { - "type": "boolean", - "description": "Skips formatting the workspace after the generator completes." - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - } - }, - "additionalProperties": false, - "required": ["project"], - "presets": [] - }, - "description": "Set up Tailwind configuration for a project.", - "hidden": false, - "implementation": "/packages/react/src/generators/setup-tailwind/setup-tailwind#setupTailwindGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/setup-tailwind/schema.json" - }, - { - "name": "setup-ssr", - "factory": "./src/generators/setup-ssr/setup-ssr#setupSsrGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "GeneratorReactSSRSetup", - "cli": "nx", - "title": "Generate SSR setup for a React app", - "description": "Create the additional configuration required to enable SSR via Express for a React application.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the application to add SSR support to.", - "$default": { "$source": "argv", "index": 0 }, - "x-prompt": "What app would you like to add SSR support to?", - "x-dropdown": "projects" - }, - "appComponentImportPath": { - "type": "string", - "description": "The import path of the component, relative to project sourceRoot.", - "default": "app/app" - }, - "serverPort": { - "type": "number", - "default": 4200, - "description": "The port for the Express server." - }, - "skipFormat": { - "type": "boolean", - "description": "Skip formatting the workspace after the generator completes." - }, - "extraInclude": { - "type": "array", - "items": { "type": "string" }, - "hidden": true, - "description": "Extra include entries in tsconfig.", - "default": [] - } - }, - "required": ["project"], - "additionalProperties": false, - "presets": [] - }, - "description": "Set up SSR configuration for a project.", - "hidden": false, - "implementation": "/packages/react/src/generators/setup-ssr/setup-ssr#setupSsrGenerator.ts", - "aliases": [], - "path": "/packages/react/src/generators/setup-ssr/schema.json" - } - ], - "executors": [ - { - "name": "module-federation-dev-server", - "implementation": "/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Module Federation Dev Server", - "description": "Serve a web application.", - "cli": "nx", - "type": "object", - "properties": { - "devRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to run in development mode (i.e. using serve target)." - }, - "skipRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." - }, - "buildTarget": { - "type": "string", - "description": "Target which builds the application." - }, - "port": { - "type": "number", - "description": "Port to listen on.", - "default": 4200 - }, - "host": { - "type": "string", - "description": "Host to listen on.", - "default": "localhost" - }, - "ssl": { - "type": "boolean", - "description": "Serve using `HTTPS`.", - "default": false - }, - "sslKey": { - "type": "string", - "description": "SSL key to use for serving `HTTPS`." - }, - "sslCert": { - "type": "string", - "description": "SSL certificate to use for serving `HTTPS`." - }, - "watch": { - "type": "boolean", - "description": "Watches for changes and rebuilds application.", - "default": true - }, - "liveReload": { - "type": "boolean", - "description": "Whether to reload the page on change, using live-reload.", - "default": true - }, - "hmr": { - "type": "boolean", - "description": "Enable hot module replacement.", - "default": false - }, - "publicHost": { - "type": "string", - "description": "Public URL where the application will be served." - }, - "open": { - "type": "boolean", - "description": "Open the application in the browser.", - "default": false - }, - "allowedHosts": { - "type": "string", - "description": "This option allows you to whitelist services that are allowed to access the dev server." - }, - "memoryLimit": { - "type": "number", - "description": "Memory limit for type checking service process in `MB`." - }, - "maxWorkers": { - "type": "number", - "description": "Number of workers to use for type checking." - }, - "baseHref": { - "type": "string", - "description": "Base url for the application being built." - } - }, - "presets": [] - }, - "description": "Serve a host or remote application.", - "aliases": [], - "hidden": false, - "path": "/packages/react/src/executors/module-federation-dev-server/schema.json" - }, - { - "name": "module-federation-ssr-dev-server", - "implementation": "/packages/react/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Module Federation SSR Dev Server", - "description": "Serve a SSR host application along with its known remotes.", - "cli": "nx", - "type": "object", - "properties": { - "browserTarget": { - "type": "string", - "description": "Target which builds the browser application." - }, - "serverTarget": { - "type": "string", - "description": "Target which builds the server application." - }, - "port": { - "type": "number", - "description": "The port to be set on `process.env.PORT` for use in the server.", - "default": 4200 - }, - "devRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to run in development mode (i.e. using serve target)." - }, - "skipRemotes": { - "type": "array", - "items": { "type": "string" }, - "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." - }, - "host": { - "type": "string", - "description": "Host to listen on.", - "default": "localhost" - } - }, - "required": ["browserTarget", "serverTarget"], - "presets": [] - }, - "description": "Serve a host application along with it's known remotes.", - "aliases": [], - "hidden": false, - "path": "/packages/react/src/executors/module-federation-ssr-dev-server/schema.json" - } - ] -} diff --git a/docs/generated/packages/react/documents/overview.md b/docs/generated/packages/react/documents/overview.md new file mode 100644 index 0000000000000..57530b7f2ceb9 --- /dev/null +++ b/docs/generated/packages/react/documents/overview.md @@ -0,0 +1,124 @@ +The React plugin contains executors and generators for managing React applications and libraries within an Nx workspace. +It provides: + +- Integration with libraries such as Jest, Cypress, and Storybook. +- Generators for applications, libraries, components, hooks, and more. +- Library build support for publishing packages to npm or other registries. +- Utilities for automatic workspace refactoring. + +## Setting Up React + +To create a new workspace with React, run `npx create-nx-workspace@latest --preset=react`. + +To add the React plugin to an existing workspace, run one of the following: + +```shell +# For npm users +npm install -D @nrwl/react + +# For yarn users +yarn add -D @nrwl/react +``` + +### Creating Applications and Libraries + +You can add a new application with the following: + +```shell +nx g @nrwl/react:app my-new-app +``` + +To start the application in development mode, run `nx serve my-new-app`. + +And add a new library as follows: + +```shell +nx g @nrwl/react:lib my-new-lib + +# If you want the library to be buildable or publishable to npm +nx g @nrwl/react:lib my-new-lib --buildable +nx g @nrwl/react:lib my-new-lib \ +--publishable \ +--importPath=@myorg/my-new-lib +``` + +Read more about [building and publishing libraries here](/more-concepts/buildable-and-publishable-libraries). + +### Creating Components + +Adding a component to an existing project can be done with: + +```shell +nx g @nrwl/react:component my-new-component \ +--project=my-new-app + +# Note: If you want to export the component +# from the library use --export +nx g @nrwl/react:component my-new-component \ +--project=my-new-lib \ +--export +``` + +Replace `my-new-app` and `my-new-lib` with the name of your projects. + +### Creating Hooks + +If you want to add a new hook, run the following + +```shell +nx g @nrwl/react:hook my-new-hook --project=my-new-lib +``` + +Replace `my-new-lib` with the name of your project. + +## Using React + +### Testing Projects + +You can run unit tests with: + +```shell +nx test my-new-app +nx test my-new-lib +``` + +Replace `my-new-app` with the name or your project. This command works for both applications and libraries. + +You can also run E2E tests for applications: + +```shell +nx e2e my-new-app-e2e +``` + +Replace `my-new-app-e2e` with the name or your project with `-e2e` appended. + +### Building Projects + +React applications can be build with: + +```shell +nx build my-new-app +``` + +And if you generated a library with `--buildable`, then you can build a library as well: + +```shell +nx build my-new-lib +``` + +The output is in the `dist` folder. You can customize the output folder by setting `outputPath` in the +project's `project.json` file. + +The application in `dist` is deployable, and you can try it out locally with: + +```shell +npx http-server dist/apps/my-new-app +``` + +The library in `dist` is publishable to npm or a private registry. + +## More Documentation + +- [Using Cypress](/packages/cypress) +- [Using Jest](/packages/jest) +- [Using Storybook](/packages/storybook/documents/overview-react) diff --git a/docs/generated/packages/react/executors/module-federation-dev-server.json b/docs/generated/packages/react/executors/module-federation-dev-server.json new file mode 100644 index 0000000000000..9b8ccd62c3843 --- /dev/null +++ b/docs/generated/packages/react/executors/module-federation-dev-server.json @@ -0,0 +1,97 @@ +{ + "name": "module-federation-dev-server", + "implementation": "/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Module Federation Dev Server", + "description": "Serve a web application.", + "cli": "nx", + "type": "object", + "properties": { + "devRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to run in development mode (i.e. using serve target)." + }, + "skipRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." + }, + "buildTarget": { + "type": "string", + "description": "Target which builds the application." + }, + "port": { + "type": "number", + "description": "Port to listen on.", + "default": 4200 + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + }, + "ssl": { + "type": "boolean", + "description": "Serve using `HTTPS`.", + "default": false + }, + "sslKey": { + "type": "string", + "description": "SSL key to use for serving `HTTPS`." + }, + "sslCert": { + "type": "string", + "description": "SSL certificate to use for serving `HTTPS`." + }, + "watch": { + "type": "boolean", + "description": "Watches for changes and rebuilds application.", + "default": true + }, + "liveReload": { + "type": "boolean", + "description": "Whether to reload the page on change, using live-reload.", + "default": true + }, + "hmr": { + "type": "boolean", + "description": "Enable hot module replacement.", + "default": false + }, + "publicHost": { + "type": "string", + "description": "Public URL where the application will be served." + }, + "open": { + "type": "boolean", + "description": "Open the application in the browser.", + "default": false + }, + "allowedHosts": { + "type": "string", + "description": "This option allows you to whitelist services that are allowed to access the dev server." + }, + "memoryLimit": { + "type": "number", + "description": "Memory limit for type checking service process in `MB`." + }, + "maxWorkers": { + "type": "number", + "description": "Number of workers to use for type checking." + }, + "baseHref": { + "type": "string", + "description": "Base url for the application being built." + } + }, + "presets": [] + }, + "description": "Serve a host or remote application.", + "aliases": [], + "hidden": false, + "path": "/packages/react/src/executors/module-federation-dev-server/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react/executors/module-federation-ssr-dev-server.json b/docs/generated/packages/react/executors/module-federation-ssr-dev-server.json new file mode 100644 index 0000000000000..860e58603e6d4 --- /dev/null +++ b/docs/generated/packages/react/executors/module-federation-ssr-dev-server.json @@ -0,0 +1,49 @@ +{ + "name": "module-federation-ssr-dev-server", + "implementation": "/packages/react/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Module Federation SSR Dev Server", + "description": "Serve a SSR host application along with its known remotes.", + "cli": "nx", + "type": "object", + "properties": { + "browserTarget": { + "type": "string", + "description": "Target which builds the browser application." + }, + "serverTarget": { + "type": "string", + "description": "Target which builds the server application." + }, + "port": { + "type": "number", + "description": "The port to be set on `process.env.PORT` for use in the server.", + "default": 4200 + }, + "devRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to run in development mode (i.e. using serve target)." + }, + "skipRemotes": { + "type": "array", + "items": { "type": "string" }, + "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository." + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + } + }, + "required": ["browserTarget", "serverTarget"], + "presets": [] + }, + "description": "Serve a host application along with it's known remotes.", + "aliases": [], + "hidden": false, + "path": "/packages/react/src/executors/module-federation-ssr-dev-server/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/react/generators/application.json b/docs/generated/packages/react/generators/application.json new file mode 100644 index 0000000000000..9a826f1eaffa8 --- /dev/null +++ b/docs/generated/packages/react/generators/application.json @@ -0,0 +1,202 @@ +{ + "name": "application", + "factory": "./src/generators/application/application#applicationGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactApp", + "title": "Create a React Application", + "description": "Create a React application for Nx.", + "examples": [ + { + "command": "nx g app myapp --directory=myorg", + "description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`" + }, + { + "command": "nx g app myapp --classComponent", + "description": "Use class components instead of functional components" + }, + { + "command": "nx g app myapp --routing", + "description": "Set up React Router" + } + ], + "type": "object", + "properties": { + "name": { + "description": "The name of the application.", + "type": "string", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the application?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string", + "alias": "dir" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "alias": "s", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + }, + { "value": "none", "label": "None" } + ] + } + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "routing": { + "type": "boolean", + "description": "Generate application with routes.", + "x-prompt": "Would you like to add React Router to this application?", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipWorkspaceJson": { + "description": "Skip updating `workspace.json` with default options based on values provided to this app (e.g. babel, style).", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "vitest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "inSourceTests": { + "type": "boolean", + "default": false, + "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["cypress", "none"], + "description": "Test runner to use for end to end (E2E) tests.", + "default": "cypress" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting).", + "alias": "t" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. `App.tsx`).", + "alias": "P", + "default": false + }, + "classComponent": { + "type": "boolean", + "description": "Use class components instead of functional component.", + "alias": "C", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "globalCss": { + "type": "boolean", + "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Creates an application with strict mode and strict type checking.", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "compiler": { + "type": "string", + "description": "The compiler to use.", + "enum": ["babel", "swc"], + "default": "babel" + }, + "skipDefaultProject": { + "description": "Skip setting the project as the default project. When `false` (the default), the project is set as the default project only if there is no default project already set.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "description": "Do not add dependencies to `package.json`.", + "type": "boolean", + "default": false + }, + "rootProject": { + "description": "Create a application at the root of the workspace", + "type": "boolean", + "default": false, + "hidden": true + }, + "bundler": { + "description": "The bundler to use.", + "type": "string", + "enum": ["vite", "webpack"], + "x-prompt": "Which bundler do you want to use to build the application?", + "default": "webpack" + }, + "minimal": { + "description": "Generate a React app with a minimal setup, no separate test files.", + "type": "boolean", + "default": false + } + }, + "required": [], + "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/react:application my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Application using Vite as bundler\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/react:app my-app --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory and style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n```bash\nnx g @nrwl/react:app my-app --directory=my-dir --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Add tags\" %}\n\nAdd tags to the application (used for linting).\n\n```bash\nnx g @nrwl/react:app my-app --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n", + "presets": [] + }, + "aliases": ["app"], + "x-type": "application", + "description": "Create a React application.", + "implementation": "/packages/react/src/generators/application/application#applicationGenerator.ts", + "hidden": false, + "path": "/packages/react/src/generators/application/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/component-cypress-spec.json b/docs/generated/packages/react/generators/component-cypress-spec.json new file mode 100644 index 0000000000000..125262c91c38a --- /dev/null +++ b/docs/generated/packages/react/generators/component-cypress-spec.json @@ -0,0 +1,44 @@ +{ + "name": "component-cypress-spec", + "factory": "./src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactComponentCypressSpec", + "title": "Create component Cypress spec", + "description": "Create a Cypress spec for a UI component that has a story.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The project name for which to generate tests.", + "examples": ["shared-ui-component"], + "$default": { "$source": "projectName", "index": 0 }, + "x-prompt": "What's name of the project for which to generate tests?" + }, + "componentPath": { + "type": "string", + "description": "Relative path to the component file from the library root?", + "examples": ["lib/components"], + "x-prompt": "What's path of the component relative to the project's lib root for which to generate a test?" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "cypressProject": { + "type": "string", + "description": "The Cypress project to generate the stories under. By default, inferred from `project`." + } + }, + "required": ["project", "componentPath"], + "presets": [] + }, + "description": "Create a Cypress spec for a UI component that has a story.", + "hidden": false, + "implementation": "/packages/react/src/generators/component-cypress-spec/component-cypress-spec#componentCypressGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/component-cypress-spec/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/component-story.json b/docs/generated/packages/react/generators/component-story.json new file mode 100644 index 0000000000000..9b6d35af1a27b --- /dev/null +++ b/docs/generated/packages/react/generators/component-story.json @@ -0,0 +1,36 @@ +{ + "name": "component-story", + "factory": "./src/generators/component-story/component-story#componentStoryGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactComponentStory", + "title": "Create component story", + "description": "Generate storybook story for a react component.", + "type": "object", + "properties": { + "project": { + "type": "string", + "aliases": ["name", "projectName"], + "description": "The project where to add the components.", + "examples": ["shared-ui-component"], + "$default": { "$source": "projectName", "index": 0 }, + "x-prompt": "What's name of the project where the component lives?" + }, + "componentPath": { + "type": "string", + "description": "Relative path to the component file from the library root.", + "examples": ["lib/components"], + "x-prompt": "What's path of the component relative to the project's lib root?" + } + }, + "required": ["project", "componentPath"], + "presets": [] + }, + "description": "Generate storybook story for a React component", + "hidden": false, + "implementation": "/packages/react/src/generators/component-story/component-story#componentStoryGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/component-story/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/component-test.json b/docs/generated/packages/react/generators/component-test.json new file mode 100644 index 0000000000000..5145daf2f6fa4 --- /dev/null +++ b/docs/generated/packages/react/generators/component-test.json @@ -0,0 +1,40 @@ +{ + "name": "component-test", + "factory": "./src/generators/component-test/component-test#componentTestGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactCypressComponentTest", + "title": "Add Cypress component test", + "description": "Add a Cypress component test for a component.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/react:component-test --project=my-react-project --component-path=src/lib/fancy-component.tsx", + "description": "Create a cypress component test for FancyComponent" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project the component is apart of", + "x-dropdown": "projects", + "x-prompt": "What project is this component apart of?" + }, + "componentPath": { + "type": "string", + "description": "Path to component, from the project source root", + "x-prompt": "What is the path to the component?" + } + }, + "required": ["project", "componentPath"], + "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nReact component testing with Nx requires **Cypress version 10** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you're wanting to create Cypress tests for a Storybook story, then check out the [component-cypress-spec generator docs](/packages/react/generators/component-cypress-spec)\n\nIf you're wanting to create Storybook stories for a component, then check out the [stories generator docs](/packages/react/generators/stories) or [component-story generator docs](/packages/react/generators/component-cypress-spec)\n\n{% /callout %}\n\nThis generator is used to create a Cypress component test file for a given React component.\n\n```shell\nnx g @nrwl/react:component-test --project=my-cool-react-project --componentPath=src/my-fancy-button.tsx\n```\n\nTest file are generated with the `.cy.` suffix. this is to prevent colliding with any existing `.spec.` files contained in the project.\n\nIt's currently expected the generated `.cy.` file will live side by side with the component. It is also assumed the project is already setup for component testing. If it isn't, then you can run the [cypress-component-project generator](/packages/react/generators/cypress-component-configuration) to set up the project for component testing.\n", + "presets": [] + }, + "description": "Generate a Cypress component test for a React component", + "hidden": false, + "implementation": "/packages/react/src/generators/component-test/component-test#componentTestGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/component-test/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/component.json b/docs/generated/packages/react/generators/component.json new file mode 100644 index 0000000000000..b648c5a4034b9 --- /dev/null +++ b/docs/generated/packages/react/generators/component.json @@ -0,0 +1,146 @@ +{ + "name": "component", + "factory": "./src/generators/component/component#componentGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactComponent", + "title": "Create a React Component", + "description": "Create a React Component for Nx.", + "type": "object", + "examples": [ + { + "command": "nx g component my-component --project=mylib", + "description": "Generate a component in the `mylib` library" + }, + { + "command": "nx g component my-component --project=mylib --classComponent", + "description": "Generate a class component in the `mylib` library" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for this component?" + }, + "name": { + "type": "string", + "description": "The name of the component.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the component?" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "alias": "s", + "default": "css", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + }, + { "value": "none", "label": "None" } + ] + } + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "skipTests": { + "type": "boolean", + "description": "When true, does not create `spec.ts` test files for the new component.", + "default": false + }, + "directory": { + "type": "string", + "description": "Create the component under this directory (can be nested).", + "alias": "dir" + }, + "flat": { + "type": "boolean", + "description": "Create component at the source root rather than its own directory.", + "default": false + }, + "export": { + "type": "boolean", + "description": "When true, the component is exported from the project `index.ts` (if it exists).", + "alias": "e", + "default": false, + "x-prompt": "Should this component be exported in the project?" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. `App.tsx`).", + "alias": "P", + "default": false + }, + "pascalCaseDirectory": { + "type": "boolean", + "description": "Use pascal case directory name (e.g. `App/App.tsx`).", + "alias": "R", + "default": false + }, + "classComponent": { + "type": "boolean", + "alias": "C", + "description": "Use class components instead of functional component.", + "default": false + }, + "routing": { + "type": "boolean", + "description": "Generate a library with routes." + }, + "globalCss": { + "type": "boolean", + "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.", + "default": false + }, + "fileName": { + "type": "string", + "description": "Create a component with this file name." + }, + "inSourceTests": { + "type": "boolean", + "default": false, + "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html" + } + }, + "required": ["name", "project"], + "presets": [] + }, + "description": "Create a React component.", + "aliases": ["c"], + "implementation": "/packages/react/src/generators/component/component#componentGenerator.ts", + "hidden": false, + "path": "/packages/react/src/generators/component/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/cypress-component-configuration.json b/docs/generated/packages/react/generators/cypress-component-configuration.json new file mode 100644 index 0000000000000..5233532718ce1 --- /dev/null +++ b/docs/generated/packages/react/generators/cypress-component-configuration.json @@ -0,0 +1,61 @@ +{ + "name": "cypress-component-configuration", + "factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator", + "schema": { + "$schema": "https://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactCypressComponentTestConfiguration", + "title": "Add Cypress component testing", + "description": "Add a Cypress component testing configuration to an existing project.", + "type": "object", + "examples": [ + { + "command": "nx g @nrwl/react:cypress-component-configuration --project=my-react-project", + "description": "Add component testing to your react project" + }, + { + "command": "nx g @nrwl/react:cypress-component-configuration --project=my-react-project --generate-tests", + "description": "Add component testing to your react project and generate component tests for your existing components" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project to add cypress component testing configuration to", + "x-dropdown": "projects", + "x-prompt": "What project should we add Cypress component testing to?" + }, + "generateTests": { + "type": "boolean", + "description": "Generate default component tests for existing components in the project", + "x-prompt": "Automatically generate tests for components declared in this project?", + "default": false + }, + "buildTarget": { + "type": "string", + "description": "A build target used to configure Cypress component testing in the format of `project:target[:configuration]`. The build target should be from a React app. If not provided we will try to infer it from your projects usage.", + "pattern": "^[^:\\s]+:[^:\\s]+(:\\S+)?$" + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting files", + "default": false + }, + "bundler": { + "description": "The bundler to use for Cypress Component Testing.", + "type": "string", + "enum": ["vite", "webpack"], + "hidden": true + } + }, + "required": ["project"], + "examplesFile": "{% callout type=\"caution\" title=\"Can I use component testing?\" %}\nReact component testing with Nx requires **Cypress version 10.7.0** and up.\n\nYou can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).\n\nThis generator is for Cypress based component testing.\n\nIf you want to test components via Storybook with Cypress, then check out the [storybook-configuration generator docs](/packages/react/generators/storybook-configuration)\n{% /callout %}\n\nThis generator is designed to get your React project up and running with Cypress Component Testing.\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project\n```\n\nRunning this generator, adds the required files to the specified project with a preconfigured `cypress.config.ts` designed for Nx workspaces.\n\nThe following file will be added to projects where the Component Testing build target is using `webpack` for bundling:\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/react/plugins/component-testing';\n\nexport default defineConfig({\n component: nxComponentTestingPreset(__filename, {\n bundler: 'webpack',\n }),\n});\n```\n\nThe following file will be added to projects where the Component Testing build target is using `vite` for bundling:\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/react/plugins/component-testing';\n\nexport default defineConfig({\n component: nxComponentTestingPreset(__filename, {\n bundler: 'vite',\n }),\n});\n```\n\nHere is an example on how to add custom options to the configuration\n\n```ts {% fileName=\"cypress.config.ts\" %}\nimport { defineConfig } from 'cypress';\nimport { nxComponentTestingPreset } from '@nrwl/react/plugins/component-testing';\n\nexport default defineConfig({\n component: {\n ...nxComponentTestingPreset(__filename, {\n bundler: 'webpack',\n }),\n // extra options here\n },\n});\n```\n\n## The `bundler` option\n\nComponent testing supports two different bundlers: `webpack` and `vite`. The Nx generator will pick up the bundler used in the specified project's build target. If the build target is using `@nrwl/webpack:webpack`, then the generator will use `webpack` as the bundler. If the build target is using `@nrwl/vite:build`, then the generator will use `vite` as the bundler.\n\nYou can manually set the bundler by passing `--bundler=webpack` or `--bundler=vite` to the generator, but that is not needed since the generator will pick up the correct bundler for you. However, if you want to use a different bundler than the one that is used in the build target, then you can manually set it using that flag.\n\n## Specifying a Build Target\n\nComponent testing requires a _build target_ to correctly run the component test dev server. This option can be manually specified with `--build-target=some-react-app:build`, but Nx will infer this usage from the [project graph](/concepts/mental-model#the-project-graph) if one isn't provided.\n\nFor React projects, the build target needs to be using the `@nrwl/webpack:webpack` executor.\nThe generator will throw an error if a build target can't be found and suggest passing one in manually.\n\nLetting Nx infer the build target by default\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project\n```\n\nManually specifying the build target\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project --build-target:some-react-app:build --generate-tests\n```\n\n{% callout type=\"note\" title=\"Build Target with Configuration\" %}\nIf you're wanting to use a build target with a specific configuration. i.e. `my-app:build:production`,\nthen manually providing `--build-target=my-app:build:production` is the best way to do that.\n{% /callout %}\n\n## Auto Generating Tests\n\nYou can optionally use the `--generate-tests` flag to generate a test file for each component in your project.\n\n```shell\nnx g @nrwl/react:cypress-component-project --project=my-cool-react-project --generate-tests\n```\n\n## Running Component Tests\n\nA new `component-test` target will be added to the specified project to run your component tests.\n\n```shell\nnx g component-test my-cool-react-project\n```\n\nHere is an example of the project configuration that is generated. The `--build-target` option is added as the `devServerTarget` which can be changed as needed.\n\n```json {% fileName=\"project.json\" %}\n{\n \"targets\" {\n \"component-test\": {\n \"executor\": \"@nrwl/cypress:cypress\",\n \"options\": {\n \"cypressConfig\": \"/cypress.config.ts\",\n \"testingType\": \"component\",\n \"devServerTarget\": \"some-react-app:build\",\n \"skipServe\": true\n }\n }\n }\n}\n```\n\nNx also supports [Angular component testing](/packages/angular/generators/cypress-component-configuration).\n", + "presets": [] + }, + "description": "Setup Cypress component testing for a React project", + "hidden": false, + "implementation": "/packages/react/src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfigGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/cypress-component-configuration/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/hook.json b/docs/generated/packages/react/generators/hook.json new file mode 100644 index 0000000000000..50c234a589b9c --- /dev/null +++ b/docs/generated/packages/react/generators/hook.json @@ -0,0 +1,79 @@ +{ + "name": "hook", + "factory": "./src/generators/hook/hook#hookGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactHook", + "title": "Create a React Hook for Nx", + "description": "Create a React component using Hooks in a dedicated React project.", + "type": "object", + "examples": [ + { + "command": "nx g hook my-hook --project=mylib", + "description": "Generate a hook in the `mylib` library" + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for this hook?" + }, + "name": { + "type": "string", + "description": "The name of the hook.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the hook?" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "skipTests": { + "type": "boolean", + "description": "When true, does not create `spec.ts` test files for the new hook.", + "default": false + }, + "directory": { + "type": "string", + "description": "Create the hook under this directory (can be nested)." + }, + "flat": { + "type": "boolean", + "description": "Create hook at the source root rather than its own directory.", + "default": false + }, + "export": { + "type": "boolean", + "description": "When true, the hook is exported from the project `index.ts` (if it exists).", + "alias": "e", + "default": false, + "x-prompt": "Should this hook be exported in the project?" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case hook file name (e.g. `useHook.ts`).", + "alias": "P", + "default": false + }, + "pascalCaseDirectory": { + "type": "boolean", + "description": "Use pascal case directory name (e.g. `useHook/useHook.ts`).", + "alias": "R", + "default": false + } + }, + "required": ["name", "project"], + "presets": [] + }, + "description": "Create a hook.", + "aliases": ["c"], + "implementation": "/packages/react/src/generators/hook/hook#hookGenerator.ts", + "hidden": false, + "path": "/packages/react/src/generators/hook/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/host.json b/docs/generated/packages/react/generators/host.json new file mode 100644 index 0000000000000..690e2debfcc89 --- /dev/null +++ b/docs/generated/packages/react/generators/host.json @@ -0,0 +1,164 @@ +{ + "name": "host", + "factory": "./src/generators/host/host#hostGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorReactHost", + "cli": "nx", + "title": "Generate Module Federation Setup for React Host App", + "description": "Create Module Federation configuration files for given React Host Application.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the host application to generate the Module Federation configuration", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use as the host application?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string", + "alias": "dir" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "alias": "s", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + }, + { "value": "none", "label": "None" } + ] + } + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipWorkspaceJson": { + "description": "Skip updating workspace.json with default options based on values provided to this app (e.g. babel, style).", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["cypress", "none"], + "description": "Test runner to use for end to end (e2e) tests.", + "default": "cypress" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting).", + "alias": "t" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. App.tsx).", + "alias": "P", + "default": false + }, + "classComponent": { + "type": "boolean", + "description": "Use class components instead of functional component.", + "alias": "C", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "globalCss": { + "type": "boolean", + "description": "Default is false. When true, the component is generated with *.css/*.scss instead of *.module.css/*.module.scss", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Creates an application with strict mode and strict type checking", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into /project.json rather than including it inside workspace.json", + "type": "boolean" + }, + "compiler": { + "type": "string", + "description": "The compiler to use", + "enum": ["babel", "swc"], + "default": "babel" + }, + "remotes": { + "type": "array", + "description": "A list of remote application names that the host application should consume.", + "default": [] + }, + "devServerPort": { + "type": "number", + "description": "The port for the dev server of the remote app.", + "default": 4200 + }, + "ssr": { + "description": "Whether to configure SSR for the host application", + "type": "boolean", + "default": false + } + }, + "required": ["name"], + "additionalProperties": false, + "presets": [] + }, + "x-type": "application", + "description": "Generate a host react application", + "implementation": "/packages/react/src/generators/host/host#hostGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/react/src/generators/host/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/init.json b/docs/generated/packages/react/generators/init.json new file mode 100644 index 0000000000000..1dc4ad03259eb --- /dev/null +++ b/docs/generated/packages/react/generators/init.json @@ -0,0 +1,60 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#reactInitGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxReactNgInit", + "title": "Init React Plugin", + "description": "Initialize a React Plugin.", + "cli": "nx", + "type": "object", + "properties": { + "unitTestRunner": { + "description": "Adds the specified unit test runner.", + "type": "string", + "enum": ["jest", "none"], + "default": "jest" + }, + "e2eTestRunner": { + "description": "Adds the specified E2E test runner.", + "type": "string", + "enum": ["cypress", "none"], + "default": "cypress" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "description": "Do not add dependencies to `package.json`.", + "type": "boolean", + "default": false + }, + "skipBabelConfig": { + "description": "Do not generate a root babel.config.json (if babel is not needed).", + "type": "boolean", + "default": false + }, + "skipHelperLibs": { + "description": "Do not install helpers libs (tslib, core-js, regenerator-runtime).", + "type": "boolean", + "default": false, + "hidden": true + }, + "js": { + "type": "boolean", + "default": false, + "description": "Use JavaScript instead of TypeScript" + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/react` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/react/src/generators/init/init#reactInitGenerator.ts", + "path": "/packages/react/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/library.json b/docs/generated/packages/react/generators/library.json new file mode 100644 index 0000000000000..5f6dc39a67f32 --- /dev/null +++ b/docs/generated/packages/react/generators/library.json @@ -0,0 +1,195 @@ +{ + "name": "library", + "factory": "./src/generators/library/library#libraryGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactLibrary", + "title": "Create a React Library", + "description": "Create a React Library for an Nx workspace.", + "type": "object", + "examples": [ + { + "command": "nx g lib mylib --directory=myapp", + "description": "Generate `libs/myapp/mylib`" + }, + { + "command": "nx g lib mylib --appProject=myapp", + "description": "Generate a library with routes and add them to `myapp`" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Library name", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "type": "string", + "description": "A directory where the lib is placed.", + "alias": "dir" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "alias": "s", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + }, + { "value": "none", "label": "None" } + ] + } + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "none"], + "default": "eslint" + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "vitest", "none"], + "description": "Test runner to use for unit tests." + }, + "inSourceTests": { + "type": "boolean", + "default": false, + "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files." + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting).", + "alias": "t" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update `tsconfig.json` for development experience." + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. `App.tsx`).", + "alias": "P", + "default": false + }, + "routing": { + "type": "boolean", + "description": "Generate library with routes." + }, + "appProject": { + "type": "string", + "description": "The application project to add the library route to.", + "alias": "a" + }, + "publishable": { + "type": "boolean", + "description": "Create a publishable library." + }, + "buildable": { + "type": "boolean", + "default": false, + "description": "Generate a buildable library that uses rollup to bundle. Use 'bundler' option instead for greater control (none, vite, rollup).", + "x-deprecated": true + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like `@myorg/my-awesome-lib`." + }, + "component": { + "type": "boolean", + "description": "Generate a default component.", + "default": true + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "globalCss": { + "type": "boolean", + "description": "When `true`, the stylesheet is generated using global CSS instead of CSS modules (e.g. file is `*.css` rather than `*.module.css`).", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Whether to enable tsconfig strict mode or not.", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "bundler": { + "type": "string", + "description": "The bundler to use. Choosing 'none' means this library is not buildable.", + "enum": ["none", "vite", "rollup"], + "default": "none", + "x-prompt": "Which bundler would you like to use to build the library? Choose 'none' to skip build setup." + }, + "compiler": { + "type": "string", + "enum": ["babel", "swc"], + "default": "babel", + "description": "Which compiler to use. Only applies to `bundler: 'rollup'`." + }, + "skipPackageJson": { + "description": "Do not add dependencies to `package.json`.", + "type": "boolean", + "default": false + }, + "minimal": { + "description": "Create a React library with a minimal setup, no separate test files.", + "type": "boolean", + "default": false + } + }, + "required": ["name"], + "presets": [] + }, + "aliases": ["lib"], + "x-type": "library", + "description": "Create a React library.", + "implementation": "/packages/react/src/generators/library/library#libraryGenerator.ts", + "hidden": false, + "path": "/packages/react/src/generators/library/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/redux.json b/docs/generated/packages/react/generators/redux.json new file mode 100644 index 0000000000000..54fbeff480a4b --- /dev/null +++ b/docs/generated/packages/react/generators/redux.json @@ -0,0 +1,50 @@ +{ + "name": "redux", + "factory": "./src/generators/redux/redux#reduxGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "redux", + "title": "Create Redux state", + "description": "Create a Redux state slice for a React project.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Redux slice name.", + "$default": { "$source": "argv", "index": 0 } + }, + "project": { + "type": "string", + "description": "The name of the project to add the slice to. If it is an application, then the store configuration will be updated too.", + "alias": "p", + "$default": { "$source": "projectName" }, + "x-prompt": "What is the name of the project for this slice?" + }, + "directory": { + "type": "string", + "alias": "dir", + "default": "", + "description": "The name of the folder used to contain/group the generated Redux files." + }, + "appProject": { + "type": "string", + "description": "The application project to add the slice to.", + "alias": "a" + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + } + }, + "required": ["name"], + "presets": [] + }, + "description": "Create a Redux slice for a project.", + "aliases": ["slice"], + "implementation": "/packages/react/src/generators/redux/redux#reduxGenerator.ts", + "hidden": false, + "path": "/packages/react/src/generators/redux/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/remote.json b/docs/generated/packages/react/generators/remote.json new file mode 100644 index 0000000000000..dc71b83cb3120 --- /dev/null +++ b/docs/generated/packages/react/generators/remote.json @@ -0,0 +1,168 @@ +{ + "name": "remote", + "factory": "./src/generators/remote/remote#remoteGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorReactRemote", + "cli": "nx", + "title": "Generate Module Federation Setup for React Remote App", + "description": "Create Module Federation configuration files for given React Remote Application.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the remote application to generate the Module Federation configuration", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What name would you like to use as the remote application?", + "pattern": "^[a-zA-Z].*$" + }, + "directory": { + "description": "The directory of the new application.", + "type": "string", + "alias": "dir" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css", + "alias": "s", + "x-prompt": { + "message": "Which stylesheet format would you like to use?", + "type": "list", + "items": [ + { "value": "css", "label": "CSS" }, + { + "value": "scss", + "label": "SASS(.scss) [ http://sass-lang.com ]" + }, + { + "value": "styl", + "label": "Stylus(.styl) [ http://stylus-lang.com ]" + }, + { + "value": "less", + "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" + }, + { + "value": "styled-jsx", + "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" + }, + { "value": "none", "label": "None" } + ] + } + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "routing": { + "type": "boolean", + "description": "Generate application with routes.", + "default": false + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipWorkspaceJson": { + "description": "Skip updating workspace.json with default options based on values provided to this app (e.g. babel, style).", + "type": "boolean", + "default": false + }, + "unitTestRunner": { + "type": "string", + "enum": ["jest", "none"], + "description": "Test runner to use for unit tests.", + "default": "jest" + }, + "e2eTestRunner": { + "type": "string", + "enum": ["cypress", "none"], + "description": "Test runner to use for end to end (e2e) tests.", + "default": "cypress" + }, + "tags": { + "type": "string", + "description": "Add tags to the application (used for linting).", + "alias": "t" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case component file name (e.g. App.tsx).", + "alias": "P", + "default": false + }, + "classComponent": { + "type": "boolean", + "description": "Use class components instead of functional component.", + "alias": "C", + "default": false + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "globalCss": { + "type": "boolean", + "description": "Default is false. When true, the component is generated with *.css/*.scss instead of *.module.css/*.module.scss.", + "default": false + }, + "strict": { + "type": "boolean", + "description": "Creates an application with strict mode and strict type checking.", + "default": true + }, + "setParserOptionsProject": { + "type": "boolean", + "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", + "default": false + }, + "standaloneConfig": { + "description": "Split the project configuration into /project.json rather than including it inside workspace.json", + "type": "boolean" + }, + "compiler": { + "type": "string", + "description": "The compiler to use.", + "enum": ["babel", "swc"], + "default": "babel" + }, + "host": { + "type": "string", + "description": "The host / shell application for this remote." + }, + "devServerPort": { + "type": "number", + "description": "The port for the dev server of the remote app.", + "default": 4200 + }, + "ssr": { + "description": "Whether to configure SSR for the host application", + "type": "boolean", + "default": false + } + }, + "required": ["name"], + "additionalProperties": false, + "presets": [] + }, + "x-type": "application", + "description": "Generate a remote react application", + "implementation": "/packages/react/src/generators/remote/remote#remoteGenerator.ts", + "aliases": [], + "hidden": false, + "path": "/packages/react/src/generators/remote/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/setup-ssr.json b/docs/generated/packages/react/generators/setup-ssr.json new file mode 100644 index 0000000000000..cc415cb04a407 --- /dev/null +++ b/docs/generated/packages/react/generators/setup-ssr.json @@ -0,0 +1,51 @@ +{ + "name": "setup-ssr", + "factory": "./src/generators/setup-ssr/setup-ssr#setupSsrGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "GeneratorReactSSRSetup", + "cli": "nx", + "title": "Generate SSR setup for a React app", + "description": "Create the additional configuration required to enable SSR via Express for a React application.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the application to add SSR support to.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "What app would you like to add SSR support to?", + "x-dropdown": "projects" + }, + "appComponentImportPath": { + "type": "string", + "description": "The import path of the component, relative to project sourceRoot.", + "default": "app/app" + }, + "serverPort": { + "type": "number", + "default": 4200, + "description": "The port for the Express server." + }, + "skipFormat": { + "type": "boolean", + "description": "Skip formatting the workspace after the generator completes." + }, + "extraInclude": { + "type": "array", + "items": { "type": "string" }, + "hidden": true, + "description": "Extra include entries in tsconfig.", + "default": [] + } + }, + "required": ["project"], + "additionalProperties": false, + "presets": [] + }, + "description": "Set up SSR configuration for a project.", + "hidden": false, + "implementation": "/packages/react/src/generators/setup-ssr/setup-ssr#setupSsrGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/setup-ssr/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/setup-tailwind.json b/docs/generated/packages/react/generators/setup-tailwind.json new file mode 100644 index 0000000000000..8d1b102e81b9a --- /dev/null +++ b/docs/generated/packages/react/generators/setup-tailwind.json @@ -0,0 +1,51 @@ +{ + "name": "setup-tailwind", + "factory": "./src/generators/setup-tailwind/setup-tailwind#setupTailwindGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactTailwindSetupGenerator", + "title": "Configures Tailwind CSS for an application or a buildable/publishable library.", + "description": "Adds the Tailwind CSS configuration files for a given React project and installs, if needed, the packages required for Tailwind CSS to work.", + "type": "object", + "examples": [ + { + "command": "nx g setup-tailwind --project=my-app", + "description": "Initialize Tailwind configuration for the `my-app` project." + } + ], + "properties": { + "project": { + "type": "string", + "description": "The name of the project to add the Tailwind CSS setup for.", + "alias": "p", + "$default": { "$source": "argv", "index": 0 }, + "x-dropdown": "projects", + "x-prompt": "What project would you like to add the Tailwind CSS setup?" + }, + "buildTarget": { + "type": "string", + "description": "The name of the target used to build the project. This option is not needed in most cases.", + "default": "build" + }, + "skipFormat": { + "type": "boolean", + "description": "Skips formatting the workspace after the generator completes." + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + } + }, + "additionalProperties": false, + "required": ["project"], + "presets": [] + }, + "description": "Set up Tailwind configuration for a project.", + "hidden": false, + "implementation": "/packages/react/src/generators/setup-tailwind/setup-tailwind#setupTailwindGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/setup-tailwind/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/stories.json b/docs/generated/packages/react/generators/stories.json new file mode 100644 index 0000000000000..6a81a0becf878 --- /dev/null +++ b/docs/generated/packages/react/generators/stories.json @@ -0,0 +1,56 @@ +{ + "name": "stories", + "factory": "./src/generators/stories/stories#storiesGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactStorybookStories", + "title": "Generate React Storybook stories", + "description": "Generate stories/specs for all components declared in a project.", + "type": "object", + "properties": { + "project": { + "type": "string", + "aliases": ["name", "projectName"], + "description": "Project for which to generate stories.", + "$default": { "$source": "projectName", "index": 0 }, + "x-prompt": "For which project do you want to generate stories?" + }, + "generateCypressSpecs": { + "type": "boolean", + "description": "Automatically generate `*.spec.ts` files in the cypress e2e app generated by the cypress-configure generator.", + "x-prompt": "Do you want to generate Cypress specs as well?" + }, + "cypressProject": { + "type": "string", + "description": "The Cypress project to generate the stories under. This is inferred from `project` by default." + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript files rather than TypeScript files.", + "default": false + }, + "ignorePaths": { + "type": "array", + "description": "Paths to ignore when looking for components.", + "items": { "type": "string", "description": "Path to ignore." }, + "examples": [ + "apps/my-app/src/not-stories/**", + "**/**/src/**/not-stories/**", + "libs/my-lib/**/*.something.ts", + "**/**/src/**/*.other.*", + "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" + ] + } + }, + "required": ["project"], + "examplesFile": "This generator will generate stories for all your components in your project.\n\n```bash\nnx g @nrwl/react:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/packages/storybook/documents/overview-react#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/react:stories --name=ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nrwl/react:stories --name=ui --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n", + "presets": [] + }, + "description": "Create stories/specs for all components declared in an app or library.", + "hidden": false, + "implementation": "/packages/react/src/generators/stories/stories#storiesGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/stories/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/react/generators/storybook-configuration.json b/docs/generated/packages/react/generators/storybook-configuration.json new file mode 100644 index 0000000000000..7f2c45a67b03b --- /dev/null +++ b/docs/generated/packages/react/generators/storybook-configuration.json @@ -0,0 +1,93 @@ +{ + "name": "storybook-configuration", + "factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "cli": "nx", + "$id": "NxReactStorybookConfigure", + "title": "React Storybook Configure", + "description": "Set up Storybook for a React app or library.", + "type": "object", + "properties": { + "name": { + "type": "string", + "aliases": ["project", "projectName"], + "description": "Project for which to generate Storybook configuration.", + "$default": { "$source": "argv", "index": 0 }, + "x-prompt": "For which project do you want to generate Storybook configuration?", + "x-dropdown": "projects" + }, + "configureCypress": { + "type": "boolean", + "description": "Run the cypress-configure generator.", + "x-prompt": "Configure a cypress e2e app to run against the storybook instance?", + "default": true + }, + "generateStories": { + "type": "boolean", + "description": "Automatically generate `*.stories.ts` files for components declared in this project?", + "x-prompt": "Automatically generate *.stories.ts files for components declared in this project?", + "default": true + }, + "generateCypressSpecs": { + "type": "boolean", + "description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.", + "x-prompt": "Automatically generate test files in the Cypress E2E app generated by the cypress-configure generator?", + "default": true + }, + "cypressDirectory": { + "type": "string", + "description": "A directory where the Cypress project will be placed. Placed at the root by default." + }, + "js": { + "type": "boolean", + "description": "Generate JavaScript story files rather than TypeScript story files.", + "default": false + }, + "tsConfiguration": { + "type": "boolean", + "description": "Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.", + "default": false + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint"], + "default": "eslint" + }, + "standaloneConfig": { + "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", + "type": "boolean" + }, + "ignorePaths": { + "type": "array", + "description": "Paths to ignore when looking for components.", + "items": { "type": "string", "description": "Path to ignore." }, + "examples": [ + "apps/my-app/src/not-stories/**", + "**/**/src/**/not-stories/**", + "libs/my-lib/**/*.something.ts", + "**/**/src/**/*.other.*", + "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" + ] + }, + "configureTestRunner": { + "type": "boolean", + "description": "Add a Storybook Test-Runner target." + }, + "bundler": { + "description": "The Storybook builder to use.", + "enum": ["vite", "webpack"] + } + }, + "required": ["name"], + "examplesFile": "This generator will set up Storybook for your React project.\n\n```bash\nnx g @nrwl/react:storybook-configuration project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for React overview page](/packages/storybook/documents/overview-react#generate-storybook-configuration-for-an-react-project).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to `configureCypress`. If you choose `yes`, a Cypress e2e app will be created (or configured) to run against the project's Storybook instance. You can read more about this in the [Storybook for React - Cypress section](/packages/storybook/documents/overview-react#cypress-tests-for-stories).\n- Whether you want to `generateStories` for the components in your project. If you choose `yes`, a `.stories.ts` file will be generated next to each of your components in your project.\n- Whether you want to `generateCypressSpecs`. If you choose `yes`, a test file is going to be generated in the project's Cypress e2e app for each of your components.\n- Whether you want to `configureTestRunner`. If you choose `yes`, a `test-storybook` target will be generated in your project's `project.json`, with a command to invoke the [Storybook `test-runner`](https://storybook.js.org/docs/react/writing-tests/test-runner).\n\nYou must provide a `name` for the generator to work.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Generate Storybook configuration using TypeScript\n\n```bash\nnx g @nrwl/react:storybook-configuration ui --tsConfiguration=true\n```\n\nThis will generate a Storybook configuration for the `ui` project using TypeScript for the Storybook configuration files (the files inside the `.storybook` directory).\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nrwl/react:storybook-configuration ui --generateStories=true --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts\n```\n\nThis will generate a Storybook configuration for the `ui` project and generate stories for all components in the `libs/ui/src/lib` directory, except for the ones in the `libs/ui/src/not-stories` directory, and the ones in the `apps/my-app` directory that end with `.something.ts`, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n\n### Generate stories using JavaScript instead of TypeScript\n\n```bash\nnx g @nrwl/react:storybook-configuration ui --generateStories=true --js=true\n```\n\nThis will generate stories for all the components in the `ui` project using JavaScript instead of TypeScript. So, you will have `.stories.js` files next to your components.\n", + "presets": [] + }, + "description": "Set up storybook for a React app or library.", + "hidden": false, + "implementation": "/packages/react/src/generators/storybook-configuration/configuration#storybookConfigurationGenerator.ts", + "aliases": [], + "path": "/packages/react/src/generators/storybook-configuration/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/rollup.json b/docs/generated/packages/rollup.json deleted file mode 100644 index 3f402d657530a..0000000000000 --- a/docs/generated/packages/rollup.json +++ /dev/null @@ -1,293 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "rollup", - "packageName": "@nrwl/rollup", - "description": "The Nx Plugin for Rollup contains executors and generators that support building applications using Rollup.", - "root": "/packages/rollup", - "source": "/packages/rollup/src", - "documentation": [], - "generators": [ - { - "name": "init", - "factory": "./src/generators/init/init#rollupInitGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxWebpackInit", - "cli": "nx", - "title": "Init Webpack Plugin", - "description": "Init Webpack Plugin.", - "type": "object", - "properties": { - "compiler": { - "type": "string", - "enum": ["babel", "swc", "tsc"], - "description": "The compiler to initialize for.", - "default": "babel" - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - } - }, - "required": [], - "presets": [] - }, - "description": "Initialize the `@nrwl/rollup` plugin.", - "aliases": ["ng-add"], - "hidden": true, - "implementation": "/packages/rollup/src/generators/init/init#rollupInitGenerator.ts", - "path": "/packages/rollup/src/generators/init/schema.json" - }, - { - "name": "rollup-project", - "factory": "./src/generators/rollup-project/rollup-project#rollupProjectGenerator", - "schema": { - "$schema": "http://json-schema.org/schema", - "$id": "NxRollupProject", - "cli": "nx", - "title": "Add Rollup Configuration to a project", - "description": "Add Rollup Configuration to a project.", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The name of the project.", - "$default": { "$source": "argv", "index": 0 }, - "x-dropdown": "project", - "x-prompt": "What is the name of the project to set up a rollup for?" - }, - "compiler": { - "type": "string", - "enum": ["babel", "swc", "tsc"], - "description": "The compiler to use to build source.", - "default": "babel" - }, - "main": { - "type": "string", - "description": "Path relative to the workspace root for the main entry file. Defaults to '/src/main.ts'.", - "alias": "entryFile" - }, - "tsConfig": { - "type": "string", - "description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to '/tsconfig.app.json'." - }, - "skipFormat": { - "description": "Skip formatting files.", - "type": "boolean", - "default": false - }, - "skipPackageJson": { - "type": "boolean", - "default": false, - "description": "Do not add dependencies to `package.json`." - }, - "skipValidation": { - "type": "boolean", - "default": false, - "description": "Do not perform any validation on existing project." - }, - "importPath": { - "type": "string", - "description": "The library name used to import it, like `@myorg/my-awesome-lib`." - }, - "external": { - "type": "array", - "description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).", - "items": { "type": "string" } - }, - "rollupConfig": { - "type": "string", - "description": "Path relative to workspace root to a custom rollup file that takes a config object and returns an updated config." - } - }, - "required": [], - "presets": [] - }, - "description": "Add rollup configuration to a project.", - "hidden": true, - "implementation": "/packages/rollup/src/generators/rollup-project/rollup-project#rollupProjectGenerator.ts", - "aliases": [], - "path": "/packages/rollup/src/generators/rollup-project/schema.json" - } - ], - "executors": [ - { - "name": "rollup", - "implementation": "/packages/rollup/src/executors/rollup/rollup.impl.ts", - "schema": { - "version": 2, - "outputCapture": "direct-nodejs", - "title": "Web Library Rollup Target (Experimental)", - "description": "Packages a library for different web usages (ESM, CommonJS).", - "cli": "nx", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "The path to package.json file." - }, - "main": { - "type": "string", - "description": "The path to the entry file, relative to project.", - "alias": "entryFile", - "x-completion-type": "file", - "x-completion-glob": "**/*@(.js|.ts)" - }, - "outputPath": { - "type": "string", - "description": "The output path of the generated files.", - "x-completion-type": "directory" - }, - "outputFileName": { - "type": "string", - "description": "Name of the main output file. Defaults same basename as 'main' file." - }, - "deleteOutputPath": { - "type": "boolean", - "description": "Delete the output path before building.", - "default": true - }, - "tsConfig": { - "type": "string", - "description": "The path to tsconfig file.", - "x-completion-type": "file", - "x-completion-glob": "tsconfig.*.json" - }, - "format": { - "type": "array", - "description": "List of module formats to output. Defaults to matching format from tsconfig (e.g. CJS for CommonJS, and ESM otherwise).", - "alias": "f", - "items": { "type": "string", "enum": ["esm", "cjs"] } - }, - "external": { - "type": "array", - "description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).", - "items": { "type": "string" } - }, - "watch": { - "type": "boolean", - "description": "Enable re-building when files change.", - "default": false - }, - "updateBuildableProjectDepsInPackageJson": { - "type": "boolean", - "description": "Update buildable project dependencies in `package.json`.", - "default": true - }, - "buildableProjectDepsInPackageJsonType": { - "type": "string", - "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", - "enum": ["dependencies", "peerDependencies"], - "default": "peerDependencies" - }, - "rollupConfig": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string", - "x-completion-type": "file", - "x-completion-glob": "rollup?(*)@(.js|.ts)" - } - }, - { - "type": "string", - "x-completion-type": "file", - "x-completion-glob": "rollup?(*)@(.js|.ts)" - } - ], - "description": "Path to a function which takes a rollup config and returns an updated rollup config." - }, - "extractCss": { - "type": ["boolean", "string"], - "description": "CSS files will be extracted to the output folder. Alternatively custom filename can be provided (e.g. styles.css)", - "default": true - }, - "assets": { - "type": "array", - "description": "List of static assets.", - "default": [], - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply `glob`. Defaults to the project root." - }, - "output": { - "type": "string", - "description": "Relative path within the output folder." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "compiler": { - "type": "string", - "enum": ["babel", "swc", "tsc"], - "default": "babel", - "description": "Which compiler to use." - }, - "javascriptEnabled": { - "type": "boolean", - "description": "Sets `javascriptEnabled` option for less loader", - "default": false - }, - "generateExportsField": { - "type": "boolean", - "description": "Generate package.json with 'exports' field. This field defines entry points in the package and is used by Node and the TypeScript compiler.", - "default": false - }, - "skipTypeField": { - "type": "boolean", - "description": "Prevents 'type' field from being added to compiled package.json file. Only use this if you are having an issue with this field.", - "default": false - } - }, - "required": ["tsConfig", "project", "main", "outputPath"], - "definitions": { - "assetPattern": { - "oneOf": [ - { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input directory path in which to apply `glob`. Defaults to the project root." - }, - "output": { - "type": "string", - "description": "Relative path within the output folder." - } - }, - "additionalProperties": false, - "required": ["glob", "input", "output"] - }, - { "type": "string" } - ] - } - }, - "presets": [] - }, - "description": "Bundle a package using Rollup.", - "aliases": [], - "hidden": false, - "path": "/packages/rollup/src/executors/rollup/schema.json" - } - ] -} diff --git a/docs/generated/packages/rollup/executors/rollup.json b/docs/generated/packages/rollup/executors/rollup.json new file mode 100644 index 0000000000000..6076a9718338c --- /dev/null +++ b/docs/generated/packages/rollup/executors/rollup.json @@ -0,0 +1,178 @@ +{ + "name": "rollup", + "implementation": "/packages/rollup/src/executors/rollup/rollup.impl.ts", + "schema": { + "version": 2, + "outputCapture": "direct-nodejs", + "title": "Web Library Rollup Target (Experimental)", + "description": "Packages a library for different web usages (ESM, CommonJS).", + "cli": "nx", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The path to package.json file." + }, + "main": { + "type": "string", + "description": "The path to the entry file, relative to project.", + "alias": "entryFile", + "x-completion-type": "file", + "x-completion-glob": "**/*@(.js|.ts)" + }, + "outputPath": { + "type": "string", + "description": "The output path of the generated files.", + "x-completion-type": "directory" + }, + "outputFileName": { + "type": "string", + "description": "Name of the main output file. Defaults same basename as 'main' file." + }, + "deleteOutputPath": { + "type": "boolean", + "description": "Delete the output path before building.", + "default": true + }, + "tsConfig": { + "type": "string", + "description": "The path to tsconfig file.", + "x-completion-type": "file", + "x-completion-glob": "tsconfig.*.json" + }, + "format": { + "type": "array", + "description": "List of module formats to output. Defaults to matching format from tsconfig (e.g. CJS for CommonJS, and ESM otherwise).", + "alias": "f", + "items": { "type": "string", "enum": ["esm", "cjs"] } + }, + "external": { + "type": "array", + "description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).", + "items": { "type": "string" } + }, + "watch": { + "type": "boolean", + "description": "Enable re-building when files change.", + "default": false + }, + "updateBuildableProjectDepsInPackageJson": { + "type": "boolean", + "description": "Update buildable project dependencies in `package.json`.", + "default": true + }, + "buildableProjectDepsInPackageJsonType": { + "type": "string", + "description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.", + "enum": ["dependencies", "peerDependencies"], + "default": "peerDependencies" + }, + "rollupConfig": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "x-completion-type": "file", + "x-completion-glob": "rollup?(*)@(.js|.ts)" + } + }, + { + "type": "string", + "x-completion-type": "file", + "x-completion-glob": "rollup?(*)@(.js|.ts)" + } + ], + "description": "Path to a function which takes a rollup config and returns an updated rollup config." + }, + "extractCss": { + "type": ["boolean", "string"], + "description": "CSS files will be extracted to the output folder. Alternatively custom filename can be provided (e.g. styles.css)", + "default": true + }, + "assets": { + "type": "array", + "description": "List of static assets.", + "default": [], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply `glob`. Defaults to the project root." + }, + "output": { + "type": "string", + "description": "Relative path within the output folder." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "compiler": { + "type": "string", + "enum": ["babel", "swc", "tsc"], + "default": "babel", + "description": "Which compiler to use." + }, + "javascriptEnabled": { + "type": "boolean", + "description": "Sets `javascriptEnabled` option for less loader", + "default": false + }, + "generateExportsField": { + "type": "boolean", + "description": "Generate package.json with 'exports' field. This field defines entry points in the package and is used by Node and the TypeScript compiler.", + "default": false + }, + "skipTypeField": { + "type": "boolean", + "description": "Prevents 'type' field from being added to compiled package.json file. Only use this if you are having an issue with this field.", + "default": false + } + }, + "required": ["tsConfig", "project", "main", "outputPath"], + "definitions": { + "assetPattern": { + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input directory path in which to apply `glob`. Defaults to the project root." + }, + "output": { + "type": "string", + "description": "Relative path within the output folder." + } + }, + "additionalProperties": false, + "required": ["glob", "input", "output"] + }, + { "type": "string" } + ] + } + }, + "presets": [] + }, + "description": "Bundle a package using Rollup.", + "aliases": [], + "hidden": false, + "path": "/packages/rollup/src/executors/rollup/schema.json", + "type": "executor" +} diff --git a/docs/generated/packages/rollup/generators/init.json b/docs/generated/packages/rollup/generators/init.json new file mode 100644 index 0000000000000..fe1bf88d726b7 --- /dev/null +++ b/docs/generated/packages/rollup/generators/init.json @@ -0,0 +1,33 @@ +{ + "name": "init", + "factory": "./src/generators/init/init#rollupInitGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxWebpackInit", + "cli": "nx", + "title": "Init Webpack Plugin", + "description": "Init Webpack Plugin.", + "type": "object", + "properties": { + "compiler": { + "type": "string", + "enum": ["babel", "swc", "tsc"], + "description": "The compiler to initialize for.", + "default": "babel" + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + } + }, + "required": [], + "presets": [] + }, + "description": "Initialize the `@nrwl/rollup` plugin.", + "aliases": ["ng-add"], + "hidden": true, + "implementation": "/packages/rollup/src/generators/init/init#rollupInitGenerator.ts", + "path": "/packages/rollup/src/generators/init/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/rollup/generators/rollup-project.json b/docs/generated/packages/rollup/generators/rollup-project.json new file mode 100644 index 0000000000000..33273670f4d0c --- /dev/null +++ b/docs/generated/packages/rollup/generators/rollup-project.json @@ -0,0 +1,72 @@ +{ + "name": "rollup-project", + "factory": "./src/generators/rollup-project/rollup-project#rollupProjectGenerator", + "schema": { + "$schema": "http://json-schema.org/schema", + "$id": "NxRollupProject", + "cli": "nx", + "title": "Add Rollup Configuration to a project", + "description": "Add Rollup Configuration to a project.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project.", + "$default": { "$source": "argv", "index": 0 }, + "x-dropdown": "project", + "x-prompt": "What is the name of the project to set up a rollup for?" + }, + "compiler": { + "type": "string", + "enum": ["babel", "swc", "tsc"], + "description": "The compiler to use to build source.", + "default": "babel" + }, + "main": { + "type": "string", + "description": "Path relative to the workspace root for the main entry file. Defaults to '/src/main.ts'.", + "alias": "entryFile" + }, + "tsConfig": { + "type": "string", + "description": "Path relative to the workspace root for the tsconfig file to build with. Defaults to '/tsconfig.app.json'." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to `package.json`." + }, + "skipValidation": { + "type": "boolean", + "default": false, + "description": "Do not perform any validation on existing project." + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like `@myorg/my-awesome-lib`." + }, + "external": { + "type": "array", + "description": "A list of external modules that will not be bundled (`react`, `react-dom`, etc.).", + "items": { "type": "string" } + }, + "rollupConfig": { + "type": "string", + "description": "Path relative to workspace root to a custom rollup file that takes a config object and returns an updated config." + } + }, + "required": [], + "presets": [] + }, + "description": "Add rollup configuration to a project.", + "hidden": true, + "implementation": "/packages/rollup/src/generators/rollup-project/rollup-project#rollupProjectGenerator.ts", + "aliases": [], + "path": "/packages/rollup/src/generators/rollup-project/schema.json", + "type": "generator" +} diff --git a/docs/generated/packages/storybook.json b/docs/generated/packages/storybook.json deleted file mode 100644 index 9e02b2c1b9e0e..0000000000000 --- a/docs/generated/packages/storybook.json +++ /dev/null @@ -1,547 +0,0 @@ -{ - "githubRoot": "https://github.com/nrwl/nx/blob/master", - "name": "storybook", - "packageName": "@nrwl/storybook", - "description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.", - "root": "/packages/storybook", - "source": "/packages/storybook/src", - "documentation": [ - { - "id": "overview", - "name": "Overview Generic", - "path": "/packages/storybook", - "file": "shared/guides/storybook/plugin-overview", - "content": "[Storybook](https://storybook.js.org) is a development environment for UI components. It allows you to browse a component library, view the different states of each component, and interactively develop and test components.\n\nThis guide will briefly walk you through using Storybook within an Nx workspace.\n\n## Setting Up Storybook\n\n### Add the Storybook plugin\n\n```shell\nyarn add --dev @nrwl/storybook\n```\n\n## Using Storybook\n\n### Generating Storybook Configuration\n\nYou can generate Storybook configuration for an individual project with this command:\n\n```shell\nnx g @nrwl/storybook:configuration project-name\n```\n\nYou can choose to use Storybook for one of the supported frameworks:\n\n- `@storybook/angular`\n- `@storybook/react`\n- `@storybook/react-native`\n- `@storybook/html`\n- `@storybook/web-components`\n- `@storybook/vue`\n- `@storybook/vue3`\n- `@storybook/svelte`\n\nChoosing one of these frameworks will have the following effects on your workspace:\n\n1. Nx will install all the required Storybook packages that go with it.\n\n2. Nx will generate a root `.storybook` folder and a project-level `.storybook` folder (located under `libs/your-project/.storybook` or `apps/your-project/.storybook`) containing the essential configuration files for Storybook.\n\n3. If you are working on an Angular, a React or a React Native project (and you choose `@storybook/angular`, `@storybook/react` or `@storybook/react-native`) the Nx generator will also generate stories for all the components in your project.\n\n4. Nx will create new `targets` in your project's `project.json`, called `storybook` and `build-storybook`, containing all the necessary configuration to serve and build Storybook.\n\n5. Nx will generate a new Cypress e2e app for your project (if there isn't one already) to run against the Storybook instance.\n\n### Configure your project using TypeScript\n\nYou can choose to configure your project using TypeScript instead of JavaScript. To do that, just add the `--tsConfiguration=true` flag to the above command, like this:\n\n```shell\nnx g @nrwl/storybook:configuration project-name --tsConfiguration=true\n```\n\n[Here is the Storybook documentation](https://storybook.js.org/docs/react/configure/overview#configure-your-project-with-typescript) if you want to learn more.\n\n### Running Storybook\n\nServe Storybook using this command:\n\n```shell\nnx run project-name:storybook\n```\n\nor\n\n```shell\nnx storybook project-name\n```\n\n### Building Storybook\n\nBuild Storybook using this command:\n\n```shell\nnx run project-name:build-storybook\n```\n\nor\n\n```shell\nnx build-storybook project-name\n```\n\n### Anatomy of the Storybook setup\n\nWhen running the Nx Storybook generator, it'll configure the Nx workspace to be able to run Storybook seamlessly. It'll create\n\n- a global Storybook configuration\n- a project specific Storybook configuration\n\nThe **global** Storybook configuration allows to set addon-ons or custom webpack configuration at a global level that applies to all Storybook's within the Nx workspace. You can find that folder at `.storybook/` at the root of the workspace.\n\n```text\n/\n├── .storybook/\n│ ├── main.js\n│ ├── tsconfig.json\n├── apps/\n├── libs/\n├── nx.json\n├── package.json\n├── README.md\n└── etc...\n```\n\nThe project-specific Storybook configuration is pretty much similar what you would have for a non-Nx setup of Storybook. There's a `.storybook` folder within the project root folder.\n\n```text\n/\n├── .storybook/\n│ ├── main.js\n│ ├── preview.js\n│ ├── tsconfig.json\n├── src/\n├── README.md\n├── tsconfig.json\n└── etc...\n```\n\n### Using Addons\n\nTo register a [Storybook addon](https://storybook.js.org/addons/) for all storybook instances in your workspace:\n\n1. In `/.storybook/main.js`, in the `addons` array of the `module.exports` object, add the new addon:\n ```typescript {% fileName=\"/.storybook/main.js\" %}\n module.exports = {\n stories: [...],\n ...,\n addons: [..., '@storybook/addon-essentials'],\n };\n ```\n2. If a decorator is required, in each project's `/.storybook/preview.js`, you can export an array called `decorators`.\n\n ```typescript {% fileName=\"/.storybook/preview.js\" %}\n import someDecorator from 'some-storybook-addon';\n export const decorators = [someDecorator];\n ```\n\n**-- OR --**\n\nTo register an [addon](https://storybook.js.org/addons/) for a single storybook instance, go to that project's `.storybook` folder:\n\n1. In `main.js`, in the `addons` array of the `module.exports` object, add the new addon:\n ```typescript\n module.exports = {\n stories: [...],\n ...,\n addons: [..., '@storybook/addon-essentials'],\n };\n ```\n2. If a decorator is required, in `preview.js` you can export an array called `decorators`.\n\n ```typescript\n import someDecorator from 'some-storybook-addon';\n export const decorators = [someDecorator];\n ```\n\n## More Documentation\n\nYou can find dedicated information for React and Angular:\n\n- [Set up Storybook for Angular Projects](/storybook/overview-angular)\n- [Set up Storybook for React Projects](/storybook/overview-react)\n\nYou can find all Storybook-related Nx documentation [here](/packages#storybook).\n\nFor more on using Storybook, see the [official Storybook documentation](https://storybook.js.org/docs/basics/introduction/).\n\n### Migration Scenarios\n\nHere's more information on common migration scenarios for Storybook with Nx. For Storybook specific migrations that are not automatically handled by Nx please refer to the [official Storybook page](https://storybook.js.org/)\n\n- [Upgrading to Storybook 6](/storybook/upgrade-storybook-v6-react)\n- [Migrate to the Nrwl React Storybook Preset](/storybook/migrate-webpack-final-react)\n" - }, - { - "id": "overview-react", - "name": "Set up Storybook for React Projects", - "file": "shared/guides/storybook/plugin-react", - "content": "# Set up Storybook for React Projects\n\nThis guide will walk you through setting up [Storybook](https://storybook.js.org) for React projects in your Nx workspace.\n\n{% callout type=\"warning\" title=\"Set up Storybook in your workspace\" %}\nYou first need to set up Storybook for your Nx workspace, if you haven't already. You can read the [Storybook plugin overview guide](/packages/storybook) to get started.\n{% /callout %}\n\n## Generate Storybook Configuration for a React project\n\nYou can generate Storybook configuration for an individual React project with this command:\n\n```shell\nnx g @nrwl/react:storybook-configuration project-name\n```\n\n## Nx React Storybook Preset\n\n`@nrwl/react` ships with a Storybook preset to make sure it uses the very same configuration as your Nx React application. When you generate a Storybook configuration for a project, it'll automatically add the preset to your configuration.\n\n```typescript\nconst rootMain = require('../../../.storybook/main');\n\nmodule.exports = {\n ...rootMain,\n addons: [...rootMain.addons, '@nrwl/react/plugins/storybook'],\n ...\n};\n```\n\n## Auto-generate Stories\n\nThe `@nrwl/react:storybook-configuration` generator has the option to automatically generate `*.stories.ts` files for each component declared in the library.\n\n```text\n/\n├── my.component.ts\n└── my.component.stories.ts\n```\n\nYou can re-run it at a later point using the following command:\n\n```shell\nnx g @nrwl/react:stories --project=\n```\n\n{% callout type=\"note\" title=\"Example\" %}\n\nLet's take for a example a library in your workspace, under `libs/feature/ui`, called `feature-ui`. This library contains a component, called `my-button`.\n\nThe command to generate stories for that library would be:\n\n```shell\nnx g @nrwl/react:stories --project=feature-ui\n```\n\nand the result would be the following:\n\n```text\n/\n├── .storybook/\n├── apps/\n├── libs/\n│ ├── feature/\n│ │ ├── ui/\n| | | ├── .storybook/\n| | | ├── src/\n| | | | ├──lib\n| | | | | ├──my-button\n| | | | | | ├── my-button.component.ts\n| | | | | | ├── my-button.component.stories.ts\n| | | | | | └── etc...\n| | | | | └── etc...\n| | | ├── README.md\n| | | ├── tsconfig.json\n| | | └── etc...\n| | └── etc...\n| └── etc...\n├── nx.json\n├── package.json\n├── README.md\n└── etc...\n```\n\n{% /callout %}\n\n## Cypress tests for Stories\n\nThe `storybook-configuration` generator gives the option to set up an e2e Cypress app that is configured to run against the project's Storybook instance.\n\nTo launch Storybook and run the Cypress tests against the iframe inside of Storybook:\n\n```shell\nnx run project-name-e2e:e2e\n```\n\nThe url that Cypress points to should look like this:\n\n`'/iframe.html?id=buttoncomponent--primary&args=text:Click+me!;padding;style:default'`\n\n- `buttoncomponent` is a lowercase version of the `Title` in the `*.stories.ts` file.\n- `primary` is the name of an individual story.\n- `style=default` sets the `style` arg to a value of `default`.\n\nChanging args in the url query parameters allows your Cypress tests to test different configurations of your component. You can [read the documentation](https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url) for more information.\n\n## Example Files\n\n**\\*.stories.tsx file**\n\n```typescript\nimport { Story, Meta } from '@storybook/react';\nimport { Button, ButtonProps } from './button';\n\nexport default {\n component: Button,\n title: 'Button',\n} as Meta;\n\nconst Template: Story = (args) =>