diff --git a/astro-docs/src/content/docs/concepts/Decisions/folder-structure.mdoc b/astro-docs/src/content/docs/concepts/Decisions/folder-structure.mdoc index 219163bd3fda2..9cc0e9c9ea61c 100644 --- a/astro-docs/src/content/docs/concepts/Decisions/folder-structure.mdoc +++ b/astro-docs/src/content/docs/concepts/Decisions/folder-structure.mdoc @@ -14,7 +14,7 @@ Don't be too anxious about choosing the exact right folder structure from the be For instance, if a project under the `booking` folder is now being shared by multiple apps, you can move it to the shared folder like this: -```shell {% frame="none" %} +```shell nx g move --project booking-some-project shared/some-project ``` @@ -22,7 +22,7 @@ nx g move --project booking-some-project shared/some-project Similarly, if you no longer need a project, you can remove it with the [`@nx/workspace:remove` generator](/docs/reference/workspace/generators#remove). -```shell {% frame="none" %} +```shell nx g remove booking-some-project ``` diff --git a/astro-docs/src/content/docs/concepts/executors-and-configurations.mdoc b/astro-docs/src/content/docs/concepts/executors-and-configurations.mdoc index d462f9f180407..27e834a08a86c 100644 --- a/astro-docs/src/content/docs/concepts/executors-and-configurations.mdoc +++ b/astro-docs/src/content/docs/concepts/executors-and-configurations.mdoc @@ -44,7 +44,7 @@ Each executor definition has an `executor` property and, optionally, an `options Once configured, you can run an executor the same way you would [run any target](/docs/features/run-tasks): -```shell {% frame="none" %} +```shell nx [command] [project] nx build cart ``` @@ -79,7 +79,7 @@ Nx comes with a Devkit that allows you to build your own executor to automate yo You can use a specific configuration preset like this: -```shell {% frame="none" %} +```shell nx [command] [project] --configuration=[configuration] nx build cart --configuration=production ``` diff --git a/astro-docs/src/content/docs/concepts/how-caching-works.mdoc b/astro-docs/src/content/docs/concepts/how-caching-works.mdoc index b7a998ee09ec8..30b8f7fff5583 100644 --- a/astro-docs/src/content/docs/concepts/how-caching-works.mdoc +++ b/astro-docs/src/content/docs/concepts/how-caching-works.mdoc @@ -190,7 +190,7 @@ results. Note, only the flags passed to the npm scripts itself affect results of the computation. For instance, the following commands are identical from the caching perspective. -```shell {% frame="none" %} +```shell npx nx build remixapp npx nx run-many -t build -p remixapp ``` @@ -201,13 +201,13 @@ If you build/test/lint… multiple projects, each individual build has its own h from cache or run. This means that from the caching point of view, the following command: -```shell {% frame="none" %} +```shell npx nx run-many -t build -p header footer ``` is identical to the following two commands: -```shell {% frame="none" %} +```shell npx nx build header npx nx build footer ``` diff --git a/astro-docs/src/content/docs/concepts/inferred-tasks.mdoc b/astro-docs/src/content/docs/concepts/inferred-tasks.mdoc index 5b2932cdca257..8e3d7a94ef5ef 100644 --- a/astro-docs/src/content/docs/concepts/inferred-tasks.mdoc +++ b/astro-docs/src/content/docs/concepts/inferred-tasks.mdoc @@ -51,7 +51,7 @@ Plugins are processed in the order that they appear in the `plugins` array in `n To view the task settings for projects in your workspace, [show the project details](/docs/features/explore-graph) either from the command line or using Nx Console. -```shell {% frame="none" %} +```shell nx show project my-project --web ``` diff --git a/astro-docs/src/content/docs/concepts/sync-generators.mdoc b/astro-docs/src/content/docs/concepts/sync-generators.mdoc index 6b8268f93c232..e61ad3658ba90 100644 --- a/astro-docs/src/content/docs/concepts/sync-generators.mdoc +++ b/astro-docs/src/content/docs/concepts/sync-generators.mdoc @@ -50,7 +50,7 @@ In CI, the sync generator is run in `--dry-run` mode and if files would be chang Use the project details view to **find registered sync generators** for a given task. -```shell {% frame="none" %} +```shell nx show project ``` diff --git a/astro-docs/src/content/docs/concepts/typescript-project-linking.mdoc b/astro-docs/src/content/docs/concepts/typescript-project-linking.mdoc index aa6b0ac5d5409..59ea380d81c32 100644 --- a/astro-docs/src/content/docs/concepts/typescript-project-linking.mdoc +++ b/astro-docs/src/content/docs/concepts/typescript-project-linking.mdoc @@ -32,7 +32,7 @@ There are two different methods that Nx supports for linking TypeScript projects Create a new Nx workspace that links projects with package manager workspaces: -```shell {% frame="none" %} +```shell npx create-nx-workspace ``` diff --git a/astro-docs/src/content/docs/enterprise/Powerpack/publish-conformance-rules-to-nx-cloud.mdoc b/astro-docs/src/content/docs/enterprise/Powerpack/publish-conformance-rules-to-nx-cloud.mdoc index 7a7c3ca1d2cfa..1ad59d47873c6 100644 --- a/astro-docs/src/content/docs/enterprise/Powerpack/publish-conformance-rules-to-nx-cloud.mdoc +++ b/astro-docs/src/content/docs/enterprise/Powerpack/publish-conformance-rules-to-nx-cloud.mdoc @@ -8,13 +8,13 @@ filter: 'type:Guides' Let's create a custom rule which we can then publish to Nx Cloud. We will first create a new library project to contain our rule (and any others we might create in the future): -```shell {% frame="none" %} +```shell nx generate @nx/js:library cloud-conformance-rules ``` The Nx Cloud distribution mechanism expects each rule to be created in a named subdirectory in the `src/` directory of our new project, and each rule directory to contain an `index.ts` and a `schema.json` file. You can read more about [creating a conformance rule](/docs/reference/powerpack/conformance/create-conformance-rule) in the dedicated guide. For this recipe, we'll generate a default rule to use in the publishing process. -```shell {% frame="none" %} +```shell nx g @nx/conformance:create-rule --name=test-cloud-rule --directory=cloud-conformance-rules/src --category=reliability --description="A test cloud rule" --reporter=non-project-files-reporter ``` @@ -50,7 +50,7 @@ We can now run `nx build cloud-conformance-rules` to build our rule and create t Our final step is to publish the rule artifacts to Nx Cloud. We achieve this by running the `publish-conformance-rules` command on the `nx-cloud` CLI, passing the output path location as the first positional argument: -```shell {% frame="none" %} +```shell nx-cloud publish-conformance-rules cloud-conformance-rules/dist ``` diff --git a/astro-docs/src/content/docs/enterprise/Single Tenant/auth-bitbucket.mdoc b/astro-docs/src/content/docs/enterprise/Single Tenant/auth-bitbucket.mdoc index 89a11dff9a3a0..cc2d0fb1e8a88 100644 --- a/astro-docs/src/content/docs/enterprise/Single Tenant/auth-bitbucket.mdoc +++ b/astro-docs/src/content/docs/enterprise/Single Tenant/auth-bitbucket.mdoc @@ -26,7 +26,7 @@ And create a new consumer. Give the app a name. The callback URL is the important bit. It needs to be in this form: -``` +```text [your-nx-cloud-url]/auth-callback # for example diff --git a/astro-docs/src/content/docs/enterprise/Single Tenant/auth-github.mdoc b/astro-docs/src/content/docs/enterprise/Single Tenant/auth-github.mdoc index 36e76e2e67585..e22fee5178128 100644 --- a/astro-docs/src/content/docs/enterprise/Single Tenant/auth-github.mdoc +++ b/astro-docs/src/content/docs/enterprise/Single Tenant/auth-github.mdoc @@ -26,7 +26,7 @@ And create a new OAuth app: Give it a name, and a homepage URL. The authorization callback is the important bit. It needs to be in this form: -``` +```text [your-nx-cloud-url]/auth-callback # for example diff --git a/astro-docs/src/content/docs/enterprise/Single Tenant/auth-gitlab.mdoc b/astro-docs/src/content/docs/enterprise/Single Tenant/auth-gitlab.mdoc index 3d3c03488d5ab..14875d45c78f1 100644 --- a/astro-docs/src/content/docs/enterprise/Single Tenant/auth-gitlab.mdoc +++ b/astro-docs/src/content/docs/enterprise/Single Tenant/auth-gitlab.mdoc @@ -18,7 +18,7 @@ Then "Applications" from the left-hand menu: Give the app a name. The authorization callback is the important bit. It needs to be in this form: -``` +```text [your-nx-cloud-url]/auth-callback # for example diff --git a/astro-docs/src/content/docs/enterprise/Single Tenant/custom-github-app.mdoc b/astro-docs/src/content/docs/enterprise/Single Tenant/custom-github-app.mdoc index 429836a78428c..a51bdb1b75a6a 100644 --- a/astro-docs/src/content/docs/enterprise/Single Tenant/custom-github-app.mdoc +++ b/astro-docs/src/content/docs/enterprise/Single Tenant/custom-github-app.mdoc @@ -26,7 +26,7 @@ And create a new GitHub app: Give it a name, and a homepage URL. The callback URL is the important bit. It needs to be in this form: -``` +```text [your-nx-cloud-url]/callbacks/github-user # for example diff --git a/astro-docs/src/content/docs/enterprise/activate-powerpack.mdoc b/astro-docs/src/content/docs/enterprise/activate-powerpack.mdoc index f4e8c89fae232..eafc41df13ed4 100644 --- a/astro-docs/src/content/docs/enterprise/activate-powerpack.mdoc +++ b/astro-docs/src/content/docs/enterprise/activate-powerpack.mdoc @@ -38,7 +38,7 @@ If you are unsure how to proceed, starting with a trial process is recommended, To register the activation key in your repository, run the `nx register` command. -```shell {% frame="none" %} +```shell nx register YOUR_ACTIVATION_KEY ``` diff --git a/astro-docs/src/content/docs/extending-nx/create-install-package.mdoc b/astro-docs/src/content/docs/extending-nx/create-install-package.mdoc index eda46f58ef5a6..7eebd39798f88 100644 --- a/astro-docs/src/content/docs/extending-nx/create-install-package.mdoc +++ b/astro-docs/src/content/docs/extending-nx/create-install-package.mdoc @@ -17,7 +17,7 @@ These packages are used to set up a new project in some form. Customizing your initial project setup is already possible with an [Nx Preset generator](/docs/extending-nx/create-preset). By creating and shipping a generator named `preset` in your Nx plugin, you can then pass it via the `--preset` flag to the `create-nx-workspace` command: -```shell {% frame="none" %} +```shell npx create-nx-workspace --preset my-plugin ``` @@ -29,13 +29,13 @@ There are a few methods to create a package that will work with `create-nx-works You can setup a new Nx plugin workspace and immediately pass the `--create-package-name`: -```shell {% frame="none" %} +```shell npx create-nx-plugin my-plugin --create-package-name create-my-plugin ``` Alternatively, if you already have an existing Nx plugin workspace, you can run the following generator to set up a new create package: -```shell {% frame="none" %} +```shell nx g create-package create-my-plugin --project my-plugin ``` @@ -118,7 +118,7 @@ _(If you don't have such a `local-registry` target, refer to the following [docs By running -```shell {% frame="none" %} +```shell npx nx local-registry ``` @@ -130,7 +130,7 @@ Note, after terminating the terminal window where the `nx local-registry` comman Next, you can **publish** your packages to your new local registry. All of the generated packages can use `nx release` to publish whatever is in your `build` output folder, so you can simply run: -```shell {% frame="none" %} +```shell npx nx run-many --targets build npx nx release version 1.0.0 npx nx release publish --tag latest @@ -138,7 +138,7 @@ npx nx release publish --tag latest Once the packages are published, you should be able to test the behavior of your "create package" as follows: -```shell {% frame="none" %} +```shell npx create-my-plugin test-workspace ``` @@ -146,7 +146,7 @@ npx create-my-plugin test-workspace When setting up the workspace, you should also have gotten a `my-plugin-e2e` package. This package contains the e2e tests for your plugin, and can be run with the following command: -```shell {% frame="none" %} +```shell npx nx e2e my-plugin-e2e ``` diff --git a/astro-docs/src/content/docs/extending-nx/create-preset.mdoc b/astro-docs/src/content/docs/extending-nx/create-preset.mdoc index 88ea2bb360822..34243f0958bb9 100644 --- a/astro-docs/src/content/docs/extending-nx/create-preset.mdoc +++ b/astro-docs/src/content/docs/extending-nx/create-preset.mdoc @@ -20,7 +20,7 @@ All first-party Nx presets are built into Nx itself, but you can [create your ow To use a concrete example, let's look at the [`qwik-nx`](https://www.npmjs.com/package/qwik-nx) Nx community plugin. They include a [preset generator](https://github.com/qwikifiers/qwik-nx/tree/main/packages/qwik-nx/src/generators/preset) that you can use to create a new Nx workspace with Qwik support. -```shell {% frame="none" %} +```shell npx create-nx-workspace --preset=qwik-nx ``` @@ -28,7 +28,7 @@ npx create-nx-workspace --preset=qwik-nx If you **don't** have an existing plugin you can create one by running -```shell {% frame="none" %} +```shell npx create-nx-plugin my-org --pluginName my-plugin ``` @@ -36,7 +36,7 @@ npx create-nx-plugin my-org --pluginName my-plugin To create our preset inside of our plugin we can run -```shell {% frame="none" %} +```shell nx generate @nx/plugin:generator packages/happynrwl/src/generators/preset ``` @@ -104,6 +104,6 @@ Before you are able to use your newly created preset you must package and publis After you have published your plugin to a registry you can now use your preset when creating a new workspace -```shell {% frame="none" %} +```shell npx create-nx-workspace my-workspace --preset=my-plugin-name ``` diff --git a/astro-docs/src/content/docs/extending-nx/create-sync-generator.mdoc b/astro-docs/src/content/docs/extending-nx/create-sync-generator.mdoc index 30309f4b76566..dc1c76b0e4f72 100644 --- a/astro-docs/src/content/docs/extending-nx/create-sync-generator.mdoc +++ b/astro-docs/src/content/docs/extending-nx/create-sync-generator.mdoc @@ -18,7 +18,7 @@ You can create a new sync generator by hand or use the built-in generator that N Make sure you have `@nx/plugin` installed or add it to your workspace: -```shell {% frame="none" %} +```shell nx add @nx/plugin ``` @@ -26,7 +26,7 @@ nx add @nx/plugin Create a new local plugin where we can add our new sync generator. You can also add it to an existing local plugin if you already have one. In that case you can skip this step. -```shell {% frame="none" %} +```shell nx g @nx/plugin:plugin tools/my-plugin ``` @@ -34,7 +34,7 @@ nx g @nx/plugin:plugin tools/my-plugin Create a sync generator the same way you would [create any generator](/docs/extending-nx/local-generators). -```shell {% frame="none" %} +```shell nx g @nx/plugin:generator --path=tools/my-plugin/src/generators/my-sync-generator ``` @@ -181,7 +181,7 @@ For projects using [inferred targets](/docs/concepts/inferred-tasks) (no project {% aside type="caution" title="Verify the name of your plugin" %} You might have to adjust the name of your plugin based on your specific workspace scope. Verify the name in `tools/my-plugin/package.json`. If the name there is `@myorg/my-plugin` you have to register it as: -``` +```jsonc { "syncGenerators": ["@myorg/my-plugin:my-sync-generator"] } diff --git a/astro-docs/src/content/docs/extending-nx/creating-files.mdoc b/astro-docs/src/content/docs/extending-nx/creating-files.mdoc index b1c21dd3f4f6d..860207e179890 100644 --- a/astro-docs/src/content/docs/extending-nx/creating-files.mdoc +++ b/astro-docs/src/content/docs/extending-nx/creating-files.mdoc @@ -82,7 +82,7 @@ nx generate my-generator mylib The following information will be displayed. -```{% title="nx generate my-generator mylib" %} +```text {% title="nx generate my-generator mylib" %} CREATE libs/mylib/README.md CREATE libs/mylib/.babelrc CREATE libs/mylib/src/index.ts diff --git a/astro-docs/src/content/docs/extending-nx/intro.mdoc b/astro-docs/src/content/docs/extending-nx/intro.mdoc index 43e9736ff7acb..4b9b7348d9687 100644 --- a/astro-docs/src/content/docs/extending-nx/intro.mdoc +++ b/astro-docs/src/content/docs/extending-nx/intro.mdoc @@ -23,7 +23,7 @@ Get started developing your own plugin with a few terminal commands: {% tabs %} {% tabitem label="Create a plugin in a new workspace" %} -```shell {% frame="none" %} +```shell npx create-nx-plugin my-plugin ``` @@ -31,7 +31,7 @@ npx create-nx-plugin my-plugin {% tabitem label="Add a plugin to an existing workspace" %} -```shell {% frame="none" %} +```shell npx nx add @nx/plugin npx nx g plugin tools/my-plugin ``` @@ -59,7 +59,7 @@ You can follow along with one of the step by step tutorials below that is focuse Wire up a new generator with this terminal command: -```shell {% frame="none" %} +```shell npx nx g generator my-plugin/src/generators/library-with-readme ``` @@ -110,7 +110,7 @@ The template files that are used in the `generateFiles` function can inject vari You can test your generator in dry-run mode with the following command: -```shell {% frame="none" %} +```shell npx nx g my-plugin:library-with-readme mylib --dry-run ``` diff --git a/astro-docs/src/content/docs/extending-nx/local-executors.mdoc b/astro-docs/src/content/docs/extending-nx/local-executors.mdoc index 9106cc94aa109..521ff69823101 100644 --- a/astro-docs/src/content/docs/extending-nx/local-executors.mdoc +++ b/astro-docs/src/content/docs/extending-nx/local-executors.mdoc @@ -12,14 +12,14 @@ This guide shows you how to create, run, and customize executors within your Nx If you don't already have a plugin, use Nx to generate one: -```shell {% frame="none" %} +```shell nx add @nx/plugin nx g @nx/plugin:plugin tools/my-plugin ``` Use the Nx CLI to generate the initial files needed for your executor. -```shell {% frame="none" %} +```shell nx generate @nx/plugin:executor tools/my-plugin/src/executors/echo ``` @@ -126,13 +126,13 @@ If your package.json has a different name, adjust the command accordingly. Finally, you run the executor via the CLI as follows: -```shell {% frame="none" %} +```shell nx run my-project:echo ``` To which we'll see the console output: -```{% title="nx run my-project:echo" frame="terminal" %} +```text {% title="nx run my-project:echo" frame="terminal" %} Executing "echo"... Options: { "textToEcho": "Hello World" diff --git a/astro-docs/src/content/docs/extending-nx/local-generators.mdoc b/astro-docs/src/content/docs/extending-nx/local-generators.mdoc index fe8418106ff43..a2d04cb05ceb5 100644 --- a/astro-docs/src/content/docs/extending-nx/local-generators.mdoc +++ b/astro-docs/src/content/docs/extending-nx/local-generators.mdoc @@ -18,7 +18,7 @@ caption="Demoes how to use Nx generators in a PNPM workspace to automate the cre If you don't already have a local plugin, use Nx to generate one: -```shell {% frame="none" %} +```shell nx add @nx/plugin nx g @nx/plugin:plugin tools/my-plugin ``` @@ -101,7 +101,7 @@ The `$default` object is used to read arguments from the command-line that are p To run a generator, invoke the `nx generate` command with the name of the generator. -```shell {% frame="none" %} +```shell nx generate @myorg/my-plugin:my-generator mylib ``` diff --git a/astro-docs/src/content/docs/extending-nx/migration-generators.mdoc b/astro-docs/src/content/docs/extending-nx/migration-generators.mdoc index 5a0d896cd37a6..d4fddf0ca0993 100644 --- a/astro-docs/src/content/docs/extending-nx/migration-generators.mdoc +++ b/astro-docs/src/content/docs/extending-nx/migration-generators.mdoc @@ -14,7 +14,7 @@ For this example, we'll create a new migration generator that updates repos to u ### 1. Generate a migration -```shell {% frame="none" %} +```shell nx generate @nx/plugin:migration libs/pluginName/src/migrations/change-executor-name \ --name='Change Executor Name' \ --packageVersion=2.0.1 \ diff --git a/astro-docs/src/content/docs/extending-nx/organization-specific-plugin.mdoc b/astro-docs/src/content/docs/extending-nx/organization-specific-plugin.mdoc index 43e32757454b8..8cf0606c9e6ba 100644 --- a/astro-docs/src/content/docs/extending-nx/organization-specific-plugin.mdoc +++ b/astro-docs/src/content/docs/extending-nx/organization-specific-plugin.mdoc @@ -17,13 +17,13 @@ In this tutorial, we will create a generator that helps enforce the follow best Let's first create a new workspace with the `create-nx-workspace` command: -```shell {% frame="none" %} +```shell npx create-nx-workspace myorg --preset=react-monorepo --ci=github ``` Then we , install the `@nx/plugin` package and generate a plugin: -```shell {% frame="none" %} +```shell npx nx add @nx/plugin npx nx g @nx/plugin:plugin tools/recommended ``` @@ -34,7 +34,7 @@ This will create a `recommended` project that contains all your plugin code. To create a new generator run: -```shell {% frame="none" %} +```shell npx nx generate @nx/plugin:generator tools/recommended/src/generators/library ``` @@ -70,7 +70,7 @@ We're returning the `callbackAfterFilesUpdated` function because the `@nx/react: To try out the generator in dry-run mode, use the following command: -```shell {% frame="none" %} +```shell npx nx g @myorg/recommended:library test-library --dry-run ``` @@ -139,7 +139,7 @@ The schema files not only provide structure to the CLI, but also allow [Nx Conso Notice how we made the `description` argument optional in both the JSON and type files. If we call the generator without passing a directory, the project will be created in a directory with same name as the project. We can test the changes to the generator with the following command: -```shell {% frame="none" %} +```shell npx nx g @myorg/recommended:library test-library --directory=nested/directory/test-library --dry-run ``` @@ -245,7 +245,7 @@ export default libraryGenerator; We can check that the scope logic is being applied correctly by running the generator again and specifying a scope. -```shell {% frame="none" %} +```shell npx nx g @myorg/recommended:library test-library --scope=shared --dry-run ``` @@ -316,7 +316,7 @@ We updated the generator to use some new helper functions from the Nx devkit. He Now let's check to make sure that the `clearMocks` property is set correctly by the generator. First, we'll commit our changes so far. Then, we'll run the generator without the `--dry-run` flag so we can inspect the file contents. -```shell {% frame="none" %} +```shell git add . git commit -am "library generator" npx nx g @myorg/recommended:library store-test --scope=store diff --git a/astro-docs/src/content/docs/extending-nx/publish-plugin.mdoc b/astro-docs/src/content/docs/extending-nx/publish-plugin.mdoc index 7e72db311eefd..8513e6c4ac9e1 100644 --- a/astro-docs/src/content/docs/extending-nx/publish-plugin.mdoc +++ b/astro-docs/src/content/docs/extending-nx/publish-plugin.mdoc @@ -12,7 +12,7 @@ In order to use your plugin in other workspaces or share it with the community, After that, you can then install your plugin like any other Nx plugin - -```shell {% frame="none" %} +```shell nx add nx-cfonts ``` diff --git a/astro-docs/src/content/docs/extending-nx/tooling-plugin.mdoc b/astro-docs/src/content/docs/extending-nx/tooling-plugin.mdoc index 2f9ceba0125c6..cc5555f01c86d 100644 --- a/astro-docs/src/content/docs/extending-nx/tooling-plugin.mdoc +++ b/astro-docs/src/content/docs/extending-nx/tooling-plugin.mdoc @@ -10,7 +10,7 @@ In this tutorial, we'll create a plugin that helps to integrate the _Astro_ fram To create a plugin in a brand new repository, use the `create-nx-plugin` command: -```shell {% frame="none" %} +```shell npx create-nx-plugin nx-astro ``` @@ -197,7 +197,7 @@ If you create a generator named `init`, Nx will automatically run that generator To create the generator run the following command: -```shell {% frame="none" %} +```shell npx nx g generator src/generators/init ``` @@ -269,7 +269,7 @@ export interface InitGeneratorSchema {} Let's make one more generator to automatically create a simple Astro application. First we'll create the generator: -```shell {% frame="none" %} +```shell npx nx g generator src/generators/application ``` diff --git a/astro-docs/src/content/docs/features/CI Features/affected.mdoc b/astro-docs/src/content/docs/features/CI Features/affected.mdoc index 2965463b9f6c4..8898b60db888b 100644 --- a/astro-docs/src/content/docs/features/CI Features/affected.mdoc +++ b/astro-docs/src/content/docs/features/CI Features/affected.mdoc @@ -211,7 +211,7 @@ This drastically improves the speed of your CI and reduces the amount of compute To leverage this feature, use the following command when running your tasks, particularly on CI: -```shell {% frame="none" %} +```shell nx affected -t ``` @@ -225,7 +225,7 @@ Once the projects are identified, Nx runs the tasks you specified on that subset You can also visualize the affected projects using the [Nx graph](/docs/features/explore-graph). Simply run: -```shell {% frame="none" %} +```shell nx graph --affected ``` @@ -244,14 +244,14 @@ To understand which projects are affected, Nx uses the Git history and the [proj The affected command takes a `base` and `head` commit. The default `base` is your `main` branch, and the default `head` is your current file system. This is generally what you want when developing locally, but in CI, you need to customize these values. -```shell {% frame="none" %} +```shell nx affected -t build --base=origin/main --head=$PR_BRANCH_NAME # where PR_BRANCH_NAME is defined by your CI system nx affected -t build --base=origin/main~1 --head=origin/main # rerun what is affected by the last commit in main ``` You can also set the base and head SHAs as environment variables: -```shell {% frame="none" %} +```shell NX_BASE=origin/main~1 NX_HEAD=origin/main ``` diff --git a/astro-docs/src/content/docs/features/CI Features/distribute-task-execution.mdoc b/astro-docs/src/content/docs/features/CI Features/distribute-task-execution.mdoc index 65f371daedb61..10b7fa650a067 100644 --- a/astro-docs/src/content/docs/features/CI Features/distribute-task-execution.mdoc +++ b/astro-docs/src/content/docs/features/CI Features/distribute-task-execution.mdoc @@ -29,7 +29,7 @@ Nx Agents offer several key advantages: To enable task distribution with Nx Agents, make sure your Nx workspace is connected to Nx Cloud. If you haven't connected your workspace to Nx Cloud yet, run the following command: -```shell {% frame="none" %} +```shell npx nx@latest connect ``` @@ -37,7 +37,7 @@ Check out the [connect to Nx Cloud recipe](/docs/guides/nx-cloud/setup-ci) for m Then, adjust your CI pipeline configuration to **enable task distribution**. If you don't have a CI config yet, you can generate a new one using the following command: -```shell {% frame="none" %} +```shell npx nx g ci-workflow ``` diff --git a/astro-docs/src/content/docs/features/CI Features/flaky-tasks.mdoc b/astro-docs/src/content/docs/features/CI Features/flaky-tasks.mdoc index db2f622fe9e3d..91669aafa218c 100644 --- a/astro-docs/src/content/docs/features/CI Features/flaky-tasks.mdoc +++ b/astro-docs/src/content/docs/features/CI Features/flaky-tasks.mdoc @@ -16,7 +16,7 @@ Flaky Task Detection is enabled by default if your workspace is connected to Nx To connect your workspace to Nx Cloud run: -```shell {% frame="none" %} +```shell npx nx@latest connect ``` diff --git a/astro-docs/src/content/docs/features/CI Features/remote-cache.mdoc b/astro-docs/src/content/docs/features/CI Features/remote-cache.mdoc index d3b227b51272a..74051dadc7f42 100644 --- a/astro-docs/src/content/docs/features/CI Features/remote-cache.mdoc +++ b/astro-docs/src/content/docs/features/CI Features/remote-cache.mdoc @@ -27,7 +27,7 @@ Nx **restores terminal output, along with the files and artifacts** created from To use **Nx Replay**, you need to connect your workspace to Nx Cloud (if you haven't already). -```shell {% frame="none" %} +```shell npx nx@latest connect ``` diff --git a/astro-docs/src/content/docs/features/CI Features/self-healing-ci.mdoc b/astro-docs/src/content/docs/features/CI Features/self-healing-ci.mdoc index 640029d495ba6..da24133cb0455 100644 --- a/astro-docs/src/content/docs/features/CI Features/self-healing-ci.mdoc +++ b/astro-docs/src/content/docs/features/CI Features/self-healing-ci.mdoc @@ -29,7 +29,7 @@ To enable Self-Healing CI in your workspace, you'll need to connect to Nx Cloud If you haven't already connected to Nx Cloud, run the following command: -```shell {% frame="none" %} +```shell npx nx@latest connect ``` diff --git a/astro-docs/src/content/docs/features/CI Features/split-e2e-tasks.mdoc b/astro-docs/src/content/docs/features/CI Features/split-e2e-tasks.mdoc index b4981bd2e7256..29cff72a11b05 100644 --- a/astro-docs/src/content/docs/features/CI Features/split-e2e-tasks.mdoc +++ b/astro-docs/src/content/docs/features/CI Features/split-e2e-tasks.mdoc @@ -26,7 +26,7 @@ Manually splitting these slow tasks can be complex and require ongoing maintenan To use **automated task splitting**, you need to connect your workspace to Nx Cloud (if you haven't already). -```shell {% frame="none" %} +```shell npx nx@latest connect ``` @@ -39,28 +39,28 @@ Run this command to set up inferred tasks and enable task splitting for each plu {% tabs syncKey="test-runner" %} {% tabitem label="Cypress" %} -```shell {% frame="none" %} +```shell nx add @nx/cypress ``` {% /tabitem %} {% tabitem label="Playwright" %} -```shell {% frame="none" %} +```shell nx add @nx/playwright ``` {% /tabitem %} {% tabitem label="Jest" %} -```shell {% frame="none" %} +```shell nx add @nx/jest ``` {% /tabitem %} {% tabitem label="Gradle" %} -```shell {% frame="none" %} +```shell nx add @nx/gradle ``` @@ -96,7 +96,7 @@ Run the following command to open the project detail view for your test project: {% tabs %} {% tabitem label="CLI" %} -```shell {% frame="none" %} +```shell nx show project my-project-e2e ``` @@ -422,7 +422,7 @@ If you configured Nx Atomizer properly, you'll see that there are tasks named `e During local development, you'll want to continue using the base task (e.g., `e2e`, `test`) as it is more efficient on a single machine. -```shell {% frame="none" %} +```shell nx e2e my-project-e2e ``` diff --git a/astro-docs/src/content/docs/features/automate-updating-dependencies.mdoc b/astro-docs/src/content/docs/features/automate-updating-dependencies.mdoc index a402e2e5f79ff..94895210e0888 100644 --- a/astro-docs/src/content/docs/features/automate-updating-dependencies.mdoc +++ b/astro-docs/src/content/docs/features/automate-updating-dependencies.mdoc @@ -20,7 +20,7 @@ Keeping your tooling up to date is crucial for the health of your project. Tooli To update your workspace, run: -```shell {% frame="none" %} +```shell npx nx@latest migrate latest ``` @@ -66,7 +66,7 @@ You can intervene at each step and make adjustments as needed for your specific First, run the `migrate` command: -```shell {% frame="none" %} +```shell nx migrate latest ``` @@ -89,7 +89,7 @@ Now, you can **inspect `package.json` to see if the changes make sense**. Someti You can now run the actual code migrations that were generated in the `migrations.json` in the previous step. -```shell {% frame="none" %} +```shell nx migrate --run-migrations ``` @@ -109,13 +109,13 @@ Note: You may want to keep the `migrations.json` until every branch that was cre If you have any [Nx community plugins](/docs/plugin-registry) installed you need to migrate them individually (assuming they provide migration scripts) by using the following command: -```shell {% frame="none" %} +```shell nx migrate my-plugin ``` For a list of all the plugins you currently have installed, run: -```shell {% frame="none" %} +```shell nx report ``` diff --git a/astro-docs/src/content/docs/features/cache-task-results.mdoc b/astro-docs/src/content/docs/features/cache-task-results.mdoc index c321a205a53c5..dddd99665551b 100644 --- a/astro-docs/src/content/docs/features/cache-task-results.mdoc +++ b/astro-docs/src/content/docs/features/cache-task-results.mdoc @@ -70,7 +70,7 @@ By default, Nx caches task results locally. The biggest benefit of caching comes To enable remote caching, connect your workspace to [Nx Cloud](https://nx.dev/nx-cloud) by running the following command: -```shell {% frame="none" %} +```shell npx nx@latest connect ``` @@ -157,7 +157,7 @@ When using [Nx plugins](/docs/concepts/nx-plugins), many tasks have caching conf For example, if you add the `@nx/vite` plugin using the following command... -```shell {% frame="none" %} +```shell npx nx add @nx/vite ``` @@ -167,7 +167,7 @@ This means **you don't need to manually specify cacheable operations for Vite ta To view the task settings that have been automatically configured by a plugin, use the following command: -```shell {% frame="none" %} +```shell nx show project --web ``` diff --git a/astro-docs/src/content/docs/features/enforce-module-boundaries.mdoc b/astro-docs/src/content/docs/features/enforce-module-boundaries.mdoc index 92a95b84df782..37b84933dc294 100644 --- a/astro-docs/src/content/docs/features/enforce-module-boundaries.mdoc +++ b/astro-docs/src/content/docs/features/enforce-module-boundaries.mdoc @@ -103,7 +103,7 @@ Once you have tagged your projects, configure the dependency constraints based o For JavaScript/TypeScript projects, configure the `@nx/enforce-module-boundaries` ESLint rule: -```shell {% frame="none" %} +```shell nx add @nx/eslint-plugin @nx/devkit ``` @@ -201,7 +201,7 @@ Read more about [ESLint rule options](/docs/technologies/eslint/eslint-plugin/gu For any project type or to enforce boundaries on the complete dependency graph, use the Conformance plugin: -```shell {% frame="none" %} +```shell nx add @nx/conformance ``` diff --git a/astro-docs/src/content/docs/features/enhance-AI.mdoc b/astro-docs/src/content/docs/features/enhance-AI.mdoc index 8ab1c886a47da..42373ba664a77 100644 --- a/astro-docs/src/content/docs/features/enhance-AI.mdoc +++ b/astro-docs/src/content/docs/features/enhance-AI.mdoc @@ -43,7 +43,7 @@ These are some of the available tools which the Nx MCP server exposes: To configure Nx for AI agents and AI-Assistants, run the following command: -```shell {% frame="none" %} +```shell npx nx configure-ai-agents ``` @@ -79,7 +79,7 @@ For other MCP-compatible clients (that do not have Nx Console available) like Cl Here's an example of how to register it for Claude Code: -```shell {% frame="none" %} +```shell claude mcp add nx-mcp npx nx-mcp@latest ``` @@ -91,7 +91,7 @@ claude mcp add nx-mcp npx nx-mcp@latest Ask your AI assistant about your workspace structure and get detailed, accurate responses about projects, their types, and relationships: -``` +```text What is the structure of this workspace? How are the projects organized? ``` @@ -107,7 +107,7 @@ With Nx MCP, your AI assistant can: You can also get informed suggestions about where to implement new functionality: -``` +```text Where should I implement a feature for adding products to cart? ``` @@ -140,7 +140,7 @@ Learn more about CI integration in our blog post [Save Time: Connecting Your Edi Nx generators provide predictable code scaffolding, while AI adds intelligence and contextual understanding. Instead of having the AI generate everything from scratch, you get the best of both worlds: -``` +```text Create a new React library into the packages/orders/feat-cancel-orders folder and call the library with the same name of the folder structure. Afterwards, also connect it to the main shop application. @@ -163,7 +163,7 @@ This approach ensures consistent code that follows your organization's best prac Get accurate guidance on Nx configuration without worrying about hallucinations or outdated information: -``` +```text Can you configure Nx release for the packages of this workspace? Update nx.json with the necessary configuration using conventional commits as the versioning strategy. @@ -184,7 +184,7 @@ Learn more about documentation-aware configuration in our blog post [Making Curs Understand the impact of changes across your monorepo with questions like: -``` +```text If I change the public API of feat-product-detail, which other projects might be affected by that change? ``` diff --git a/astro-docs/src/content/docs/features/explore-graph.mdoc b/astro-docs/src/content/docs/features/explore-graph.mdoc index c8daf98149bd1..9a09ab604d4ab 100644 --- a/astro-docs/src/content/docs/features/explore-graph.mdoc +++ b/astro-docs/src/content/docs/features/explore-graph.mdoc @@ -282,7 +282,7 @@ It always stays up to date without having to actively maintain a document as it To launch the project graph visualization for your workspace, use [Nx Console](/docs/getting-started/editor-setup) or run: -```shell {% frame="none" %} +```shell npx nx graph ``` @@ -545,7 +545,7 @@ Try playing around with a [fully interactive graph on a sample repo](https://nrw If you prefer to analyze the underlying data of the project graph with a script or some other tool, you can run: -```shell {% frame="none" %} +```shell nx graph --file=output.json ``` @@ -566,7 +566,7 @@ Some moments which you may want to share these images are: Nx uses the project graph of your workspace to determine the order in which to [run tasks](/docs/features/run-tasks). Pass the `--graph` flag to view the **task graph** which is executed by Nx when running a command. -```shell {% frame="none" %} +```shell nx build myreactapp --graph # View the graph for building myreactapp nx run-many --targets build --graph # View the graph for building all projects nx affected --targets build --graph # View the graph for building the affected projects diff --git a/astro-docs/src/content/docs/features/generate-code.mdoc b/astro-docs/src/content/docs/features/generate-code.mdoc index dc86e210338a0..0beba0b7e5b21 100644 --- a/astro-docs/src/content/docs/features/generate-code.mdoc +++ b/astro-docs/src/content/docs/features/generate-code.mdoc @@ -20,13 +20,13 @@ Generators come as part of [Nx plugins](/docs/concepts/nx-plugins) and can be in Here's an example of generating a React library: -```shell {% frame="none" %} +```shell nx g @nx/react:lib packages/mylib ``` You can also specify just the generator name and Nx will prompt you to pick between the installed plugins that provide a generator with that name. -```shell {% frame="none" %} +```shell nx g lib packages/mylib ``` @@ -34,7 +34,7 @@ When running this command, you could be prompted to choose between the `@nx/reac To see a list of available generators in a given plugin, run `nx list `. As an example, to list all generators in the @nx/react plugin: -```shell {% frame="none" %} +```shell nx list @nx/react ``` diff --git a/astro-docs/src/content/docs/features/manage-releases.mdoc b/astro-docs/src/content/docs/features/manage-releases.mdoc index 1face47144fc1..71360e96431a8 100644 --- a/astro-docs/src/content/docs/features/manage-releases.mdoc +++ b/astro-docs/src/content/docs/features/manage-releases.mdoc @@ -14,7 +14,7 @@ Nx provides a set of tools to help you manage your releases called `nx release`. > We recommend always starting with --dry-run, because publishing is difficult to undo -```shell {% frame="none" %} +```shell nx release --dry-run ``` @@ -34,7 +34,7 @@ By default, when you run `nx release` it will prompt you for a version keyword ( When trying it out for the first time, you need to pass the `--first-release` flag since there is no previous release to compare against for changelog purposes. It is strongly recommended to use the `--dry-run` flag to see what will be published in the first release without actually pushing anything to the registry. -```shell {% frame="none" %} +```shell nx release --first-release --dry-run ``` diff --git a/astro-docs/src/content/docs/features/run-tasks.mdoc b/astro-docs/src/content/docs/features/run-tasks.mdoc index d82dc10f37920..bf30a000ab13b 100644 --- a/astro-docs/src/content/docs/features/run-tasks.mdoc +++ b/astro-docs/src/content/docs/features/run-tasks.mdoc @@ -114,7 +114,7 @@ In Nx 21, task output is displayed in an [interactive terminal UI](/docs/guides/ To run the `test` task for the `header` project run this command: -```shell {% frame="none" %} +```shell npx nx test header ``` @@ -124,19 +124,19 @@ You can use the `run-many` command to run a task for multiple projects. Here are Run the `build` task for all projects in the repo: -```shell {% frame="none" %} +```shell npx nx run-many -t build ``` Run the `build`, `lint` and `test` task for all projects in the repo: -```shell {% frame="none" %} +```shell npx nx run-many -t build lint test ``` Run the `build`, `lint`, and `test` tasks only on the `header` and `footer` projects: -```shell {% frame="none" %} +```shell npx nx run-many -t build lint test -p header footer ``` @@ -148,7 +148,7 @@ Learn more about the [run-many](/docs/reference/nx-commands#nx-run-many) command You can also run a command for all the projects affected by your PR like this: -```shell {% frame="none" %} +```shell npx nx affected -t test ``` @@ -290,7 +290,7 @@ If you want Nx to cache the task, but prefer to use npm (or pnpm/yarn) to run th To invoke the task, use: -```shell {% frame="none" %} +```shell npx nx docs ``` diff --git a/astro-docs/src/content/docs/getting-started/Tutorials/angular-monorepo-tutorial.mdoc b/astro-docs/src/content/docs/getting-started/Tutorials/angular-monorepo-tutorial.mdoc index ce4c7e286e991..69b18a9a44691 100644 --- a/astro-docs/src/content/docs/getting-started/Tutorials/angular-monorepo-tutorial.mdoc +++ b/astro-docs/src/content/docs/getting-started/Tutorials/angular-monorepo-tutorial.mdoc @@ -38,14 +38,14 @@ Please verify closely that you have the following setup: Clone your repository to your local machine: -```shell {% frame="none" %} +```shell git clone cd ``` Install dependencies: -```shell {% frame="none" %} +```shell npm install ``` @@ -84,7 +84,7 @@ Now, let's build some features and see how Nx helps get us to production faster. To serve your new Angular app, run: -```shell {% frame="none" %} +```shell npx nx serve angular-demo ``` @@ -151,7 +151,7 @@ The most critical parts are: To view all tasks for a project, look in the [Nx Console](/docs/getting-started/editor-setup) project detail view or run: -```shell {% frame="none" %} +```shell npx nx show project angular-demo ``` @@ -256,7 +256,7 @@ Nx allows you to separate this logic into "local libraries." The main benefits i Let's create a reusable design system library called `ui` that we can use across our workspace. This library will contain reusable components such as buttons, inputs, and other UI elements. -```shell {% frame="none" %} +```shell npx nx g @nx/angular:library packages/ui --unitTestRunner=vitest ``` @@ -281,13 +281,13 @@ Running the above command should lead to the following directory structure: Just as with the `angular-demo` app, Nx automatically infers the tasks for the `ui` library from its configuration files. You can view them by running: -```shell {% frame="none" %} +```shell npx nx show project ui ``` In this case, we have the `lint` and `test` tasks available, among other inferred tasks. -```shell {% frame="none" %} +```shell npx nx lint ui npx nx test ui ``` @@ -433,7 +433,7 @@ Nx automatically detects the dependencies between the various parts of your work Just run: -```shell {% frame="none" %} +```shell npx nx graph ``` @@ -475,7 +475,7 @@ You should be able to see something similar to the following in your browser. Let's create a git branch with the new hero component so we can open a pull request later: -```shell {% frame="none" %} +```shell git checkout -b add-hero-component git add . git commit -m 'add hero component' @@ -485,14 +485,14 @@ git commit -m 'add hero component' Our current setup not only has targets for serving and building the Angular application, but also has targets for unit testing, e2e testing and linting. The `test` and `lint` targets are defined in the application `project.json` file. We can use the same syntax as before to run these tasks: -```shell {% frame="none" %} +```shell npx nx test angular-demo # runs the tests for angular-demo npx nx lint ui # runs the linter on ui ``` More conveniently, we can also run tasks in parallel using the following syntax: -```shell {% frame="none" %} +```shell npx nx run-many -t test lint ``` @@ -575,7 +575,7 @@ You will also need to install the [Nx Console](/docs/getting-started/editor-setu Now, let's push the `add-hero-component` branch to GitHub and open a new pull request. -```shell {% frame="none" %} +```shell git push origin add-hero-component # Don't forget to open a pull request on GitHub ``` diff --git a/astro-docs/src/content/docs/getting-started/Tutorials/gradle-tutorial.mdoc b/astro-docs/src/content/docs/getting-started/Tutorials/gradle-tutorial.mdoc index ee24655f385a9..d0446e2c0fe14 100644 --- a/astro-docs/src/content/docs/getting-started/Tutorials/gradle-tutorial.mdoc +++ b/astro-docs/src/content/docs/getting-started/Tutorials/gradle-tutorial.mdoc @@ -30,7 +30,7 @@ are specific to your operating system. To verify that Gradle was installed correctly, run this command: -```shell {% frame="none" %} +```shell gradle --version ``` @@ -41,21 +41,21 @@ To streamline this tutorial, we'll install Nx globally on your system. You can u Make sure [Homebrew is installed](https://brew.sh/), then install Nx globally with these commands: -```shell {% frame="none" %} +```shell brew install nx ``` {% /tabitem %} {% tabitem label="Chocolatey (Windows)" %} -```shell {% frame="none" %} +```shell choco install nx ``` {% /tabitem %} {% tabitem label="apt (Ubuntu)" %} -```shell {% frame="none" %} +```shell sudo add-apt-repository ppa:nrwl/nx sudo apt update sudo apt install nx @@ -67,7 +67,7 @@ sudo apt install nx Install node from the [NodeJS website](https://nodejs.org/en/download), then install Nx globally with this command: -```shell {% frame="none" %} +```shell npm install --global nx ``` @@ -80,7 +80,7 @@ This tutorial picks up where [Spring framework](https://spring.io/)'s guide for Fork [the sample repository](https://github.com/nrwl/gradle-tutorial/fork), and then clone it on your local machine: -```shell {% frame="none" %} +```shell git clone https://github.com//gradle-tutorial.git ``` @@ -111,7 +111,7 @@ both locally and on CI. We will explore the features of Nx in this tutorial by a To add Nx, run -```shell {% frame="none" %} +```shell nx init ``` @@ -152,7 +152,7 @@ The `@nx/gradle` plugin reflects the graph of projects in Gradle into the Nx Pro are created, deleted, and change their dependencies, Nx will automatically recalculate the graph. Exploring this graph visually is vital to understanding how your code is structured and how Nx and Gradle behaves. -```shell {% frame="none" %} +```shell nx graph ``` @@ -1132,7 +1132,7 @@ computation caching to reuse the results of tasks. We will explore how Nx adds t Before we start running tasks, let's explore the tasks available for the `application` project. The `@nx/gradle` plugin that we've installed reflects Gradle's tasks to Nx, which allows it to run any of the Gradle tasks defined for that project. You can view the available tasks either through [Nx Console](/docs/getting-started/editor-setup) or from the terminal: -```shell {% frame="none" %} +```shell nx show project application ``` @@ -2374,7 +2374,7 @@ nx show project application The Nx command to run the `build` task for the `application` project is: -```shell {% frame="none" %} +```shell nx run application:build ``` @@ -2457,7 +2457,7 @@ With Nx Cloud connected, your task results are now cached remotely. This means t Try running the build again after making a small change to see how Nx intelligently determines which tasks need to be re-run: -```shell {% frame="none" %} +```shell nx run-many -t build ``` @@ -2517,7 +2517,7 @@ You will also need to install the [Nx Console](/docs/getting-started/editor-setu Start by making a new branch to work on. -```shell {% frame="none" %} +```shell git checkout -b self-healing-ci ``` @@ -2534,7 +2534,7 @@ Now for demo purposes, we'll make a mistake in our `DemoApplication` class that Commit the changes and open a new PR on GitHub. -```shell {% frame="none" %} +```shell git add . git commit -m 'demo self-healing ci' git push origin self-healing-ci diff --git a/astro-docs/src/content/docs/getting-started/Tutorials/react-monorepo-tutorial.mdoc b/astro-docs/src/content/docs/getting-started/Tutorials/react-monorepo-tutorial.mdoc index 84740825ee612..b937a2d63fc9c 100644 --- a/astro-docs/src/content/docs/getting-started/Tutorials/react-monorepo-tutorial.mdoc +++ b/astro-docs/src/content/docs/getting-started/Tutorials/react-monorepo-tutorial.mdoc @@ -79,7 +79,7 @@ Now, let's build some features and see how Nx helps get us to production faster. To serve your new React app, run: -```shell {% frame="none" %} +```shell npx nx serve demo ``` @@ -120,7 +120,7 @@ In `nx.json` there's already the `@nx/vite` plugin registered which automaticall To view the tasks that Nx has detected, look in the [Nx Console](/docs/getting-started/editor-setup) project detail view or run: -```shell {% frame="none" %} +```shell npx nx show project demo ``` @@ -235,7 +235,7 @@ Nx allows you to separate this logic into "local libraries." The main benefits i Let's create a reusable design system library called `ui` that we can use across our workspace. This library will contain reusable components such as buttons, inputs, and other UI elements. -```shell {% frame="none" %} +```shell npx nx g @nx/react:library packages/ui --unitTestRunner=vitest --bundler=none ``` @@ -262,13 +262,13 @@ Running the above commands should lead to the following directory structure: Just as with the `demo` app, Nx automatically infers the tasks for the `ui` library from its configuration files. You can view them by running: -```shell {% frame="none" %} +```shell npx nx show project ui ``` In this case, we have the `lint` and `test` tasks available, among other inferred tasks. -```shell {% frame="none" %} +```shell npx nx lint ui npx nx test ui ``` @@ -391,7 +391,7 @@ Nx automatically detects the dependencies between the various parts of your work Just run: -```shell {% frame="none" %} +```shell npx nx graph ``` @@ -433,7 +433,7 @@ You should be able to see something similar to the following in your browser. Let's create a git branch with the new hero component so we can open a pull request later: -```shell {% frame="none" %} +```shell git checkout -b add-hero-component git add . git commit -m 'add hero component' @@ -443,14 +443,14 @@ git commit -m 'add hero component' Our current setup doesn't just come with targets for serving and building the React application, but also has targets for testing and linting. We can use the same syntax as before to run these tasks: -```shell {% frame="none" %} +```shell npx nx test demo # runs the tests for demo npx nx lint ui # runs the linter on ui ``` More conveniently, we can also run tasks in parallel using the following syntax: -```shell {% frame="none" %} +```shell npx nx run-many -t test lint ``` @@ -533,7 +533,7 @@ You will also need to install the [Nx Console](/docs/getting-started/editor-setu Now, let's push the `add-hero-component` branch to GitHub and open a new pull request. -```shell {% frame="none" %} +```shell git push origin add-hero-component # Don't forget to open a pull request on GitHub ``` diff --git a/astro-docs/src/content/docs/getting-started/ai-setup.mdoc b/astro-docs/src/content/docs/getting-started/ai-setup.mdoc index ca61ae3b3f002..05071337771d6 100644 --- a/astro-docs/src/content/docs/getting-started/ai-setup.mdoc +++ b/astro-docs/src/content/docs/getting-started/ai-setup.mdoc @@ -15,7 +15,7 @@ Nx provides deep integration with AI coding assistants through the **Nx Model Co To automatically configure your Nx workspace to work best with AI agents and assistants, run the following command: -```shell {% frame="none" %} +```shell npx nx configure-ai-agents ``` @@ -41,7 +41,7 @@ You can of course manually configure the Nx MCP for MCP-compatible clients using For Claude Code: -```shell {% frame="none" %} +```shell claude mcp add nx-mcp npx nx-mcp@latest ``` diff --git a/astro-docs/src/content/docs/getting-started/installation.mdoc b/astro-docs/src/content/docs/getting-started/installation.mdoc index e169a5b425939..90cce58ad2570 100644 --- a/astro-docs/src/content/docs/getting-started/installation.mdoc +++ b/astro-docs/src/content/docs/getting-started/installation.mdoc @@ -10,7 +10,7 @@ To install Nx on your machine, choose one of the following methods based on your {% tabs syncKey="install-method" %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm add --global nx ``` @@ -19,7 +19,7 @@ npm add --global nx {% tabitem label="Homebrew (macOS, Linux)" %} -```shell {% frame="none" %} +```shell brew install nx ``` @@ -27,7 +27,7 @@ brew install nx {% tabitem label="Chocolatey (Windows)" %} -```shell {% frame="none" %} +```shell choco install nx ``` @@ -35,7 +35,7 @@ choco install nx {% tabitem label="apt (Ubuntu)" %} -```shell {% frame="none" %} +```shell sudo add-apt-repository ppa:nrwl/nx sudo apt update sudo apt install nx @@ -48,7 +48,7 @@ sudo apt install nx To add Nx to an existing repository, run: -```shell {% frame="none" %} +```shell nx init ``` @@ -59,7 +59,7 @@ Learn more about [adopting Nx in an existing project](/docs/guides/adopting-nx) To create a starter repository, you can use the `create-nx-workspace` command. This will create a new Nx workspace with a default configuration and example applications. -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest ``` @@ -67,13 +67,13 @@ npx create-nx-workspace@latest When you update Nx, Nx will also [automatically update your dependencies](/docs/features/automate-updating-dependencies) if you have an [Nx plugin](/docs/concepts/nx-plugins) installed for that dependency. To update Nx, run: -```shell {% frame="none" %} +```shell nx migrate latest ``` This will create a `migrations.json` file with any update scripts that need to be run. Run them with: -```shell {% frame="none" %} +```shell nx migrate --run-migrations ``` diff --git a/astro-docs/src/content/docs/getting-started/intro.mdoc b/astro-docs/src/content/docs/getting-started/intro.mdoc index 6e3750131dae3..7073c54bd2c1f 100644 --- a/astro-docs/src/content/docs/getting-started/intro.mdoc +++ b/astro-docs/src/content/docs/getting-started/intro.mdoc @@ -47,7 +47,7 @@ Then you can simply add Nx to your root `package.json`: And once that's done, you can run your tasks via Nx. -```shell {% frame="none" %} +```shell nx build my-project ``` diff --git a/astro-docs/src/content/docs/getting-started/start-new-project.mdoc b/astro-docs/src/content/docs/getting-started/start-new-project.mdoc index 988b03f841b81..53a5b4a0e184b 100644 --- a/astro-docs/src/content/docs/getting-started/start-new-project.mdoc +++ b/astro-docs/src/content/docs/getting-started/start-new-project.mdoc @@ -27,7 +27,7 @@ Let's take the example of an NPM workspace. Create a new root-level `package.jso Then you can add Nx to it by using: -```shell {% frame="none" %} +```shell nx@latest init ``` @@ -47,7 +47,7 @@ Alternatively, you can choose a more guided approach by leveraging some of the p Run the following command to get started: -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest ``` diff --git a/astro-docs/src/content/docs/getting-started/start-with-existing-project.mdoc b/astro-docs/src/content/docs/getting-started/start-with-existing-project.mdoc index 538730413e1f3..80633fbb958a6 100644 --- a/astro-docs/src/content/docs/getting-started/start-with-existing-project.mdoc +++ b/astro-docs/src/content/docs/getting-started/start-with-existing-project.mdoc @@ -13,7 +13,7 @@ Thanks to [Nx's modular architecture](/docs/getting-started/intro), you can star Getting started is remarkably simple. You can add Nx to any existing project with a single command: -```shell {% frame="none" %} +```shell nx@latest init ``` diff --git a/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-existing-project.mdoc b/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-existing-project.mdoc index 0cab6d3a558f3..e882b7461f24e 100644 --- a/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-existing-project.mdoc +++ b/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-existing-project.mdoc @@ -31,7 +31,7 @@ Additionally, Nx also [speeds up your CI ⚡](#fast-ci) with [remote caching](/d Run the following command: -```shell {% frame="none" %} +```shell npx nx@latest init ``` @@ -114,7 +114,7 @@ configuring the plugins on the [`@nx/next/plugin`](/docs/technologies/react/next To view all available tasks, open the Project Details view with Nx Console or use the terminal to launch the project details in a browser window. -```shell {% frame="none" %} +```shell nx show project my-workspace --web ``` @@ -317,7 +317,7 @@ Now that we're working on the CI pipeline, it is important for your changes to b Now connect your repository to Nx Cloud with the following command: -```shell {% frame="none" %} +```shell npx nx@latest connect ``` @@ -331,7 +331,7 @@ Once the PR is created, merge it into your main branch. And make sure you pull the latest changes locally: -```shell {% frame="none" %} +```shell git pull ``` @@ -341,7 +341,7 @@ You should now have an `nxCloudId` property specified in the `nx.json` file. Use the following command to generate a CI workflow file. -```shell {% frame="none" %} +```shell npx nx generate ci-workflow --ci=github ``` @@ -381,7 +381,7 @@ jobs: Commit the changes and open a new PR on GitHub. -```shell {% frame="none" %} +```shell git add . git commit -m 'add CI workflow file' git push origin add-workflow diff --git a/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-monorepo.mdoc b/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-monorepo.mdoc index 3baa073d08622..12ec6cdfa3362 100644 --- a/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-monorepo.mdoc +++ b/astro-docs/src/content/docs/guides/Adopting Nx/adding-to-monorepo.mdoc @@ -29,7 +29,7 @@ add an `nx.json` for configuring caching and task pipelines. Run the following command to automatically set up Nx: -```shell {% frame="none" %} +```shell npx nx@latest init ``` @@ -112,7 +112,7 @@ configuring the plugins on the [`@nx/next/plugin`](/docs/technologies/react/next To view all available tasks, open the Project Details view with Nx Console or use the terminal to launch the project details in a browser window. -```shell {% frame="none" %} +```shell nx show project my-workspace --web ``` @@ -301,14 +301,14 @@ initially using Nx just for a subset of your scripts and then gradually adding m For example, use Nx to run your builds: -```shell {% frame="none" %} +```shell npx nx run-many -t build ``` But instead keep using NPM/Yarn/PNPM workspace commands for your tests and other scripts. Here's an example of using PNPM commands to run tests across packages -```shell {% frame="none" %} +```shell pnpm run -r test ``` @@ -335,7 +335,7 @@ Now that we're working on the CI pipeline, it is important for your changes to b Now connect your repository to Nx Cloud with the following command: -```shell {% frame="none" %} +```shell npx nx@latest connect ``` @@ -349,7 +349,7 @@ Once the PR is created, merge it into your main branch. And make sure you pull the latest changes locally: -```shell {% frame="none" %} +```shell git pull ``` @@ -359,7 +359,7 @@ You should now have an `nxCloudId` property specified in the `nx.json` file. Use the following command to generate a CI workflow file. -```shell {% frame="none" %} +```shell npx nx generate ci-workflow --ci=github ``` @@ -399,7 +399,7 @@ jobs: Commit the changes and open a new PR on GitHub. -```shell {% frame="none" %} +```shell git add . git commit -m 'add CI workflow file' git push origin add-workflow diff --git a/astro-docs/src/content/docs/guides/Adopting Nx/from-turborepo.mdoc b/astro-docs/src/content/docs/guides/Adopting Nx/from-turborepo.mdoc index c6696b3f632d5..8ed6e920bbd90 100644 --- a/astro-docs/src/content/docs/guides/Adopting Nx/from-turborepo.mdoc +++ b/astro-docs/src/content/docs/guides/Adopting Nx/from-turborepo.mdoc @@ -129,13 +129,13 @@ The simplest way to understand the concepts is to see a basic migration example. 1. Let's create a new Turborepo workspace using the recommended `create-turbo` command: -```shell {% frame="none" %} +```shell npx create-turbo@latest ``` 2. Once that is finished, literally all we need to do make it a valid Nx workspace is run `nx init`: -```shell {% frame="none" %} +```shell npx nx@latest init ``` diff --git a/astro-docs/src/content/docs/guides/Adopting Nx/import-project.mdoc b/astro-docs/src/content/docs/guides/Adopting Nx/import-project.mdoc index 64c7ba3d0570e..8dd5e3eb2e236 100644 --- a/astro-docs/src/content/docs/guides/Adopting Nx/import-project.mdoc +++ b/astro-docs/src/content/docs/guides/Adopting Nx/import-project.mdoc @@ -57,7 +57,7 @@ Nx can help with the process of moving an existing project from another reposito In this example, the source repository contains a single application while the destination repository is already a monorepo. You can also import a project from a sub-directory of the source repository (if the source repository is a monorepo, for instance). The `nx import` command can be run with no arguments and you will be prompted to for the required arguments: -```shell {% frame="none" %} +```shell nx import ``` @@ -65,7 +65,7 @@ Make sure to run `nx import` from within the **destination repository**. You can also directly specify arguments from the terminal, like one of these commands: -```shell {% frame="none" %} +```shell nx import [sourceRepository] [destinationDirectory] nx import ../inventory-app apps/inventory nx import https://github.com/myorg/inventory-app.git apps/inventory diff --git a/astro-docs/src/content/docs/guides/Adopting Nx/manual.mdoc b/astro-docs/src/content/docs/guides/Adopting Nx/manual.mdoc index 520aa1efb5769..08c91df0fd969 100644 --- a/astro-docs/src/content/docs/guides/Adopting Nx/manual.mdoc +++ b/astro-docs/src/content/docs/guides/Adopting Nx/manual.mdoc @@ -8,7 +8,7 @@ sidebar: The easiest way to start using Nx is to run the `nx init` command. -```shell {% frame="none" %} +```shell npx nx@latest init ``` @@ -21,28 +21,28 @@ We'll start by installing the `nx` package: {% tabs syncKey="install-type" %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm add -D nx@latest ``` {% /tabitem %} {% tabitem label="yarn" %} -```shell {% frame="none" %} +```shell yarn add -D nx@latest ``` {% /tabitem %} {% tabitem label="pnpm" %} -```shell {% frame="none" %} +```shell pnpm add -D nx@latest ``` {% /tabitem %} {% tabitem label="bun" %} -```shell {% frame="none" %} +```shell bun add -D nx@latest ``` diff --git a/astro-docs/src/content/docs/guides/Adopting Nx/preserving-git-histories.mdoc b/astro-docs/src/content/docs/guides/Adopting Nx/preserving-git-histories.mdoc index 01e25c981be16..eb7d9d23f0d0e 100644 --- a/astro-docs/src/content/docs/guides/Adopting Nx/preserving-git-histories.mdoc +++ b/astro-docs/src/content/docs/guides/Adopting Nx/preserving-git-histories.mdoc @@ -26,7 +26,7 @@ If your standalone project was not an Nx workspace, it's likely that your migrat In order to avoid merge conflicts later, it's best to first do the folder reorganization in the _standalone project repo_. For example, assuming you want the standalone app to end up at `apps/my-standalone-app` in the monorepo and your main branch is called `master`: -```shell {% frame="none" %} +```shell cd my-standalone-app git checkout main git fetch @@ -38,21 +38,21 @@ git ls-files | sed 's!/.*!!'| uniq | xargs -i git mv {} apps/my-standalone-app Check if you need to move back the `.gitignore` file to the root and/or update any paths so you don't commit previously ignored files/folders. If all is well proceed with the commit and push. -```shell {% frame="none" %} +```shell git commit -m "Move files in preparation for monorepo migration" git push --set-upstream origin monorepo-migration ``` Next, in your monorepo, we'll add a remote repository url for where the standalone app is located: -```shell {% frame="none" %} +```shell git remote add my-standalone-app git fetch my-standalone-app ``` Then we'll run -```shell {% frame="none" %} +```shell git merge my-standalone-app/monorepo-migration --allow-unrelated-histories ``` diff --git a/astro-docs/src/content/docs/guides/Installation/install-non-javascript.mdoc b/astro-docs/src/content/docs/guides/Installation/install-non-javascript.mdoc index 1ec3d0824c943..982c659d3d7de 100644 --- a/astro-docs/src/content/docs/guides/Installation/install-non-javascript.mdoc +++ b/astro-docs/src/content/docs/guides/Installation/install-non-javascript.mdoc @@ -17,7 +17,7 @@ First globally install Nx using Homebrew (Mac and Linux) or with a manually inst If you have [Homebrew installed](https://brew.sh/), you can install Nx globally with these commands: -```shell {% frame="none" %} +```shell brew install nx ``` @@ -26,7 +26,7 @@ brew install nx If you have [Node installed](https://nodejs.org/en/download), you can install Nx globally with this command: -```shell {% frame="none" %} +```shell npm install --global nx ``` @@ -37,7 +37,7 @@ npm install --global nx You can install Nx in the `.nx/installation` directory of your repository by running `nx init` in a directory without a `package.json` file. -```shell {% frame="none" %} +```shell nx init ``` @@ -46,7 +46,7 @@ When Nx is installed in `.nx`, you can run Nx via a global Nx installation or th {% tabs %} {% tabitem label="Global Install" %} -```shell {% frame="none" %} +```shell nx build my-project nx generate application nx graph @@ -55,7 +55,7 @@ nx graph {% /tabitem %} {% tabitem label="nx shell script" %} -```shell {% frame="none" %} +```shell ./nx build my-project ./nx generate application ./nx graph @@ -64,7 +64,7 @@ nx graph {% /tabitem %} {% tabitem label="nx.bat" %} -```shell {% frame="none" %} +```shell ./nx.bat build my-project ./nx.bat generate application ./nx.bat graph diff --git a/astro-docs/src/content/docs/guides/Installation/update-global-installation.mdoc b/astro-docs/src/content/docs/guides/Installation/update-global-installation.mdoc index 900e35303fd44..59271d49e014f 100644 --- a/astro-docs/src/content/docs/guides/Installation/update-global-installation.mdoc +++ b/astro-docs/src/content/docs/guides/Installation/update-global-installation.mdoc @@ -18,7 +18,7 @@ If you cannot remember which package manager you installed Nx globally with or a {% tabs syncKey="install-type" %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm list --global nx ``` @@ -27,20 +27,20 @@ npm list --global nx **yarn 2+** -```shell {% frame="none" %} +```shell yarn dlx list nx ``` yarn 1.x -```shell {% frame="none" %} +```shell yarn global list nx ``` {% /tabitem %} {% tabitem label="pnpm" %} -```shell {% frame="none" %} +```shell pnpm list --global nx ``` @@ -52,21 +52,21 @@ You can then remove the extra global installations by running the following comm {% tabs syncKey="install-type" %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm rm --global nx ``` {% /tabitem %} {% tabitem label="yarn" %} -```shell {% frame="none" %} +```shell yarn global remove nx ``` {% /tabitem %} {% tabitem label="pnpm" %} -```shell {% frame="none" %} +```shell pnpm rm --global nx ``` diff --git a/astro-docs/src/content/docs/guides/Nx Cloud/setup-ci.mdoc b/astro-docs/src/content/docs/guides/Nx Cloud/setup-ci.mdoc index 266baddcb90f9..29331255b00c9 100644 --- a/astro-docs/src/content/docs/guides/Nx Cloud/setup-ci.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Cloud/setup-ci.mdoc @@ -16,7 +16,7 @@ Each platform has specific configurations and optimizations that help you build {% tabitem label="GitHub" %} Need a starting point? Generate a new workflow file with the following command: -```shell {% frame="none" %} +```shell nx g ci-workflow --ci=github ``` @@ -74,7 +74,7 @@ jobs: Need a starting point? Generate a new workflow file with the following command: -```shell {% frame="none" %} +```shell nx g ci-workflow --ci=circleci ``` @@ -126,7 +126,7 @@ workflows: {% tabitem label="GitLab" %} Need a starting point? Generate a new workflow file with the following command: -```shell {% frame="none" %} +```shell nx g ci-workflow --ci=gitlab ``` @@ -170,7 +170,7 @@ CI: Need a starting point? Generate a new workflow file with the following command: -```shell {% frame="none" %} +```shell nx g ci-workflow --ci=azure-pipelines ``` @@ -307,7 +307,7 @@ pipeline { Need a starting point? Generate a new workflow file with the following command: -```shell {% frame="none" %} +```shell nx g ci-workflow --ci=bitbucket-pipelines ``` diff --git a/astro-docs/src/content/docs/guides/Nx Release/automatically-version-with-conventional-commits.mdoc b/astro-docs/src/content/docs/guides/Nx Release/automatically-version-with-conventional-commits.mdoc index ce8a830495f97..34bbb7f618f56 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/automatically-version-with-conventional-commits.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/automatically-version-with-conventional-commits.mdoc @@ -30,7 +30,7 @@ Nx Release will use the commit messages since the last release to determine the For example, if the git history looks like this: -``` +```text - fix(pkg-1): fix something - feat(pkg-2): add a new feature - chore(pkg-3): update docs @@ -47,7 +47,7 @@ If Nx Release does not find any relevant commits since the last release, it will If you are using [independent releases](/docs/guides/nx-release/release-projects-independently), Nx Release will determine the version bump for each project independently. For example, if the git history looks like this: -``` +```text - fix(pkg-1): fix something - feat(pkg-2): add a new feature - chore(pkg-3): update docs diff --git a/astro-docs/src/content/docs/guides/Nx Release/file-based-versioning-version-plans.mdoc b/astro-docs/src/content/docs/guides/Nx Release/file-based-versioning-version-plans.mdoc index ced3fa946937e..f0645f08605b4 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/file-based-versioning-version-plans.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/file-based-versioning-version-plans.mdoc @@ -105,7 +105,7 @@ Because these are just files, they can be created manually or by any custom scri To make things easier, Nx release comes with a built in command to help you generate valid version plan files: -```shell {% frame="none" %} +```shell nx release plan ``` @@ -125,7 +125,7 @@ When making changes to your codebase and using version plans as your versioning Attempting to keep track of this manually as a part of pull request reviews can be error prone and time consuming, therefore Nx release provides a `nx release plan:check` command which can be used to ensure that a version plan file exists for the changes you are making. -```shell {% frame="none" %} +```shell nx release plan:check ``` @@ -172,6 +172,6 @@ By default, all files that have changed are considered, but you may not want all To see more details about the changed files that were detected and the filtering logic that was used to determine the ultimately changed projects behind the scenes, you can pass `--verbose` to the command: -```shell {% frame="none" %} +```shell nx release plan:check --verbose ``` diff --git a/astro-docs/src/content/docs/guides/Nx Release/publish-in-ci-cd.mdoc b/astro-docs/src/content/docs/guides/Nx Release/publish-in-ci-cd.mdoc index 354d8003dfafa..6cac9e00611f2 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/publish-in-ci-cd.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/publish-in-ci-cd.mdoc @@ -12,14 +12,14 @@ Nx Release makes it easy to move your publishing process into your CI/CD pipelin When running `nx release`, after the version updates and changelog generation, you will be prompted with the following question: -```{% frame="terminal" title="nx release" %} +```text {% frame="terminal" title="nx release" %} ... ? Do you want to publish these versions? (y/N) › ``` To move publishing into an automated pipeline, you will want to skip publishing when running `nx release` locally. To do this automatically, use the `--skip-publish` flag: -```{% frame="terminal" title="nx release --skip-publish" %} +```text {% frame="terminal" title="nx release --skip-publish" %} ... Skipped publishing packages. @@ -29,7 +29,7 @@ Skipped publishing packages. Nx Release provides a publishing subcommand that performs just the publishing step. Use this in your CI/CD pipeline to publish the packages. -```{% frame="terminal" title="nx release publish" %} +```text {% frame="terminal" title="nx release publish" %} NX Running target nx-release-publish for 3 projects: - pkg-1 @@ -43,7 +43,7 @@ NX Running target nx-release-publish for 3 projects: ### Example NPM Publish Output -```{% frame="terminal" title="nx release publish" %} +```text {% frame="terminal" title="nx release publish" %} NX Running target nx-release-publish for 3 projects: - pkg-1 diff --git a/astro-docs/src/content/docs/guides/Nx Release/publish-rust-crates.mdoc b/astro-docs/src/content/docs/guides/Nx Release/publish-rust-crates.mdoc index d27841dff9441..31178f2281800 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/publish-rust-crates.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/publish-rust-crates.mdoc @@ -26,7 +26,7 @@ Ensure that Nx is installed in your monorepo. Check out the [Installation docs]( The [`@monodon/rust` package](https://github.com/Cammisuli/monodon) is required for Nx Release to manage and release Rust crates. Add it if it is not already installed: -```shell {% frame="none" %} +```shell nx add @monodon/rust ``` @@ -65,7 +65,7 @@ The `--dry-run` option is useful for testing your configuration without actually To preview your first release, run: -```shell {% frame="none" %} +```shell nx release --first-release --dry-run ``` @@ -176,7 +176,7 @@ NOTE: The "dryRun" flag means no changes were made. If the preview looks good, run the command again without the `--dry-run` option to actually create the release. -```shell {% frame="none" %} +```shell nx release --first-release ``` diff --git a/astro-docs/src/content/docs/guides/Nx Release/release-docker-images.mdoc b/astro-docs/src/content/docs/guides/Nx Release/release-docker-images.mdoc index 7e0e6bee9ca9d..047abed5aebec 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/release-docker-images.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/release-docker-images.mdoc @@ -17,7 +17,7 @@ Before starting, ensure you have: ## Install Nx Docker Plugin -```shell {% frame="none" %} +```shell nx add @nx/docker ``` @@ -27,7 +27,7 @@ This command adds the `@nx/docker` plugin to your `nx.json` so that projects wit If you don't already have a backend application, create one using `@nx/node`: -```shell {% frame="none" %} +```shell nx add @nx/node nx g @nx/node:app apps/api --docker --framework=express ``` @@ -59,7 +59,7 @@ CMD [ "node", "app" ] You should be able to run the following commands to compile the application and create a Docker image: -```shell {% frame="none" %} +```shell nx build api nx docker:build api ``` @@ -195,13 +195,13 @@ Versioning will continue to work as normal. Dry run your first Docker release with calendar versioning: -```shell {% frame="none" %} +```shell nx release --dockerVersionScheme=production --first-release --dry-run ``` When you are ready, run the release command again without `--dry-run`: -```shell {% frame="none" %} +```shell nx release --dockerVersionScheme=production --first-release ``` @@ -254,7 +254,7 @@ These are the default schemes that come with Nx Release. These schemes support w If you need to specify an exact Docker version instead of using version schemes, you can use the `--dockerVersion` flag: -```shell {% frame="none" %} +```shell nx release --dockerVersion=1.2.3 ``` diff --git a/astro-docs/src/content/docs/guides/Nx Release/release-npm-packages.mdoc b/astro-docs/src/content/docs/guides/Nx Release/release-npm-packages.mdoc index 0964ead0ed669..c9069aaa1decd 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/release-npm-packages.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/release-npm-packages.mdoc @@ -18,7 +18,7 @@ Ensure that Nx is installed in your monorepo. Check out the [Installation docs]( The [`@nx/js` package](/docs/technologies/typescript/introduction) is required for Nx Release to manage and release JavaScript packages. Add it if it is not already installed: -```shell {% frame="none" %} +```shell nx add @nx/js ``` @@ -53,7 +53,7 @@ The `--dry-run` option is useful for testing your configuration without actually To preview your first release, run: -```shell {% frame="none" %} +```shell nx release --first-release --dry-run ``` @@ -156,7 +156,7 @@ Skipped publishing packages. If the preview looks good, run the command again without the `--dry-run` option to actually create the release. -```shell {% frame="none" %} +```shell nx release --first-release ``` diff --git a/astro-docs/src/content/docs/guides/Nx Release/release-projects-independently.mdoc b/astro-docs/src/content/docs/guides/Nx Release/release-projects-independently.mdoc index 6a476ef57851e..95e8e7e47f4dd 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/release-projects-independently.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/release-projects-independently.mdoc @@ -72,7 +72,7 @@ See the [`releaseTag.pattern` documentation](/docs/reference/nx-json#release-tag Even though Nx Release creates a git tag for each project, it will still create a single commit for the entire release. The commit message will still include all of the projects being released with their corresponding version. For example: -``` +```text chore(release): publish - project: pkg-1 1.1.0 @@ -105,20 +105,20 @@ One of the key benefits of independent releases is the ability to release only a Release only the `pkg-1` and `pkg-2` projects: -```shell {% frame="none" %} +```shell nx release --projects=pkg-1,pkg-2 ``` Release all projects in the `server` directory: -```shell {% frame="none" %} -nx release --projects="server/*" +```shell +nx release --projects=server/* ``` Release all projects except those in the `ui` directory: -```shell {% frame="none" %} -nx release --projects="!ui/*" +```shell +nx release --projects='!ui/*' ``` All other projects in the workspace will be ignored and only those that match the filter will be versioned, have their changelogs updated, and published. diff --git a/astro-docs/src/content/docs/guides/Nx Release/updating-version-references.mdoc b/astro-docs/src/content/docs/guides/Nx Release/updating-version-references.mdoc index 0791805d58948..b9887f4e74f0d 100644 --- a/astro-docs/src/content/docs/guides/Nx Release/updating-version-references.mdoc +++ b/astro-docs/src/content/docs/guides/Nx Release/updating-version-references.mdoc @@ -22,13 +22,15 @@ This is the simplest scenario, and default behavior of Nx Release. If you have a For example, with the following project structure: -``` -packages/ - my-project/ - package.json - my-other-project-in-the-monorepo/ - package.json -``` +{% filetree %} + +- packages/ + - my-project/ + - package.json + - my-other-project-in-the-monorepo/ + - package.json + +{% /filetree %} And starting point for package.json sources: diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/configure-inputs.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/configure-inputs.mdoc index 085722d411ed3..aa85449300baf 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/configure-inputs.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/configure-inputs.mdoc @@ -53,7 +53,7 @@ Throughout this recipe, the following project structure of a simple workspace wi You can view the configuration for a task of a project by adding the `--graph` flag when running the command: -```shell {% frame="none" %} +```shell nx build myreactapp --graph ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/configure-outputs.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/configure-outputs.mdoc index 6968275e26976..a91dc2d758ea3 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/configure-outputs.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/configure-outputs.mdoc @@ -42,7 +42,7 @@ If an output file or directory does not exist, it will be ignored. The outputs of a task can be viewed by adding the `--graph` flag to the command: -```shell {% frame="none" %} +```shell nx build myapp --graph ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/convert-to-inferred.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/convert-to-inferred.mdoc index b988ff41dafc9..c0b90796c3819 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/convert-to-inferred.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/convert-to-inferred.mdoc @@ -19,7 +19,7 @@ title="Project Crystal" For the best experience, we recommend that you [migrate](/docs/features/automate-updating-dependencies) to the latest Nx version before continuing. At minimum, you should be on Nx version 19.6. -```shell {% frame="none" %} +```shell npx nx migrate latest ``` @@ -27,7 +27,7 @@ npx nx migrate latest You can use the `infer-targets` generator to quickly migrate all available plugins to use inferred tasks. See the sections below for more details on the individual plugins' migration processes. -```shell {% frame="none" %} +```shell npx nx g infer-targets ``` @@ -64,7 +64,7 @@ The `convert-to-inferred` generator removes uses of executors from the correspon Target and configuration names are maintained for each project in their `project.json` files. A target may be removed from `project.json` if everything is inferred--that is, options and configurations are not customized. To get the full project details (including all inferred tasks), run: -```shell {% frame="none" %} +```shell npx nx show project ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/defining-task-pipeline.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/defining-task-pipeline.mdoc index dbf856a8d11a4..8fdb96071f6e3 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/defining-task-pipeline.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/defining-task-pipeline.mdoc @@ -112,7 +112,7 @@ You can also visualize the actual task graph (alongside the projects) using [Nx To view the task graph in your browser, run: -```shell {% frame="none" %} +```shell npx nx graph ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/pass-args-to-commands.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/pass-args-to-commands.mdoc index aefe7640dbcb5..ed5790f2f95e9 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/pass-args-to-commands.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/pass-args-to-commands.mdoc @@ -269,7 +269,7 @@ To pass args in a one-off manner when running a task, you can also provide them {% tabs %} {% tabitem label="Providing args directly as options" %} -```shell {% frame="none" %} +```shell nx build my-app --assetsInlineLimit=2048 --assetsDir=static/assets ``` @@ -277,7 +277,7 @@ nx build my-app --assetsInlineLimit=2048 --assetsDir=static/assets {% tabitem label="Providing the \"--args\" option" %} -```shell {% frame="none" %} +```shell nx build my-app --args="--assetsInlineLimit=2048 --assetsDir=static/assets" ``` @@ -290,7 +290,7 @@ If you provide an arg with the same name as an Nx CLI option (e.g. `--configurat You can also provide an arg with the same name to both the Nx CLI and the underlying command. For example, to run the `ci` configuration of a `test` target that runs the command `detox test` and pass the `--configuration` arg to the command, you can run: -```shell {% frame="none" %} +```shell nx test mobile-e2e --configuration=ci --args="--configuration=ios.sim.release" ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/root-level-scripts.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/root-level-scripts.mdoc index 328d59a9456a4..60098cc1f0023 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/root-level-scripts.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/root-level-scripts.mdoc @@ -46,7 +46,7 @@ Once Nx is aware of your root-level scripts, you can run them the same way you w For our example, you would run: -```{% title="nx docs" frame="terminal" %} +```text {% title="nx docs" frame="terminal" %} > nx run myorg:docs yarn run v1.22.19 @@ -89,7 +89,7 @@ Our fully configured example would look like this: To cache the `docs` target, you can set `cache: true` on the `docs` target shown in the `package.json` above. Your output would then look as follows: -```{% title="nx docs" frame="terminal" %} +```text {% title="nx docs" frame="terminal" %} > nx run myorg:docs [existing outputs match the cache, left as is] yarn run v1.22.19 diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/run-commands-executor.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/run-commands-executor.mdoc index fe147a1cc05d0..0f5016677d53a 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/run-commands-executor.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/run-commands-executor.mdoc @@ -10,7 +10,7 @@ You can easily run any command with the Nx toolchain. The main benefit is to mak The command we want to run for each project is: -```shell {% frame="none" %} +```shell make hello ``` @@ -42,24 +42,24 @@ For more information (e.g. how to forward arguments), see the [run-commands api To run the command, use the usual Nx syntax: -```shell {% frame="none" %} +```shell nx run my-app:make ``` or -```shell {% frame="none" %} +```shell nx make my-app ``` You can also run the `make` command for all projects it has been defined on: -```shell {% frame="none" %} +```shell nx run-many -t make ``` Or just on a subset of projects that are [affected by a given change](/docs/features/ci-features/affected): -```shell {% frame="none" %} +```shell nx affected -t make ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/run-tasks-in-parallel.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/run-tasks-in-parallel.mdoc index af2a5775978f7..fecbdd0fa6314 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/run-tasks-in-parallel.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/run-tasks-in-parallel.mdoc @@ -6,13 +6,13 @@ filter: 'type:Guides' If you want to increase the number of processes running tasks to, say, 5 (by default, it is 3), pass the following: -```shell {% frame="none" %} +```shell npx nx build myapp --parallel=5 ``` You can also set parallel based on the percentage of the number of logical CPUs. -```shell {% frame="none" %} +```shell npx nx build myapp --parallel=50% ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/skipping-cache.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/skipping-cache.mdoc index b9404af8fad39..c1ac6377a7529 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/skipping-cache.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/skipping-cache.mdoc @@ -10,7 +10,7 @@ There are times when you might want to bypass the [caching mechanism](/docs/feat To skip caching for a specific task, use the `--skip-nx-cache` flag. This can be useful when you want to ensure that a task runs fresh, without using cached results. -```shell {% frame="none" %} +```shell npx nx build --skip-nx-cache ``` @@ -20,7 +20,7 @@ This will avoid using any local or remote cache. To skip remote caching provided by Nx Cloud, use the `--no-cloud` flag. This ensures that the task does not use cached results from Nx Cloud. -```shell {% frame="none" %} +```shell npx nx build --no-cloud ``` @@ -30,6 +30,6 @@ It will **still use the local cache if available**. To clear the cache and metadata about the workspace and shuts down the Nx Daemon you can use the [reset](/docs/reference/nx-commands#nx-reset) command: -```shell {% frame="none" %} +```shell npx nx reset ``` diff --git a/astro-docs/src/content/docs/guides/Tasks & Caching/workspace-watching.mdoc b/astro-docs/src/content/docs/guides/Tasks & Caching/workspace-watching.mdoc index cab2807018565..418acb55fdfa0 100644 --- a/astro-docs/src/content/docs/guides/Tasks & Caching/workspace-watching.mdoc +++ b/astro-docs/src/content/docs/guides/Tasks & Caching/workspace-watching.mdoc @@ -84,7 +84,7 @@ Traditionally, if you want to rebuild your projects whenever they change, you wo With the following command, Nx is told to watch all projects, and execute `nx run $NX_PROJECT_NAME:build` for each change. -```shell {% frame="none" %} +```shell nx watch --all -- nx run \$NX_PROJECT_NAME:build ``` @@ -102,7 +102,7 @@ If you're running this command on Windows Powershell (not WSL), the environment For example: -```shell {% frame="none" %} +```shell nx watch --all -- nx run %NX_PROJECT_NAME%:build ``` @@ -129,19 +129,19 @@ Below are the ways to run the watch with each package manager. #### pnpm -```shell {% frame="none" %} +```shell pnpm nx watch --all -- echo \$NX_PROJECT_NAME ``` #### yarn -```shell {% frame="none" %} +```shell yarn nx -- watch --all -- echo \$NX_PROJECT_NAME ``` #### npx -```shell {% frame="none" %} +```shell npx -c 'nx watch --all -- echo \$NX_PROJECT_NAME' ``` @@ -151,7 +151,7 @@ npx -c 'nx watch --all -- echo \$NX_PROJECT_NAME' To watch for specific projects and echo the changed files, run this command: -```shell {% frame="none" %} +```shell nx watch --projects=app1,app2 -- echo \$NX_FILE_CHANGES ``` @@ -159,7 +159,7 @@ nx watch --projects=app1,app2 -- echo \$NX_FILE_CHANGES To watch for a project and it's dependencies, run this command: -```shell {% frame="none" %} +```shell nx watch --projects=app1 --includeDependentProjects -- echo \$NX_PROJECT_NAME ``` @@ -169,7 +169,7 @@ In a monorepo setup, your application might rely on several libraries that need To watch and rebuild the dependent libraries of an application, use the following command: -```shell {% frame="none" %} +```shell nx watch --projects=my-app --includeDependentProjects -- nx run-many -t build -p \$NX_PROJECT_NAME --exclude=my-app ``` diff --git a/astro-docs/src/content/docs/guides/Tips-n-Tricks/advanced-update.mdoc b/astro-docs/src/content/docs/guides/Tips-n-Tricks/advanced-update.mdoc index 22418617beabe..4cbfa9d9962c9 100644 --- a/astro-docs/src/content/docs/guides/Tips-n-Tricks/advanced-update.mdoc +++ b/astro-docs/src/content/docs/guides/Tips-n-Tricks/advanced-update.mdoc @@ -14,7 +14,7 @@ The following steps are a summary of the [standard update process](/docs/feature First, run the `migrate` command: -```shell {% frame="none" %} +```shell nx migrate latest # same as nx migrate nx@latest ``` @@ -27,7 +27,7 @@ This performs the following changes: The next step in the process involves using the `migrate` command to apply the migrations that were generated in the `migrations.json` file in the previous step. You can do so by running: -```shell {% frame="none" %} +```shell nx migrate --run-migrations ``` @@ -64,13 +64,13 @@ Depending on the size of the update (e.g. migrating between major versions is li If you pass `--create-commits` to the `--run-migrations` command, Nx will automatically create a dedicated commit for each successfully completed migration, for example: -```shell {% frame="none" %} +```shell nx migrate --run-migrations --create-commits ``` Your git history will then look something like the following: -```{% title="nx migrate --run-migrations --create-commits" frame="terminal" %} +```text {% title="nx migrate --run-migrations --create-commits" frame="terminal" %} git log commit 8c862c780106ab8736985c01de1477309a403548 @@ -90,11 +90,11 @@ etc By default, nx will apply the prefix of `chore: [nx migration] ` to each commit in order to clearly identify it, but you can also customize this prefix by passing `--commit-prefix` to the command: -```shell {% frame="none" %} +```shell nx migrate --run-migrations --create-commits --commit-prefix="chore(core): AUTOMATED - " ``` -```{% title="git log" frame="terminal" %} +```text {% title="git log" frame="terminal" %} commit 8c862c780106ab8736985c01de1477309a403548 Author: YOUR_GIT_USERNAME Date: Thu Apr 14 18:35:44 2022 +0400 @@ -125,7 +125,7 @@ Because you can run `nx migrate --run-migrations` as many times as you want, you You can even provide a custom location for the migrations file if you wish, you simply pass it to the `--run-migrations` option: -```shell {% frame="none" %} +```shell nx migrate --run-migrations=migrations.json ``` @@ -145,7 +145,7 @@ While opting out of applying some package updates is supported by Nx, please kee To opt out of package updates, you need to run the migration in interactive mode: -```shell {% frame="none" %} +```shell nx migrate latest --interactive ``` @@ -157,7 +157,7 @@ Once you have skipped some optional updates, there'll come a time when you'll wa Say you skipped updating Angular to **v16.x.x**. That package update was meant to happen as part of the `@nx/angular@16.1.0` update, but you decided to skip it at the time. The recommended way to collect the migrations from such an older version is to run the following: -```shell {% frame="none" %} +```shell nx migrate latest --from=nx@16.0.0 --exclude-applied-migrations ``` @@ -176,7 +176,7 @@ Automatically excluding previously applied migrations doesn't consider migration After running the migrations in interactive mode and opting-out of some package updates, a message is printed to the terminal with the command to run later to collect and apply those skipped updates. For example, if you skipped updating Angular to **v16.0.0**, this is the output you'll see (simplified for brevity): -```shell {% frame="none" %} +```shell nx migrate latest --interactive Fetching meta data about packages. It may take a few minutes. @@ -237,13 +237,13 @@ You can see the `16.1.0-beta.1` version is the one that contains the update for Sometimes, you may want to use a different version of a package than what Nx recommends. To do that, specify the package and version: -```shell {% frame="none" %} +```shell nx migrate latest --to="jest@22.0.0,cypress@3.4.0" ``` By default, Nx uses currently installed packages to calculate what migrations need to run. To override them, override the version: -```shell {% frame="none" %} +```shell nx migrate latest --to="@nx/jest@12.0.0" ``` @@ -257,7 +257,7 @@ Updates are best done on a clean git history so that it can be easily reversed i If an update fails for any reason, you can revert it as you do any other set of changes: -```shell {% frame="none" %} +```shell git reset --hard # Reset any changes git clean -fd # Delete newly added files and directories ``` diff --git a/astro-docs/src/content/docs/guides/Tips-n-Tricks/browser-support.mdoc b/astro-docs/src/content/docs/guides/Tips-n-Tricks/browser-support.mdoc index 9cf491e19e392..27e0ec8fc64a7 100644 --- a/astro-docs/src/content/docs/guides/Tips-n-Tricks/browser-support.mdoc +++ b/astro-docs/src/content/docs/guides/Tips-n-Tricks/browser-support.mdoc @@ -30,7 +30,7 @@ Sometimes broad configurations like `> 0.5%, not IE 11` can lead to surprising r To see what browsers your configuration is supporting, run `npx browserslist` in the application's directory to get an output of browsers and versions to support. -```{% title="npx browserslist" frame="terminal" %} +```text {% title="npx browserslist" frame="terminal" %} and_chr 61 chrome 83 edge 83 @@ -52,6 +52,6 @@ safari 12 Alternatively, if your support config is short you can just add it as a string param on the CLI: -```shell {% frame="none" %} +```shell npx browserslist '> 0.5%, not IE 11' ``` diff --git a/astro-docs/src/content/docs/guides/Tips-n-Tricks/define-environment-variables.mdoc b/astro-docs/src/content/docs/guides/Tips-n-Tricks/define-environment-variables.mdoc index 0cac119895979..10b4c4de8a710 100644 --- a/astro-docs/src/content/docs/guides/Tips-n-Tricks/define-environment-variables.mdoc +++ b/astro-docs/src/content/docs/guides/Tips-n-Tricks/define-environment-variables.mdoc @@ -61,7 +61,7 @@ for workspace-specific settings (like the [Nx Cloud token](/docs/guides/nx-cloud Nx will only load environment variable files for a particular configuration if that configuration is defined for a task, even if you specify that configuration name from the command line. So if there is no `development` configuration defined for the `app`'s `build` task, the following command will use `.env.build` instead of `.env.build.development`: -```shell {% frame="none" %} +```shell nx build app --configuration development ``` @@ -99,18 +99,18 @@ In Unix systems, we need to set the environment variables before calling a comma Let's say that we want to define an API URL for the application to use: -```shell {% frame="none" %} +```shell NX_PUBLIC_API_URL=http://localhost:3333 nx build myapp ``` **Windows (cmd.exe)** -```shell {% frame="none" %} +```shell set "NX_PUBLIC_API_URL=http://localhost:3333" && nx build myapp ``` **Windows (Powershell)** -```shell {% frame="none" %} +```shell ($env:NX_PUBLIC_API_URL = "http://localhost:3333") -and (nx build myapp) ``` diff --git a/astro-docs/src/content/docs/guides/Tips-n-Tricks/feature-based-testing.mdoc b/astro-docs/src/content/docs/guides/Tips-n-Tricks/feature-based-testing.mdoc index e102e2159ef93..2fce49602ea59 100644 --- a/astro-docs/src/content/docs/guides/Tips-n-Tricks/feature-based-testing.mdoc +++ b/astro-docs/src/content/docs/guides/Tips-n-Tricks/feature-based-testing.mdoc @@ -160,7 +160,7 @@ When running tests from multiple features in parallel, be mindful of shared reso With feature-based testing, you can leverage Nx's affected commands to run only the tests that matter: -```shell {% frame="none" %} +```shell # Run all affected tests based on your changes nx affected -t test diff --git a/astro-docs/src/content/docs/guides/Tips-n-Tricks/standalone-to-monorepo.mdoc b/astro-docs/src/content/docs/guides/Tips-n-Tricks/standalone-to-monorepo.mdoc index 50b2eb10e0e35..e3a917a2082df 100644 --- a/astro-docs/src/content/docs/guides/Tips-n-Tricks/standalone-to-monorepo.mdoc +++ b/astro-docs/src/content/docs/guides/Tips-n-Tricks/standalone-to-monorepo.mdoc @@ -15,7 +15,7 @@ width="100%" /%} The `convert-to-monorepo` generator will attempt to convert a standalone repo to a monorepo. -```shell {% frame="none" %} +```shell nx g convert-to-monorepo ``` @@ -38,7 +38,7 @@ For this recipe, we'll assume that the root-level app is named `my-app`. The hig 2. Create a new app using the appropriate plugin under `apps/temp` - ```shell {% frame="none" %} + ```shell nx g app apps/temp ``` @@ -71,7 +71,7 @@ For this recipe, we'll assume that the root-level app is named `my-app`. The hig 6. Doublecheck that all the tasks defined in the `apps/temp/project.json` file still work. - ```shell {% frame="none" %} + ```shell nx build temp nx test temp nx lint temp @@ -82,7 +82,7 @@ For this recipe, we'll assume that the root-level app is named `my-app`. The hig 9. Update the `/apps/temp-e2e/project.json` `implicitDependencies` to be `temp` instead of `my-app` 10. Doublecheck that all the tasks defined in the `apps/temp-e2e/project.json` file still work. - ```shell {% frame="none" %} + ```shell nx lint temp-e2e nx e2e temp-e2e ``` @@ -90,7 +90,7 @@ For this recipe, we'll assume that the root-level app is named `my-app`. The hig 11. Delete all the project specific config files in the root and under `e2e` 12. Once the `project.json` file has been deleted in the root, rename `temp-e2e` to `my-app-e2e` and rename `temp` to `my-app` - ```shell {% frame="none" %} + ```shell nx g move --projectName=temp-e2e --destination=my-app-e2e nx g move --projectName=temp --destination=my-app ``` diff --git a/astro-docs/src/content/docs/guides/Tips-n-Tricks/yarn-pnp.mdoc b/astro-docs/src/content/docs/guides/Tips-n-Tricks/yarn-pnp.mdoc index f358c212fb489..7aee0eb680ed8 100644 --- a/astro-docs/src/content/docs/guides/Tips-n-Tricks/yarn-pnp.mdoc +++ b/astro-docs/src/content/docs/guides/Tips-n-Tricks/yarn-pnp.mdoc @@ -19,7 +19,7 @@ Read more about `PnP` on [Yarn's official docs](https://yarnpkg.com/features/pnp When you run `create-nx-workspace` with the optional `--pm=yarn` flag, Nx uses the default yarn version set in your global `.yarnrc.yml` file (usually in the root of your user folder). To check your current yarn version, run: -```shell {% frame="none" %} +```shell yarn --version ``` diff --git a/astro-docs/src/content/docs/quickstart.mdoc b/astro-docs/src/content/docs/quickstart.mdoc index ed57ad4a3a76c..f12acfcc4d6bb 100644 --- a/astro-docs/src/content/docs/quickstart.mdoc +++ b/astro-docs/src/content/docs/quickstart.mdoc @@ -18,7 +18,7 @@ Get up and running with Nx in just a few minutes by following these simple steps {% tabs syncKey="install-method" %} {% tabitem label="npm" %} - ```shell {% frame="none" %} + ```shell npm add --global nx ``` @@ -27,21 +27,21 @@ Get up and running with Nx in just a few minutes by following these simple steps {% /tabitem %} {% tabitem label="Homebrew (macOS, Linux)" %} - ```shell {% frame="none" %} + ```shell brew install nx ``` {% /tabitem %} {% tabitem label="Chocolatey (Windows)" %} - ```shell {% frame="none" %} + ```shell choco install nx ``` {% /tabitem %} {% tabitem label="apt (Ubuntu)" %} - ```shell {% frame="none" %} + ```shell sudo add-apt-repository ppa:nrwl/nx sudo apt update sudo apt install nx @@ -54,13 +54,13 @@ Get up and running with Nx in just a few minutes by following these simple steps For JavaScript-based projects you can **start with a new workspace** using the following command: - ```shell {% frame="none" %} + ```shell npx create-nx-workspace@latest ``` **Add to an existing project: (recommended also for non-JS projects)** - ```shell {% frame="none" %} + ```shell npx nx@latest init ``` @@ -75,14 +75,14 @@ Get up and running with Nx in just a few minutes by following these simple steps **Run a task for a single project:** - ```shell {% frame="none" %} + ```shell nx build my-app nx test my-lib ``` **Run tasks for multiple projects:** - ```shell {% frame="none" %} + ```shell nx run-many -t build test lint ``` diff --git a/astro-docs/src/content/docs/reference/Deprecated/as-provided-vs-derived.mdoc b/astro-docs/src/content/docs/reference/Deprecated/as-provided-vs-derived.mdoc index 1514330dafa3b..46aab619c1752 100644 --- a/astro-docs/src/content/docs/reference/Deprecated/as-provided-vs-derived.mdoc +++ b/astro-docs/src/content/docs/reference/Deprecated/as-provided-vs-derived.mdoc @@ -28,7 +28,7 @@ You can use [Nx Console](/docs/getting-started/editor-setup) for an intuitive ex To mitigate the impact of this change of direction, Nx will prompt you when running most generators until Nx 20. We know changing these habits may take time so this prompt allows you to choose the previous behavior. -```{% title="nx g lib my-lib --directory=shared/my-lib" frame="none" %} +```text {% title="nx g lib my-lib --directory=shared/my-lib" frame="none" %} ✔ Which generator would you like to use? · @nx/node:library NX Generating @nx/node:library diff --git a/astro-docs/src/content/docs/reference/Nx Cloud/config.mdoc b/astro-docs/src/content/docs/reference/Nx Cloud/config.mdoc index 1254d5eed2ada..749b7a5b38f64 100644 --- a/astro-docs/src/content/docs/reference/Nx Cloud/config.mdoc +++ b/astro-docs/src/content/docs/reference/Nx Cloud/config.mdoc @@ -84,7 +84,7 @@ Targets can be marked as cacheable either in the `targetDefaults` in `nx.json` o By default, Nx Cloud requests will time out after 10 seconds. `NX_CLOUD_NO_TIMEOUTS` disables the timeout. -```shell {% frame="none" %} +```shell NX_CLOUD_NO_TIMEOUTS=true nx run-many -t build ``` @@ -136,7 +136,7 @@ In `nx.json`, locate the `taskRunnerOptions` property. Under its "options" prope To instead use an environment variable to provide your secret key, run any Nx command as follows: -```shell {% frame="none" %} +```shell NX_CLOUD_ENCRYPTION_KEY=myEncryptionKey nx build my-project ``` diff --git a/astro-docs/src/content/docs/reference/Nx Cloud/custom-steps.mdoc b/astro-docs/src/content/docs/reference/Nx Cloud/custom-steps.mdoc index 6b7c0156d6aed..47ba0868ec4cc 100644 --- a/astro-docs/src/content/docs/reference/Nx Cloud/custom-steps.mdoc +++ b/astro-docs/src/content/docs/reference/Nx Cloud/custom-steps.mdoc @@ -109,7 +109,7 @@ While you can use both `env` and `inputs` to pass values to custom steps, it is Just like launch templates, you should validate your custom steps to ensure they are defined correctly. In your CI pipeline, use the `nx-cloud validate` command with the `--step-file` flag to ensure nobody merges in invalid changes to your step: -```shell {% frame="none" %} +```shell nx-cloud validate --workflow-file=./.nx/workflows/custom-steps.yaml --step-file ``` diff --git a/astro-docs/src/content/docs/reference/Nx Cloud/launch-templates.mdoc b/astro-docs/src/content/docs/reference/Nx Cloud/launch-templates.mdoc index 503600c92d1b1..8616058de3ea2 100644 --- a/astro-docs/src/content/docs/reference/Nx Cloud/launch-templates.mdoc +++ b/astro-docs/src/content/docs/reference/Nx Cloud/launch-templates.mdoc @@ -37,7 +37,7 @@ launch-templates: template-two: ``` -``` +```shell nx-cloud start-ci-run --distribute-on="3 template-one" ``` @@ -278,6 +278,7 @@ This can be useful if we have a set of quick enough steps, such as restoring fro grouped together logically. The below cache steps will also be collapsed together in the Agents UI, making the config look cleaner: ```yaml +// ./nx/workflows/agents.yaml - group-name: Restore Cache steps: - name: Restore Node Modules Cache @@ -391,15 +392,15 @@ launch-templates: These templates can be used by passing the number of agents desired, and the template name via `--distribute-on` when starting your CI run. -``` +```shell nx-cloud start-ci-run --distribute-on="4 my-linux-medium-js" ``` -``` +```shell nx-cloud start-ci-run --distribute-on="4 my-linux-large-js" ``` -``` +```shell nx-cloud start-ci-run --distribute-on="4 my-linux-large-rust" ``` @@ -415,7 +416,7 @@ within the launch template and all respective inputs within each step are approp To do this, run the `nx-cloud validate` command, with the path to the launch template: -```shell {% frame="none" %} +```shell nx-cloud validate --workflow-file=./.nx/workflows/agents.yaml ``` @@ -423,7 +424,7 @@ nx-cloud validate --workflow-file=./.nx/workflows/agents.yaml If you need to send environment variables to agents, you can use the [--with-env-vars](/docs/reference/nx-cloud-cli#withenvvars-nx-agents-only) flag on the `nx-cloud start-ci-run` command. You can pass a specific list of environment variables like this: -``` +```shell nx-cloud start-ci-run --distribute-on="8 linux-medium-js" --with-env-vars="VAR1,VAR2" ``` @@ -472,7 +473,7 @@ launch-templates: Pass `SOME_AUTH_TOKEN` via `--with-env-vars` -``` +```shell # this assumes SOME_AUTH_TOKEN is already defined on the main agent nx-cloud start-ci-run --distribute-on="5 my-linux-medium-js" --with-env-vars="SOME_AUTH_TOKEN" ``` @@ -667,7 +668,7 @@ distribute-on: Then you can pass the path to the file to the `--distribute-on` parameter. -``` +```shell nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" ``` diff --git a/astro-docs/src/content/docs/reference/Powerpack/conformance/Generators.mdoc b/astro-docs/src/content/docs/reference/Powerpack/conformance/Generators.mdoc index 9839bb052627d..f95ad74bb0e5e 100644 --- a/astro-docs/src/content/docs/reference/Powerpack/conformance/Generators.mdoc +++ b/astro-docs/src/content/docs/reference/Powerpack/conformance/Generators.mdoc @@ -13,7 +13,7 @@ Create a new conformance rule **Usage:** -```shell {% frame="none" %} +```shell nx g @nx/conformance:create-rule [options] ``` @@ -31,6 +31,6 @@ Generate a Nx workspace with a working conformance rule **Usage:** -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest --preset=@nx/conformance ``` diff --git a/astro-docs/src/content/docs/reference/Powerpack/conformance/overview.mdoc b/astro-docs/src/content/docs/reference/Powerpack/conformance/overview.mdoc index ff9db3be1b5de..2c20f4288acdb 100644 --- a/astro-docs/src/content/docs/reference/Powerpack/conformance/overview.mdoc +++ b/astro-docs/src/content/docs/reference/Powerpack/conformance/overview.mdoc @@ -25,7 +25,7 @@ In order to use `@nx/conformance`, you need to have an active Powerpack or [Nx E 1. [Activate Powerpack](/docs/enterprise/activate-powerpack) if you haven't already 2. Install the package - ```shell {% frame="none" %} + ```shell nx add @nx/conformance ``` diff --git a/astro-docs/src/content/docs/reference/Powerpack/owners/Generators.mdoc b/astro-docs/src/content/docs/reference/Powerpack/owners/Generators.mdoc index 3ba307183651d..2e859d8f23ae2 100644 --- a/astro-docs/src/content/docs/reference/Powerpack/owners/Generators.mdoc +++ b/astro-docs/src/content/docs/reference/Powerpack/owners/Generators.mdoc @@ -13,7 +13,7 @@ Initialize the owners plugin **Usage:** -```shell {% frame="none" %} +```shell nx g @nx/owners:init ``` @@ -24,6 +24,6 @@ Sync Nx Powerpack Owners config to a `CODEOWNERS` file **Usage:** -```shell {% frame="none" %} +```shell nx g @nx/owners:sync-codeowners-file ``` diff --git a/astro-docs/src/content/docs/reference/Powerpack/owners/overview.mdoc b/astro-docs/src/content/docs/reference/Powerpack/owners/overview.mdoc index 188f1f592c23b..c2b8ab19b13fb 100644 --- a/astro-docs/src/content/docs/reference/Powerpack/owners/overview.mdoc +++ b/astro-docs/src/content/docs/reference/Powerpack/owners/overview.mdoc @@ -20,7 +20,7 @@ In order to use `@nx/owners`, you need to have an active Powerpack license. If y 1. [Activate Powerpack](/docs/enterprise/activate-powerpack) if you haven't already 2. Install the package - ```shell {% frame="none" %} + ```shell nx add @nx/owners ``` diff --git a/astro-docs/src/content/docs/reference/Remote Cache Plugins/azure-cache/overview.mdoc b/astro-docs/src/content/docs/reference/Remote Cache Plugins/azure-cache/overview.mdoc index e82a1f1b00654..3585d338d49e7 100644 --- a/astro-docs/src/content/docs/reference/Remote Cache Plugins/azure-cache/overview.mdoc +++ b/astro-docs/src/content/docs/reference/Remote Cache Plugins/azure-cache/overview.mdoc @@ -55,7 +55,7 @@ Includes everything from Nx Cloud, plus: Run the following command: -```shell {% frame="none" %} +```shell nx add @nx/azure-cache ``` @@ -63,7 +63,7 @@ This will add the `@nx/azure-cache` NPM package and automatically configure it f The key will be saved in your repository (`.nx/key/key.ini`) and should be committed so that every developer has access to it. If your repository is public (or in CI), you can also use an environment variable: -``` +```dotenv // .env NX_KEY=YOUR_ACTIVATION_KEY ``` diff --git a/astro-docs/src/content/docs/reference/Remote Cache Plugins/gcs-cache/overview.mdoc b/astro-docs/src/content/docs/reference/Remote Cache Plugins/gcs-cache/overview.mdoc index 35944be23397c..b23f8efd7a587 100644 --- a/astro-docs/src/content/docs/reference/Remote Cache Plugins/gcs-cache/overview.mdoc +++ b/astro-docs/src/content/docs/reference/Remote Cache Plugins/gcs-cache/overview.mdoc @@ -55,7 +55,7 @@ Includes everything from Nx Cloud, plus: Run the following command: -```shell {% frame="none" %} +```shell nx add @nx/gcs-cache ``` @@ -63,7 +63,7 @@ This will add the `@nx/gcs-cache` NPM package and automatically configure it for The key will be saved in your repository (`.nx/key/key.ini`) and should be committed so that every developer has access to it. If your repository is public (or in CI), you can also use an environment variable: -``` +```dotenv // .env NX_KEY=YOUR_ACTIVATION_KEY ``` diff --git a/astro-docs/src/content/docs/reference/Remote Cache Plugins/s3-cache/overview.mdoc b/astro-docs/src/content/docs/reference/Remote Cache Plugins/s3-cache/overview.mdoc index ef1c39be09abd..1d71147115948 100644 --- a/astro-docs/src/content/docs/reference/Remote Cache Plugins/s3-cache/overview.mdoc +++ b/astro-docs/src/content/docs/reference/Remote Cache Plugins/s3-cache/overview.mdoc @@ -55,7 +55,7 @@ Includes everything from Nx Cloud, plus: Run the following command: -```shell {% frame="none" %} +```shell nx add @nx/s3-cache ``` @@ -63,7 +63,7 @@ This will add the `@nx/s3-cache` NPM package and automatically configure it for The key will be saved in your repository (`.nx/key/key.ini`) and should be committed so that every developer has access to it. If your repository is public (or in CI) you can also use an environment variable: -``` +```dotenv // .env NX_KEY=YOUR_ACTIVATION_KEY ``` diff --git a/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/Generators.mdoc b/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/Generators.mdoc index 3a149f590b40c..0235d9a87052e 100644 --- a/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/Generators.mdoc +++ b/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/Generators.mdoc @@ -13,7 +13,7 @@ Initialize the shared-fs-cache plugin **Usage:** -```shell {% frame="none" %} +```shell nx g @nx/shared-fs-cache:init ``` diff --git a/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/overview.mdoc b/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/overview.mdoc index 03b09cd058c50..c9732e962a9e4 100644 --- a/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/overview.mdoc +++ b/astro-docs/src/content/docs/reference/Remote Cache Plugins/shared-fs-cache/overview.mdoc @@ -31,7 +31,7 @@ CREEP (CVE-2025-36852) is a critical vulnerability in bucket-based self-hosted r Run the following command: -```shell {% frame="none" %} +```shell nx add @nx/shared-fs-cache ``` @@ -39,7 +39,7 @@ This will add the `@nx/shared-fs-cache` NPM package and automatically configure The key will be saved in your repository (`.nx/key/key.ini`) and should be committed so that every developer has access to it. If your repository is public (or in CI), you can also use an environment variable: -``` +```dotenv // .env NX_KEY=YOUR_ACTIVATION_KEY ``` diff --git a/astro-docs/src/content/docs/reference/inputs.mdoc b/astro-docs/src/content/docs/reference/inputs.mdoc index da7ede65ceb64..75f0e29f888cb 100644 --- a/astro-docs/src/content/docs/reference/inputs.mdoc +++ b/astro-docs/src/content/docs/reference/inputs.mdoc @@ -270,7 +270,7 @@ It is common for most tasks to consider a set of inputs for the project it belon All of the above inputs are taken into consideration when the following command is run: -```shell {% frame="none" %} +```shell nx test myreactapp ``` diff --git a/astro-docs/src/content/docs/reference/nx-cloud-cli.mdoc b/astro-docs/src/content/docs/reference/nx-cloud-cli.mdoc index de58584e3c962..05d2bf0c7870f 100644 --- a/astro-docs/src/content/docs/reference/nx-cloud-cli.mdoc +++ b/astro-docs/src/content/docs/reference/nx-cloud-cli.mdoc @@ -19,7 +19,7 @@ This command is the same as running `nx login`. **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud login [nxCloudUrl] ``` @@ -64,7 +64,7 @@ Revoke a personal access token from your local environment. This will remove the **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud logout ``` @@ -74,7 +74,7 @@ To provision more than one personal access token for multiple contexts (e.g. hom **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud configure ``` @@ -87,13 +87,13 @@ npx nx-cloud configure #### Examples -```shell {% frame="none" %} +```shell npx nx-cloud configure --personalAccessToken=SOME_ACCESS_TOKEN ``` To configure multiple tokens for different instances of the Nx Cloud app: -```shell {% frame="none" %} +```shell npx nx-cloud configure --personalAccessToken=SOME_ACCESS_TOKEN --nx-cloud-url=https://nx-cloud.my-domain.app ``` @@ -105,7 +105,7 @@ If you are connecting to Nx Cloud with a workspace that is version 19.6 or lower **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud convert-to-nx-cloud-id ``` @@ -115,7 +115,7 @@ At the beginning of your main job, invoke `npx nx-cloud start-ci-run`. This tell **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud start-ci-run ``` @@ -266,7 +266,7 @@ Enable [AI-powered self-healing](/docs/features/ci-features/self-healing-ci) for Examples: -```shell {% frame="none" %} +```shell # Enable for lint and format tasks only npx nx-cloud start-ci-run --fix-tasks="*lint*,*format*" --no-distribution @@ -286,7 +286,7 @@ Automatically apply [AI-generated fixes](/docs/features/ci-features/self-healing Examples: -```shell {% frame="none" %} +```shell # Auto-apply fixes for linting tasks only npx nx-cloud start-ci-run --auto-apply-fixes="*lint*" --no-distribution @@ -304,13 +304,13 @@ individual commands as follows: Explicitly enable distribution: -```shell {% frame="none"%} +```shell nx affected -t build --agents ``` Explicitly disable distribution: -```shell {% frame="none"%} +```shell nx affected -t build --no-agents ``` @@ -319,13 +319,13 @@ nx affected -t build --no-agents Explicitly enable distribution: -```shell {% frame="none"%} +```shell nx affected -t build --dte ``` Explicitly disable distribution: -```shell {% frame="none"%} +```shell nx affected -t build --no-dte ``` @@ -342,7 +342,7 @@ and terminate associated agents automatically. **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud stop-all-agents ``` @@ -352,7 +352,7 @@ Explicitly complete a CI run when using `--require-explicit-completion` with `st **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud complete-ci-run ``` @@ -362,7 +362,7 @@ Remove temporary marker files created by `start-ci-run` if accidentally run loca **Usage:** -```shell {% frame="none" %} +```shell npx nx-cloud cleanup ``` @@ -370,6 +370,6 @@ npx nx-cloud cleanup You can get help for any command by adding the `--help` flag: -```shell {% frame="none" %} +```shell npx nx-cloud --help ``` diff --git a/astro-docs/src/content/docs/reference/project-configuration.mdoc b/astro-docs/src/content/docs/reference/project-configuration.mdoc index e1f89306dae3d..f5d7d14741142 100644 --- a/astro-docs/src/content/docs/reference/project-configuration.mdoc +++ b/astro-docs/src/content/docs/reference/project-configuration.mdoc @@ -15,7 +15,7 @@ A project's configuration is constructed by Nx from three sources: Each source will [overwrite the previous source](/docs/guides/tasks--caching/pass-args-to-commands). That means `targetDefaults` will overwrite inferred tasks and project level configuration will overwrite both `targetDefaults` and inferred tasks. The combined project configuration can be viewed in the project details view by using [Nx Console](/docs/getting-started/editor-setup) in your IDE or by running: -```shell {% frame="none" %} +```shell nx show project myproject --web ``` diff --git a/astro-docs/src/content/docs/technologies/angular/Guides/dynamic-module-federation-with-angular.mdoc b/astro-docs/src/content/docs/technologies/angular/Guides/dynamic-module-federation-with-angular.mdoc index 052747e80eb7f..6e83ece8a696c 100644 --- a/astro-docs/src/content/docs/technologies/angular/Guides/dynamic-module-federation-with-angular.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/Guides/dynamic-module-federation-with-angular.mdoc @@ -47,7 +47,7 @@ To start with, we need to create a new Nx Workspace and add the Nx Angular plugi {% tabs %} {% tabitem label="npm" %} -```{% title="npx create-nx-workspace@latest ng-mf --preset=apps" frame="terminal" %} +```text {% title="npx create-nx-workspace@latest ng-mf --preset=apps" frame="terminal" %} NX Let's create a new workspace [https://nx.dev/getting-started/intro] ✔ Which CI provider would you like to use? · skip @@ -57,7 +57,7 @@ To start with, we need to create a new Nx Workspace and add the Nx Angular plugi Next run: -```shell {% frame="none" %} +```shell cd ng-mf npx nx add @nx/angular ``` @@ -65,7 +65,7 @@ npx nx add @nx/angular {% /tabitem %} {% tabitem label="yarn" %} -```{% title="yarn create nx-workspace ng-mf --preset=apps" frame="terminal" %} +```text {% title="yarn create nx-workspace ng-mf --preset=apps" frame="terminal" %} NX Let's create a new workspace [https://nx.dev/getting-started/intro] ✔ Which CI provider would you like to use? · skip @@ -75,7 +75,7 @@ npx nx add @nx/angular Next run: -```shell {% frame="none" %} +```shell cd ng-mf yarn nx add @nx/angular ``` @@ -83,7 +83,7 @@ yarn nx add @nx/angular {% /tabitem %} {% tabitem label="pnpm" %} -```{% title="pnpx create-nx-workspace@latest ng-mf --preset=apps" frame="terminal" %} +```text {% title="pnpx create-nx-workspace@latest ng-mf --preset=apps" frame="terminal" %} NX Let's create a new workspace [https://nx.dev/getting-started/intro] ✔ Which CI provider would you like to use? · skip @@ -93,7 +93,7 @@ yarn nx add @nx/angular Next run: -```shell {% frame="none" %} +```shell cd ng-mf pnpx nx add @nx/angular ``` @@ -107,7 +107,7 @@ We need to generate two applications that support Module Federation. We'll start with the **Admin Dashboard** application which will act as a host application for the Micro-Frontends (_MFEs_): -```shell {% frame="none" %} +```shell nx g @nx/angular:host apps/dashboard --prefix=ng-mf ``` @@ -124,7 +124,7 @@ The `host` generator will create and modify the files needed to set up the Angul Now, let's generate the **Login** application as a remote application that will be consumed by the **Dashboard** host application. -```shell {% frame="none" %} +```shell nx g @nx/angular:remote apps/login --prefix=ng-mf --host=dashboard ``` @@ -211,7 +211,7 @@ We'll start by building the **Login** application, which will consist of a login Let's create a user data-access library that will be shared between the host application and the remote application. This will be used to determine if there is an authenticated user as well as providing logic for authenticating the user. -```shell {% frame="none" %} +```shell nx g @nx/angular:lib libs/shared/data-access-user ``` @@ -219,7 +219,7 @@ This will scaffold a new library for us to use. We need an Angular Service that we will use to hold state: -```shell {% frame="none" %} +```shell nx g @nx/angular:service user --project=data-access-user ``` @@ -326,7 +326,7 @@ This could be improved with things like error handling, but for the purposes of Now let's serve the application and view it in a browser to check that the form renders correctly. -```shell {% frame="none" %} +```shell nx run login:serve ``` @@ -413,7 +413,7 @@ export const appRoutes: Route[] = [ We can now run both the **Dashboard** and **Login** applications: -```shell {% frame="none" %} +```shell nx serve dashboard --devRemotes=login ``` @@ -519,7 +519,7 @@ That's all the changes required to replace Static Module Federation with Dynamic Running: -```shell {% frame="none" %} +```shell nx serve dashboard --devRemotes=login ``` @@ -539,7 +539,7 @@ To showcase this, let's create a new Host application that will use our previous Run the following command to generate a new Host application that is preconfigured for Dynamic Federation and add specify the **Login** Remote application we want to add: -```shell {% frame="none" %} +```shell nx g @nx/angular:host apps/employee --remotes=login --dynamic ``` @@ -557,7 +557,7 @@ You should take a look at the files generated and see how the **Login** Remote a We're going to demonstrate how when specifying a dynamic Host when adding a new Remote application, the Remote application will be added to the Host's Micro Frontend Manifest file correctly. -```shell {% frame="none" %} +```shell nx g @nx/angular:remote apps/todo --host=employee ``` diff --git a/astro-docs/src/content/docs/technologies/angular/Guides/module-federation-with-ssr.mdoc b/astro-docs/src/content/docs/technologies/angular/Guides/module-federation-with-ssr.mdoc index 711f29c46f009..af35137c4f37b 100644 --- a/astro-docs/src/content/docs/technologies/angular/Guides/module-federation-with-ssr.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/Guides/module-federation-with-ssr.mdoc @@ -14,7 +14,7 @@ This guide will walk you through creating a Module Federated setup with Server S Run the following command with the options listed to create an empty workspace. -```{% title="npx create-nx-workspace@latest myorg --preset=apps" frame="terminal" %} +```text {% title="npx create-nx-workspace@latest myorg --preset=apps" frame="terminal" %} NX Let's create a new workspace [https://nx.dev/getting-started/intro] @@ -34,7 +34,7 @@ Make sure to install the `@nx/angular` or `@nx/react` versions that matches the {% tabitem label="Angular" %} -```shell {% frame="none" %} +```shell nx add @nx/angular ``` @@ -43,7 +43,7 @@ nx add @nx/angular {% tabitem label="React" %} -```shell {% frame="none" %} +```shell nx add @nx/react ``` @@ -67,7 +67,7 @@ Nx allows you to do this with a single command: {% tabitem label="Angular" %} -```shell {% frame="none" %} +```shell npx nx g @nx/angular:host apps/store --ssr --remotes=product,checkout ``` @@ -76,7 +76,7 @@ npx nx g @nx/angular:host apps/store --ssr --remotes=product,checkout {% tabitem label="React" %} -```shell {% frame="none" %} +```shell npx nx g @nx/react:host apps/store --ssr --remotes=product,checkout ``` @@ -97,7 +97,7 @@ To do this, run: {% tabitem label="Angular" %} -```shell {% frame="none" %} +```shell npx nx serve-ssr store ``` @@ -106,7 +106,7 @@ npx nx serve-ssr store {% tabitem label="React" %} -```shell {% frame="none" %} +```shell npx nx serve store ``` @@ -127,7 +127,7 @@ To serve the `store` application and watch for changes on the `checkout` applica {% tabitem label="Angular" %} -```shell {% frame="none" %} +```shell npx nx serve-ssr store --devRemotes=checkout ``` @@ -136,7 +136,7 @@ npx nx serve-ssr store --devRemotes=checkout {% tabitem label="React" %} -```shell {% frame="none" %} +```shell npx nx serve store --devRemotes=checkout ``` diff --git a/astro-docs/src/content/docs/technologies/angular/Guides/nx-and-angular.mdoc b/astro-docs/src/content/docs/technologies/angular/Guides/nx-and-angular.mdoc index 556a080b6e999..be130069930aa 100644 --- a/astro-docs/src/content/docs/technologies/angular/Guides/nx-and-angular.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/Guides/nx-and-angular.mdoc @@ -77,7 +77,7 @@ Nx is not just exclusively for monorepos, but can create You can create a new Nx single-project workspace using the following command: -```shell {% frame="none" %} +```shell npx create-nx-workspace myngapp --preset=angular-standalone ``` @@ -144,13 +144,13 @@ Nx comes with slightly different terminology than the Angular CLI for some featu **Angular Schematics** are called [Generators](/docs/features/generate-code) in Nx. You can invoke them in the same way as you would with the Angular CLI, but you use the `nx` command instead of `ng`: -```shell {% frame="none" %} +```shell npx nx g @nx/angular:component apps/my-app/src/lib/my-component/my-component ``` You can also run Angular Schematics through the Nx CLI. So something like this works as well: -```shell {% frame="none" %} +```shell npx nx g @schematics/angular:component my-component ``` @@ -162,7 +162,7 @@ Support to run Angular Devkit builders and schematics is enabled by installing t Commands are run in the very same way as with the Angular CLI. You just switch `ng` with `nx`. For example: -```shell {% frame="none" %} +```shell npx nx serve ``` @@ -183,7 +183,7 @@ But Nx expands beyond just that, offering automated integration with a lot of mo Like the Angular CLI, Nx has a command that allows you to upgrade your existing workspace tools, packages, and source code to the next version. Instead of `ng update`, you run `nx migrate`: -```shell {% frame="none" %} +```shell npx nx migrate latest ``` @@ -207,7 +207,7 @@ To reiterate: `nx migrate` runs the migrations written by the Angular team the s The [`nx add` command](/docs/reference/nx-commands#nx-add) is similar to the `ng add` command. It installs a given package specifier (e.g. `@nx/react`, `@nx/react@18.1.0`, `@nx/react@latest`) and it runs an `init` or `ng-add` generator if the installed package contains it. -```shell {% frame="none" %} +```shell nx add [package] ``` @@ -216,7 +216,7 @@ The command was introduced in **Nx 17.3.0**. If you're using an older version, y {% tabs %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm add [package] nx g [package]:ng-add ``` @@ -225,7 +225,7 @@ nx g [package]:ng-add {% tabitem label="yarn" %} -```shell {% frame="none" %} +```shell yarn add [package] nx g [package]:ng-add ``` @@ -234,7 +234,7 @@ nx g [package]:ng-add {% tabitem label="pnpm" %} -```shell {% frame="none" %} +```shell pnpm add [package] nx g [package]:ng-add ``` @@ -243,7 +243,7 @@ nx g [package]:ng-add {% tabitem label="bun" %} -```shell {% frame="none" %} +```shell bun add [package] nx g [package]:ng-add ``` @@ -406,7 +406,7 @@ And if you ever need to expand beyond Angular or diversify your stack, you can s Migrating an Angular CLI project to Nx can be done by running -```shell {% frame="none" %} +```shell npx nx@latest init ``` diff --git a/astro-docs/src/content/docs/technologies/angular/Guides/nx-devkit-angular-devkit.mdoc b/astro-docs/src/content/docs/technologies/angular/Guides/nx-devkit-angular-devkit.mdoc index 66655643551fb..9c99893025934 100644 --- a/astro-docs/src/content/docs/technologies/angular/Guides/nx-devkit-angular-devkit.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/Guides/nx-devkit-angular-devkit.mdoc @@ -94,7 +94,7 @@ export default function (options: Schema): Rule { The Nx CLI can invoke Nx Generator or Angular Schematics directly. When the user runs: -```shell {% frame="none" %} +```shell nx g mygenerator params nx g myschematic params ``` diff --git a/astro-docs/src/content/docs/technologies/angular/Guides/setup-incremental-builds-angular.mdoc b/astro-docs/src/content/docs/technologies/angular/Guides/setup-incremental-builds-angular.mdoc index 1505efc957b50..6e8b6c0698674 100644 --- a/astro-docs/src/content/docs/technologies/angular/Guides/setup-incremental-builds-angular.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/Guides/setup-incremental-builds-angular.mdoc @@ -15,7 +15,7 @@ To enable incremental builds you need to use buildable libraries. You can generate a new buildable library with: -```shell {% frame="none" %} +```shell nx g @nx/angular:lib libs/my-lib --buildable ``` @@ -252,13 +252,13 @@ required executors you can add it to the `targetDefaults` section of the `nx.jso To build an application incrementally use the following command: -```shell {% frame="none" %} +```shell nx build my-app --parallel ``` To serve an application incrementally use this command: -```shell {% frame="none" %} +```shell nx serve my-app ``` diff --git a/astro-docs/src/content/docs/technologies/angular/Migration/angular.mdoc b/astro-docs/src/content/docs/technologies/angular/Migration/angular.mdoc index 5a8392ddbcb13..1f4209df667d5 100644 --- a/astro-docs/src/content/docs/technologies/angular/Migration/angular.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/Migration/angular.mdoc @@ -12,7 +12,7 @@ Within an Nx workspace, you gain many capabilities that help you build applicati You can migrate to a standalone Angular app with the command: -```shell {% frame="none" %} +```shell npx nx@latest init ``` @@ -30,7 +30,7 @@ This will enable you to use the Nx CLI in your existing Angular CLI workspace wh If you want to migrate your Angular CLI project to an Nx Monorepo, run the following command: -```shell {% frame="none" %} +```shell npx nx@latest init --integrated ``` @@ -137,7 +137,7 @@ Now that we're working on the CI pipeline, it is important for your changes to b Now connect your repository to Nx Cloud with the following command: -```shell {% frame="none" %} +```shell npx nx@latest connect ``` @@ -151,7 +151,7 @@ Once the PR is created, merge it into your main branch. And make sure you pull the latest changes locally: -```shell {% frame="none" %} +```shell git pull ``` @@ -161,7 +161,7 @@ You should now have an `nxCloudId` property specified in the `nx.json` file. Use the following command to generate a CI workflow file. -```shell {% frame="none" %} +```shell npx nx generate ci-workflow --ci=github ``` @@ -201,7 +201,7 @@ jobs: Commit the changes and open a new PR on GitHub. -```shell {% frame="none" %} +```shell git add . git commit -m 'add CI workflow file' git push origin add-workflow diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-config.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-config.mdoc index ce5b1431b0b7c..662df83acdd35 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-config.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-config.mdoc @@ -6,7 +6,7 @@ sidebar: filter: 'type:References' --- -```shell {% frame="none" %} +```shell import { createConfig } from '@nx/angular-rsbuild'; ``` diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-server.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-server.mdoc index 6474eff50aaf4..336ce1e18284b 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-server.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rsbuild/create-server.mdoc @@ -6,7 +6,7 @@ sidebar: filter: 'type:References' --- -```shell {% frame="none" %} +```shell import { createServer } from '@nx/angular-rsbuild/ssr'; ``` diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/getting-started.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/getting-started.mdoc index a14e25037df4f..0590656b3eca4 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/getting-started.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/getting-started.mdoc @@ -78,14 +78,14 @@ You can learn more about Nx migrations [here](/docs/features/automate-updating-d {% tabs %} {% tabitem label="Client-Side Rendering (CSR)" %} -```shell {% frame="none" %} +```shell npx nx g @nx/angular:app myapp --bundler=rspack ``` {% /tabitem %} {% tabitem label="Server-Side Rendering (SSR)" %} -```shell {% frame="none" %} +```shell npx nx g @nx/angular:app myapp --bundler=rspack --ssr ``` @@ -110,7 +110,7 @@ The `project.json` file does not contain the `targets.build` or `targets.serve` To build your Angular Rspack application, run the following command: -```shell {% frame="none" %} +```shell npx nx build myapp ``` @@ -121,7 +121,7 @@ If you are using the Angular Rspack application with Server-Side Rendering (SSR) To serve your Angular Rspack application, run the following command: -```shell {% frame="none" %} +```shell npx nx serve myapp ``` diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/handling-configurations.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/handling-configurations.mdoc index cac2b7cf5c822..e85343573d25b 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/handling-configurations.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/handling-configurations.mdoc @@ -54,6 +54,6 @@ If a production configuration is not provided, the default configuration is used To run the build with the `production` configuration: -```shell {% frame="none" %} +```shell NGRS_CONFIG=production npx myapp build ``` diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/internationalization.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/internationalization.mdoc index d8db15d779e2d..221dd9c6f6105 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/internationalization.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/internationalization.mdoc @@ -71,7 +71,7 @@ export default createConfig( After configuring the Rspack configuration, you can run the build with the following command: -```shell {% frame="none" %} +```shell npx nx build my-app ``` diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/migrate-from-webpack.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/migrate-from-webpack.mdoc index c6bfeafa8cc23..fc093bb741429 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/migrate-from-webpack.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rspack/Guides/migrate-from-webpack.mdoc @@ -20,7 +20,7 @@ Nx provides a generator to convert existing Angular Webpack projects to use `@nx At the root of your project, run the following command: -```shell {% frame="none" %} +```shell npx nx@latest init ``` @@ -30,7 +30,7 @@ With Nx now initialized, the `@nx/angular` plugin will have been installed provi In particular, the `@nx/angular:convert-to-rspack` generator will convert an Angular project to use Rspack. To use it, run the following command: -```shell {% frame="none" %} +```shell npx nx g convert-to-rspack ``` @@ -38,7 +38,7 @@ npx nx g convert-to-rspack After running the generator, you can run tasks such as `build` and `serve` to build and serve your application. -```shell {% frame="none" %} +```shell npx nx build yourProjectName npx nx serve yourProjectName ``` diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-config.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-config.mdoc index 4553922aeae84..35dc85f21ca5d 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-config.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-config.mdoc @@ -6,7 +6,7 @@ sidebar: filter: 'type:References' --- -```shell {% frame="none" %} +```shell import { createConfig } from '@nx/angular-rspack'; ``` diff --git a/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-server.mdoc b/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-server.mdoc index 3334cafa4b8f2..7cd14abe5b2b7 100644 --- a/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-server.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/angular-rspack/create-server.mdoc @@ -6,7 +6,7 @@ sidebar: filter: 'type:References' --- -```shell {% frame="none" %} +```shell import { createServer } from '@nx/angular-rspack/ssr'; ``` diff --git a/astro-docs/src/content/docs/technologies/angular/introduction.mdoc b/astro-docs/src/content/docs/technologies/angular/introduction.mdoc index 65cd7ce4f0b01..6532820a6cca9 100644 --- a/astro-docs/src/content/docs/technologies/angular/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/angular/introduction.mdoc @@ -43,7 +43,7 @@ Make sure to install the `@nx/angular` version that matches the version of `nx` In any Nx workspace, you can install `@nx/angular` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/angular ``` @@ -59,7 +59,7 @@ For a full tutorial experience, follow the [Angular Monorepo Tutorial](/docs/get It's straightforward to generate an Angular application: -```shell {% frame="none" %} +```shell nx g @nx/angular:app apps/appName ``` @@ -71,7 +71,7 @@ By default, the application will be generated with: We can then serve, build, test, lint, and run e2e tests on the application with the following commands: -```shell {% frame="none" %} +```shell nx serve appName nx build appName nx test appName @@ -83,7 +83,7 @@ nx e2e appName Generating an Angular library is very similar to generating an application: -```shell {% frame="none" %} +```shell nx g @nx/angular:lib libs/libName ``` @@ -94,7 +94,7 @@ By default, the library will be generated with: We can then test and lint the library with the following commands: -```shell {% frame="none" %} +```shell nx test libName nx lint libName ``` @@ -111,7 +111,7 @@ If you try to invoke a generator that is not present in `@nx/angular`, the reque to `@schematics/angular`. So, even though there is no `@nx/angular:service` generator, the following command will successfully create a service: -```shell {% frame="none" %} +```shell nx g @nx/angular:service apps/appName/src/lib/my-service/my-service ``` diff --git a/astro-docs/src/content/docs/technologies/build-tools/docker/introduction.mdoc b/astro-docs/src/content/docs/technologies/build-tools/docker/introduction.mdoc index 107a3f8f44f9a..25e400ce951ce 100644 --- a/astro-docs/src/content/docs/technologies/build-tools/docker/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/build-tools/docker/introduction.mdoc @@ -15,7 +15,7 @@ It will also provide a `nx-release-publish` target for publishing docker images In any Nx workspace, you can install `@nx/docker` by running the following command: -```shell frame="none" +```shell nx add @nx/docker ``` diff --git a/astro-docs/src/content/docs/technologies/build-tools/esbuild/introduction.mdoc b/astro-docs/src/content/docs/technologies/build-tools/esbuild/introduction.mdoc index 9f1144f44b903..e25b26db91d59 100644 --- a/astro-docs/src/content/docs/technologies/build-tools/esbuild/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/build-tools/esbuild/introduction.mdoc @@ -25,7 +25,7 @@ Make sure to install the `@nx/esbuild` version that matches the version of `nx` In any Nx workspace, you can install `@nx/esbuild` by running the following command: -```shell frame="none" +```shell nx add @nx/esbuild ``` @@ -37,7 +37,7 @@ This will install the correct version of `@nx/esbuild`. You can add a new library that builds using esbuild with: -```shell frame="none" +```shell nx g @nx/js:lib libs/mylib --bundler=esbuild ``` @@ -47,13 +47,13 @@ This command will install the esbuild plugin if needed, and set `@nx/esbuild:esb If you already have a JS project that you want to use esbuild for, run this command: -```shell frame="none" +```shell nx g @nx/esbuild:configuration 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 frame="none" +```shell nx g @nx/esbuild:configuration mylib --skipValidation ``` @@ -61,7 +61,7 @@ nx g @nx/esbuild:configuration mylib --skipValidation You can run builds with: -```shell frame="none" +```shell nx build mylib ``` @@ -103,7 +103,7 @@ dist/libs/mylib/ 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 frame="none" +```shell nx build mylib --metafile ``` diff --git a/astro-docs/src/content/docs/technologies/build-tools/rollup/introduction.mdoc b/astro-docs/src/content/docs/technologies/build-tools/rollup/introduction.mdoc index 48a79ff8a32a5..d1e3b1f35cac7 100644 --- a/astro-docs/src/content/docs/technologies/build-tools/rollup/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/build-tools/rollup/introduction.mdoc @@ -18,7 +18,7 @@ Make sure to install the `@nx/rollup` version that matches the version of `nx` i In any Nx workspace, you can install `@nx/rollup` by running the following command: -```shell frame="none" +```shell nx add @nx/rollup ``` diff --git a/astro-docs/src/content/docs/technologies/build-tools/rsbuild/introduction.mdoc b/astro-docs/src/content/docs/technologies/build-tools/rsbuild/introduction.mdoc index 0a809ac952f23..2455c58f12f08 100644 --- a/astro-docs/src/content/docs/technologies/build-tools/rsbuild/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/build-tools/rsbuild/introduction.mdoc @@ -18,7 +18,7 @@ Make sure to install the `@nx/rsbuild` version that matches the version of `nx` In any Nx workspace, you can install `@nx/rsbuild` by running the following command: -```shell frame="none" +```shell nx add @nx/rsbuild ``` diff --git a/astro-docs/src/content/docs/technologies/build-tools/rspack/introduction.mdoc b/astro-docs/src/content/docs/technologies/build-tools/rspack/introduction.mdoc index 00c5a938c6631..d8344b93c0144 100644 --- a/astro-docs/src/content/docs/technologies/build-tools/rspack/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/build-tools/rspack/introduction.mdoc @@ -18,7 +18,7 @@ Make sure to install the `@nx/rspack` version that matches the version of `nx` i In any Nx workspace, you can install `@nx/rspack` by running the following command: -```shell frame="none" +```shell nx add @nx/rspack ``` diff --git a/astro-docs/src/content/docs/technologies/build-tools/vite/introduction.mdoc b/astro-docs/src/content/docs/technologies/build-tools/vite/introduction.mdoc index 97b05cc39cd0b..791dc234891c0 100644 --- a/astro-docs/src/content/docs/technologies/build-tools/vite/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/build-tools/vite/introduction.mdoc @@ -23,7 +23,7 @@ Read more about Vite and Vitest in the [Vite documentation](https://vitejs.dev/) Here's an example on how to create a new React app with Vite -```shell frame="none" +```shell npx create-nx-workspace@latest --preset=react-standalone --bundler=vite ``` @@ -35,7 +35,7 @@ Make sure to install the `@nx/vite` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/vite` by running the following command: -```shell frame="none" +```shell nx add @nx/vite ``` diff --git a/astro-docs/src/content/docs/technologies/build-tools/webpack/introduction.mdoc b/astro-docs/src/content/docs/technologies/build-tools/webpack/introduction.mdoc index 73f4c812b9539..d08a25b42661b 100644 --- a/astro-docs/src/content/docs/technologies/build-tools/webpack/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/build-tools/webpack/introduction.mdoc @@ -18,13 +18,13 @@ You can create a new workspace that uses Webpack with one of the following comma - Generate a new standalone React app set up with Webpack -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest --preset=react-standalone --bundler=webpack ``` - Generate a new React monorepo set up with Webpack -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest --preset=react-monorepo --bundler=webpack ``` @@ -36,7 +36,7 @@ Make sure to install the `@nx/webpack` version that matches the version of `nx` In any Nx workspace, you can install `@nx/webpack` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/webpack ``` diff --git a/astro-docs/src/content/docs/technologies/dotnet/Guides/incremental-builds.mdoc b/astro-docs/src/content/docs/technologies/dotnet/Guides/incremental-builds.mdoc index 01240336e3389..a2fe5a1ed76d6 100644 --- a/astro-docs/src/content/docs/technologies/dotnet/Guides/incremental-builds.mdoc +++ b/astro-docs/src/content/docs/technologies/dotnet/Guides/incremental-builds.mdoc @@ -40,7 +40,7 @@ If `WebApi` depends on `ClassLib`, running commands **without** `--no-dependenci ### Without `--no-dependencies` -```shell {% frame="none" %} +```shell nx build WebApi ``` @@ -52,7 +52,7 @@ nx build WebApi - .NET CLI builds ClassLib **again** (duplicate build) - .NET CLI builds WebApi -```shell {% frame="none" %} +```shell nx affected -t build ``` @@ -69,7 +69,7 @@ This means ClassLib is compiled **twice** during affected builds, and the duplic The `@nx/dotnet` plugin automatically adds `--no-dependencies` to build commands, eliminating duplicate builds: -```shell {% frame="none" %} +```shell nx build WebApi ``` @@ -79,7 +79,7 @@ nx build WebApi 3. Nx executes `dotnet build apps/WebApi/WebApi.csproj --no-dependencies` - .NET CLI builds **only** WebApi (skips ClassLib) -```shell {% frame="none" %} +```shell nx affected -t build ``` @@ -97,7 +97,7 @@ Consider a scenario where you modify only `WebApi`, leaving `ClassLib` unchanged ### Without `--no-dependencies` -```shell {% frame="none" %} +```shell nx affected -t build ``` @@ -112,7 +112,7 @@ The cached ClassLib output is effectively wasted because the .NET CLI rebuilds i ### With `--no-dependencies` (default) -```shell {% frame="none" %} +```shell nx affected -t build ``` @@ -165,7 +165,7 @@ The plugin automatically configures all .NET projects with appropriate target de ### Build a single project -```shell {% frame="none" %} +```shell nx build my-project ``` @@ -173,7 +173,7 @@ Builds the specified project and all its dependencies in the correct order. ### Build all affected projects -```shell {% frame="none" %} +```shell nx affected -t build ``` @@ -181,7 +181,7 @@ Builds only projects affected by recent changes, along with their dependencies. ### Build with parallelization -```shell {% frame="none" %} +```shell nx run-many -t build --parallel=3 ``` @@ -205,7 +205,7 @@ Enable [Nx Cloud](https://nx.app) to share build cache across your team and CI/C Use the Nx graph visualization to understand your project dependencies: -```shell {% frame="none" %} +```shell nx graph ``` diff --git a/astro-docs/src/content/docs/technologies/dotnet/introduction.mdoc b/astro-docs/src/content/docs/technologies/dotnet/introduction.mdoc index 51a43f3491492..419d5bacdc93c 100644 --- a/astro-docs/src/content/docs/technologies/dotnet/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/dotnet/introduction.mdoc @@ -34,28 +34,28 @@ You can install Nx globally. Depending on your package manager, use one of the f {% tabs syncKey="package-manager" %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm add --global nx@latest ``` {% /tabitem %} {% tabitem label="Homebrew (macOS, Linux)" %} -```shell {% frame="none" %} +```shell brew install nx ``` {% /tabitem %} {% tabitem label="Chocolatey (Windows)" %} -```shell {% frame="none" %} +```shell choco install nx ``` {% /tabitem %} {% tabitem label="apt (Ubuntu)" %} -```shell {% frame="none" %} +```shell sudo add-apt-repository ppa:nrwl/nx sudo apt update sudo apt install nx @@ -68,13 +68,13 @@ sudo apt install nx In any .NET workspace, run the following command to add Nx and the `@nx/dotnet` plugin: -```shell {% frame="none" %} +```shell nx init ``` Then, you can run .NET tasks using Nx. For example: -```shell {% frame="none" %} +```shell nx build ``` @@ -82,7 +82,7 @@ nx build If you already have an Nx workspace set up, you can add the `@nx/dotnet` plugin by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/dotnet ``` @@ -213,7 +213,7 @@ Alternatively, you can create a new `project.json` file in the root of your proj The `@nx/dotnet` plugin supports MSBuild configurations (Debug, Release, etc.) through Nx's configuration system. You can run tasks with specific configurations: -```shell {% frame="none" %} +```shell # Build with Release configuration nx build my-app --configuration release diff --git a/astro-docs/src/content/docs/technologies/eslint/Guides/eslint.mdoc b/astro-docs/src/content/docs/technologies/eslint/Guides/eslint.mdoc index 7a08b83a01c91..d0896587e61f7 100644 --- a/astro-docs/src/content/docs/technologies/eslint/Guides/eslint.mdoc +++ b/astro-docs/src/content/docs/technologies/eslint/Guides/eslint.mdoc @@ -148,7 +148,7 @@ export default [ Now if we try and run `nx lint tuskdesk` we will get an error -```{% title="nx lint tuskdesk" frame="terminal" %} +```text {% title="nx lint tuskdesk" frame="terminal" %} > nx run tuskdesk:lint Linting "tuskdesk"... diff --git a/astro-docs/src/content/docs/technologies/eslint/Guides/flat-config.mdoc b/astro-docs/src/content/docs/technologies/eslint/Guides/flat-config.mdoc index 00b10d56a8a89..2a949414c969a 100644 --- a/astro-docs/src/content/docs/technologies/eslint/Guides/flat-config.mdoc +++ b/astro-docs/src/content/docs/technologies/eslint/Guides/flat-config.mdoc @@ -171,7 +171,7 @@ Since version 16.8.0, Nx supports the usage of flat config in the [@nx/eslint:li To convert workspace ESLint configurations from the default `.eslintrc.json` to the new flat config you need to run: -```shell {% frame="none" %} +```shell nx g @nx/eslint:convert-to-flat-config ``` diff --git a/astro-docs/src/content/docs/technologies/eslint/introduction.mdoc b/astro-docs/src/content/docs/technologies/eslint/introduction.mdoc index 8a9f789fe0376..456e44ed49b45 100644 --- a/astro-docs/src/content/docs/technologies/eslint/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/eslint/introduction.mdoc @@ -18,7 +18,7 @@ Make sure to install the `@nx/eslint` version that matches the version of `nx` i In any Nx workspace, you can install `@nx/eslint` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/eslint ``` @@ -71,7 +71,7 @@ The `@nx/eslint/plugin` is configured in the `plugins` array in `nx.json`. You can lint an application or a library with the following command: -```shell {% frame="none" %} +```shell nx lint my-project ``` diff --git a/astro-docs/src/content/docs/technologies/java/gradle/introduction.mdoc b/astro-docs/src/content/docs/technologies/java/gradle/introduction.mdoc index b2f118db454d3..0b3d33d9fba69 100644 --- a/astro-docs/src/content/docs/technologies/java/gradle/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/java/gradle/introduction.mdoc @@ -30,28 +30,28 @@ You can install Nx globally. Depending on your package manager, use one of the f {% tabs syncKey="package-manager" %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm add --global nx@latest ``` {% /tabitem %} {% tabitem label="Homebrew (macOS, Linux)" %} -```shell {% frame="none" %} +```shell brew install nx ``` {% /tabitem %} {% tabitem label="Chocolatey (Windows)" %} -```shell {% frame="none" %} +```shell choco install nx ``` {% /tabitem %} {% tabitem label="apt (Ubuntu)" %} -```shell {% frame="none" %} +```shell sudo add-apt-repository ppa:nrwl/nx sudo apt update sudo apt install nx @@ -64,13 +64,13 @@ sudo apt install nx In any Gradle workspace, run the following command to add Nx and the `@nx/gradle` plugin: -```shell {% frame="none" %} +```shell nx init ``` Then, you can run Gradle tasks using Nx. For example: -```shell {% frame="none" %} +```shell nx build ``` @@ -116,14 +116,14 @@ The `dev.nx.gradle.project-graph` plugin introduces a task named `nxProjectGraph {% tabs syncKey="os" %} {% tabitem label="Mac OS/Linux" %} -```shell {% frame="none" %} +```shell ./gradlew nxProjectGraph ``` {% /tabitem %} {% tabitem label="Windows" %} -```shell {% frame="none" %} +```shell .\gradlew.bat nxProjectGraph ``` @@ -138,7 +138,7 @@ To view inferred tasks for a project, open the [project details view](/docs/feat In any Nx workspace, you can install `@nx/gradle` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/gradle ``` @@ -176,7 +176,7 @@ To enable test distribution for your Gradle projects in CI, follow these steps: 1. **Generate CI Workflow**: Run the `ci-workflow` generator to set up the necessary CI configurations. This generator creates a GitHub Actions workflow file that integrates with Nx's distributed task execution capabilities. - ```shell {% frame="none" %} + ```shell nx g @nx/gradle:ci-workflow ``` @@ -203,7 +203,7 @@ To enable test distribution for your Gradle projects in CI, follow these steps: 3. **Update CI Workflow Command**: In your generated CI workflow file, modify the command used to run affected tasks. Instead of using a generic `build` target, leverage the `build-ci` target provided by the `@nx/gradle` plugin: - ```shell {% frame="none" %} + ```shell # Before: # ./nx affected --base=$NX_BASE --head=$NX_HEAD -t build diff --git a/astro-docs/src/content/docs/technologies/java/maven/introduction.mdoc b/astro-docs/src/content/docs/technologies/java/maven/introduction.mdoc index b5e54d1fa180e..d2b61d262580f 100644 --- a/astro-docs/src/content/docs/technologies/java/maven/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/java/maven/introduction.mdoc @@ -39,28 +39,28 @@ You can install Nx globally. Depending on your package manager, use one of the f {% tabs syncKey="package-manager" %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npm add --global nx@latest ``` {% /tabitem %} {% tabitem label="Homebrew (macOS, Linux)" %} -```shell {% frame="none" %} +```shell brew install nx ``` {% /tabitem %} {% tabitem label="Chocolatey (Windows)" %} -```shell {% frame="none" %} +```shell choco install nx ``` {% /tabitem %} {% tabitem label="apt (Ubuntu)" %} -```shell {% frame="none" %} +```shell sudo add-apt-repository ppa:nrwl/nx sudo apt update sudo apt install nx @@ -73,13 +73,13 @@ sudo apt install nx In any Maven workspace, run the following command to add Nx and the `@nx/maven` plugin: -```shell {% frame="none" %} +```shell nx init ``` Then, you can run Maven tasks using Nx. For example: -```shell {% frame="none" %} +```shell nx build ``` @@ -95,7 +95,7 @@ To view inferred tasks for a project, open the [project details view](/docs/feat In any Nx workspace, you can install `@nx/maven` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/maven ``` diff --git a/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-host.mdoc b/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-host.mdoc index 05681db924fb1..bab4f1d5a8340 100644 --- a/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-host.mdoc +++ b/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-host.mdoc @@ -22,7 +22,7 @@ To generate only a host application in your workspace, run the following command {% tabs %} {% tabitem label="React" %} -```{% title="nx g @nx/react:host apps/react/shell" frame="terminal" %} +```text {% title="nx g @nx/react:host apps/react/shell" frame="terminal" %} NX Generating @nx/react:host CREATE apps/react/shell/src/app/app.spec.tsx @@ -51,7 +51,7 @@ CREATE apps/react/shell/src/main.ts {% /tabitem %} {% tabitem label="Angular" %} -```{% title="nx g @nx/angular:host apps/angular/shell" frame="terminal" %} +```text {% title="nx g @nx/angular:host apps/angular/shell" frame="terminal" %} NX Generating @nx/angular:host CREATE apps/angular/shell/project.json @@ -88,7 +88,7 @@ To scaffold a host application along with remote applications in your workspace, {% tabs %} {% tabitem label="React" %} -```{% title="nx g @nx/react:host apps/react/with-remotes/shell --remotes=remote1,remote2" frame="terminal" %} +```text {% title="nx g @nx/react:host apps/react/with-remotes/shell --remotes=remote1,remote2" frame="terminal" %} NX Generating @nx/react:host CREATE apps/react/with-remotes/shell/src/app/app.spec.tsx @@ -165,7 +165,7 @@ CREATE apps/react/with-remotes/remote2/src/remote-entry.ts {% /tabitem %} {% tabitem label="Angular" %} -```{% title="nx g @nx/angular:host apps/angular/with-remotes/shell --remotes=remote1,remote2" frame="terminal" %} +```text {% title="nx g @nx/angular:host apps/angular/with-remotes/shell --remotes=remote1,remote2" frame="terminal" %} > NX Generating @nx/angular:host CREATE apps/angular/with-remotes/shell/project.json @@ -246,7 +246,7 @@ CREATE apps/angular/with-remotes/ng-remote2/src/bootstrap.ts Your `host` application acts like any other application in the context of Nx, and therefore serving it locally is as simple as running: -```shell {% frame="none" %} +```shell nx serve shell ``` @@ -256,7 +256,7 @@ When you serve your `host`, Nx will discover any dependent remote applications t In the same vein, you can build your host by running: -```shell {% frame="none" %} +```shell nx build shell ``` diff --git a/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-remote.mdoc b/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-remote.mdoc index 7e46472319f45..885a44c9031fc 100644 --- a/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-remote.mdoc +++ b/astro-docs/src/content/docs/technologies/module-federation/Guides/create-a-remote.mdoc @@ -21,7 +21,7 @@ To generate a remote application in your workspace, cd into the right folder and {% tabs %} {% tabitem label="React" %} -```{% title="nx g @nx/react:remote --name=myremote" frame="terminal" %} +```text {% title="nx g @nx/react:remote --name=myremote" frame="terminal" %} NX Generating @nx/react:remote CREATE apps/react/myremote/src/app/app.spec.tsx @@ -52,7 +52,7 @@ UPDATE tsconfig.base.json {% /tabitem %} {% tabitem label="Angular" %} -```{% title="nx g @nx/angular:remote apps/angular/myremote" frame="terminal" %} +```text {% title="nx g @nx/angular:remote apps/angular/myremote" frame="terminal" %} NX Generating @nx/angular:host CREATE apps/angular/myremote/project.json @@ -129,7 +129,7 @@ The command would look like the following: {% tabs %} {% tabitem label="React" %} -```{% title="nx g @nx/react:remote apps/react/myremote --host=shell" frame="terminal" %} +```text {% title="nx g @nx/react:remote apps/react/myremote --host=shell" frame="terminal" %} NX Generating @nx/react:remote CREATE apps/react/myremote/src/app/app.spec.tsx @@ -161,7 +161,7 @@ UPDATE tsconfig.base.json {% /tabitem %} {% tabitem label="Angular" %} -```{% title="nx g @nx/angular:remote apps/angular/myremote --host=shell" frame="terminal" %} +```text {% title="nx g @nx/angular:remote apps/angular/myremote --host=shell" frame="terminal" %} > NX Generating @nx/angular:host CREATE apps/angular/myremote/project.json @@ -197,7 +197,7 @@ UPDATE tsconfig.base.json Your `remote` application acts like any other application in the context of Nx, and therefore building it as simple as running: -```shell {% frame="none" %} +```shell nx build myremote ``` @@ -210,7 +210,7 @@ The `remote` application is generated with two serve-like targets. These are: They can be run as usual with Nx: -```shell {% frame="none" %} +```shell nx serve myremote nx serve-static myremote ``` @@ -246,7 +246,7 @@ as you work on them. To do this, run the command: -```shell {% frame="none" %} +```shell ## React nx serve myremote diff --git a/astro-docs/src/content/docs/technologies/module-federation/Guides/federate-a-module.mdoc b/astro-docs/src/content/docs/technologies/module-federation/Guides/federate-a-module.mdoc index 77f928f9fdfed..dc934804862b7 100644 --- a/astro-docs/src/content/docs/technologies/module-federation/Guides/federate-a-module.mdoc +++ b/astro-docs/src/content/docs/technologies/module-federation/Guides/federate-a-module.mdoc @@ -24,7 +24,7 @@ Since we are using Nx, we will create a library for this module. **Create a library** -```shell {% frame="none" %} +```shell nx generate @nx/js:library hello --unitTestRunner=jest ``` @@ -51,14 +51,14 @@ Now that we have created the module, we need to configure it to be federated. {% tabs %} {% tabitem label="React" %} -```shell {% frame="none" %} +```shell nx generate @nx/react:federate-module hello/src/index.ts --name=hello --remote=greeting ``` {% /tabitem %} {% tabitem label="Angular" %} -```shell {% frame="none" %} +```shell nx generate @nx/angular:federate-module hello/src/index.ts --name=hello --remote=greeting ``` @@ -169,7 +169,7 @@ If you are using Angular, you would update the application in a similar fashion Just run the application as usual. -```shell {% frame="none" %} +```shell nx serve host ``` diff --git a/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-dev-server-plugin.mdoc b/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-dev-server-plugin.mdoc index b25341ec39057..42702f8bd8c42 100644 --- a/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-dev-server-plugin.mdoc +++ b/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-dev-server-plugin.mdoc @@ -84,14 +84,14 @@ export default { These names match the names of the projects in the workspace. Therefore, Nx can find them in the project graph and determine the information it needs. This usually amounts to Nx creating the following URLs: -```shell {% frame="none" %} +```shell shop@localhost:4201 cart@localhost:4202 ``` When it comes deployment to a real server, you'll need to configure the URLs to point to their real location. For example, if you deploy the host and the remotes to three servers, each with their own domain, you'd need to configure that: -```shell {% frame="none" %} +```shell shop@https://shop.example.com cart@https://cart.example.com ``` diff --git a/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-plugin.mdoc b/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-plugin.mdoc index 7bb098710d5e3..7e5dde507d9e8 100644 --- a/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-plugin.mdoc +++ b/astro-docs/src/content/docs/technologies/module-federation/Guides/nx-module-federation-plugin.mdoc @@ -113,14 +113,14 @@ export default { These names match the names of the projects in the workspace. Therefore, Nx can find them in the project graph and determine the information it needs. This usually amounts to Nx creating the following URLs: -```shell {% frame="none" %} +```shell shop@localhost:4201 cart@localhost:4202 ``` When it comes deployment to a real server, you'll need to configure the URLs to point to their real location. For example, if you deploy the host and the remotes to three servers, each with their own domain, you'd need to configure that: -```shell {% frame="none" %} +```shell shop@https://shop.example.com cart@https://cart.example.com ``` diff --git a/astro-docs/src/content/docs/technologies/module-federation/concepts/faster-builds-with-module-federation.mdoc b/astro-docs/src/content/docs/technologies/module-federation/concepts/faster-builds-with-module-federation.mdoc index 0f81a51d9a97f..a19fcc7e0f458 100644 --- a/astro-docs/src/content/docs/technologies/module-federation/concepts/faster-builds-with-module-federation.mdoc +++ b/astro-docs/src/content/docs/technologies/module-federation/concepts/faster-builds-with-module-federation.mdoc @@ -80,7 +80,7 @@ this [later in this guide](#remote-computation-caching-with-nx-cloud). Now, let's continue by creating an empty Nx workspace. -```shell {% frame="none" %} +```shell # Replace acme with desired scope npx create-nx-workspace acme --preset=apps cd acme @@ -93,7 +93,7 @@ take advantage of remote caching and other features it provides. Then, for React users, install the `@nx/react` plugin; and for Angular users, install the `@nx/angular` plugin. -```shell {% frame="none" %} +```shell # If you use React nx add @nx/react @@ -106,14 +106,14 @@ Next, generate the host and remote applications. {% tabs %} {% tabitem label="React" %} -```shell {% frame="none" %} +```shell nx g @nx/react:host apps/host --remotes=shop,cart,about ``` {% /tabitem %} {% tabitem label="Angular" %} -```shell {% frame="none" %} +```shell nx g @nx/angular:host apps/host --remotes=shop,cart,about ``` @@ -127,7 +127,7 @@ or `nx g @nx/angular:remote apps/shop --host=host`. Now, serve `host` to view it in your browser. -```shell {% frame="none" %} +```shell nx serve host --open ``` @@ -136,7 +136,7 @@ changes to `host` will update its bundle, but changes to remotes will not update To run one or more remotes in development mode, use the `--devRemotes` option or `run-many`. -```shell {% frame="none" %} +```shell ## React nx run-many -t serve -p "shop,cart" @@ -368,7 +368,7 @@ source of a given remote hasn't changed, it will be served from cache. You can see this behavior locally if you serve the `host` twice. -```shell {% frame="none" %} +```shell nx serve host # (kill server) @@ -382,7 +382,7 @@ If, say, someone is working on `shop`, they will get the `cart` and `about` buil If you inspect the terminal output, you'll see something like this, even if you are on different machines. -```shell {% frame="none" %} +```shell > nx run about:build:development [existing outputs match the cache, left as is] (snip) @@ -467,7 +467,7 @@ dist/apps Now, we can add a simple deploy command to simulate deploying this folder to production. -```shell {% frame="none" %} +```shell nx g @nx/workspace:run-commands \ deploy \ --project=host \ diff --git a/astro-docs/src/content/docs/technologies/module-federation/concepts/micro-frontend-architecture.mdoc b/astro-docs/src/content/docs/technologies/module-federation/concepts/micro-frontend-architecture.mdoc index b1b78d55b0eaa..c8a94cc11b483 100644 --- a/astro-docs/src/content/docs/technologies/module-federation/concepts/micro-frontend-architecture.mdoc +++ b/astro-docs/src/content/docs/technologies/module-federation/concepts/micro-frontend-architecture.mdoc @@ -56,7 +56,7 @@ application, and `nx g remote` for remote applications. {% tabs %} {% tabitem label="React" %} -```shell {% frame="none" %} +```shell nx g @nx/react:host apps/shell --remotes=shop,cart nx g @nx/react:remote apps/about --host=shell ``` @@ -64,7 +64,7 @@ nx g @nx/react:remote apps/about --host=shell {% /tabitem %} {% tabitem label="Angular" %} -```shell {% frame="none" %} +```shell nx g @nx/angular:host apps/shell --remotes=shop,cart nx g @nx/angular:remote apps/about --host=shell ``` diff --git a/astro-docs/src/content/docs/technologies/node/Guides/application-proxies.mdoc b/astro-docs/src/content/docs/technologies/node/Guides/application-proxies.mdoc index 2ff209ce99ddc..3c1dade317cc5 100644 --- a/astro-docs/src/content/docs/technologies/node/Guides/application-proxies.mdoc +++ b/astro-docs/src/content/docs/technologies/node/Guides/application-proxies.mdoc @@ -100,7 +100,7 @@ Prior to Nx version 18, projects use [executors](/docs/concepts/executors-and-co using executors, then the Node, Nest and Express app generators have an option to configure proxy API requests. This can be done by passing the `--frontendProject` with the project name you wish to enable proxy support for. -```shell {% frame="none" %} +```shell nx g @nx/node:app apps/ --frontendProject my-react-app nx g @nx/nest:app apps/ --frontendProject my-react-app nx g @nx/express:app apps/ --frontendProject my-react-app diff --git a/astro-docs/src/content/docs/technologies/node/Guides/node-aws-lambda.mdoc b/astro-docs/src/content/docs/technologies/node/Guides/node-aws-lambda.mdoc index 890f1a211b6cc..712ffe9f9954a 100644 --- a/astro-docs/src/content/docs/technologies/node/Guides/node-aws-lambda.mdoc +++ b/astro-docs/src/content/docs/technologies/node/Guides/node-aws-lambda.mdoc @@ -24,7 +24,7 @@ Depending on your current situation, you can either To create a new project, run -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest my-functions --preset=@nx/aws-lambda ``` @@ -32,13 +32,13 @@ npx create-nx-workspace@latest my-functions --preset=@nx/aws-lambda First, make sure you have `@nx/aws-lambda` installed. -```shell {% frame="none" %} +```shell nx add @nx/aws-lambda ``` Next, use the corresponding Nx generator to add the AWS Lambda configuration to an existing project: -```shell {% frame="none" %} +```shell nx generate @nx/aws-lambda:setup-functions ``` @@ -103,7 +103,7 @@ The Nx `project.json` already contains a `deploy-functions` target we can invoke Just run: -```shell {% frame="none" %} +```shell nx deploy-functions ``` diff --git a/astro-docs/src/content/docs/technologies/node/Guides/node-server-fly-io.mdoc b/astro-docs/src/content/docs/technologies/node/Guides/node-server-fly-io.mdoc index eb70cdd847d00..6b469c47f7f57 100644 --- a/astro-docs/src/content/docs/technologies/node/Guides/node-server-fly-io.mdoc +++ b/astro-docs/src/content/docs/technologies/node/Guides/node-server-fly-io.mdoc @@ -30,7 +30,7 @@ You can also install the `@nx/node` package into an existing Nx monorepo and gen If you don't have a Docker setup already, you can leverage the `setup-docker` generator from the `@nx/node` package to create one: -```shell {% frame="none" %} +```shell npx nx g @nx/node:setup-docker ``` diff --git a/astro-docs/src/content/docs/technologies/node/Guides/node-serverless-functions-netlify.mdoc b/astro-docs/src/content/docs/technologies/node/Guides/node-serverless-functions-netlify.mdoc index ad42272403f67..df696c1ace3d5 100644 --- a/astro-docs/src/content/docs/technologies/node/Guides/node-serverless-functions-netlify.mdoc +++ b/astro-docs/src/content/docs/technologies/node/Guides/node-serverless-functions-netlify.mdoc @@ -21,7 +21,7 @@ Let's walk through both scenarios. For new workspaces you can create a Nx workspace with serverless function with one command: -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest my-functions --preset=@nx/netlify --site=my-site ``` @@ -29,13 +29,13 @@ npx create-nx-workspace@latest my-functions --preset=@nx/netlify --site=my-site You will need to install `@nx/netlify` if you haven't already. -```shell {% frame="none" %} +```shell nx add @nx/netlify ``` Next add the Netlify serverless configuration by running the following command: -```shell {% frame="none" %} +```shell nx g @nx/netlify:setup-functions ``` @@ -49,7 +49,7 @@ This will do a few things: To serve your functions locally, run: -```shell {% frame="none" %} +```shell nx serve-functions ``` @@ -84,13 +84,13 @@ If you run `npx netlify deploy` in the workspace, the site ID will be automatica To deploy them to Netlify, run: -```shell {% frame="none" %} +```shell nx deploy-functions ``` This creates a "draft deployment" to a temporary URL. If you want to do a production deployment, pass the `--prod` flag: -```shell {% frame="none" %} +```shell nx deploy-functions --prod ``` diff --git a/astro-docs/src/content/docs/technologies/node/express/introduction.mdoc b/astro-docs/src/content/docs/technologies/node/express/introduction.mdoc index 2c39ca0f059fc..cc87ea045c7d2 100644 --- a/astro-docs/src/content/docs/technologies/node/express/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/node/express/introduction.mdoc @@ -13,7 +13,7 @@ apis. To create a new workspace with a pre-created Express app, run the following command: -```shell {% frame="none" %} +```shell npx create-nx-workspace --preset=express ``` @@ -27,7 +27,7 @@ Make sure to install the `@nx/express` version that matches the version of `nx` In any Nx workspace, you can install `@nx/express` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/express ``` diff --git a/astro-docs/src/content/docs/technologies/node/introduction.mdoc b/astro-docs/src/content/docs/technologies/node/introduction.mdoc index 204b3474cd71d..c9c1a87290a30 100644 --- a/astro-docs/src/content/docs/technologies/node/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/node/introduction.mdoc @@ -18,7 +18,7 @@ Make sure to install the `@nx/node` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/node` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/node ``` @@ -30,7 +30,7 @@ This will install the correct version of `@nx/node`. You can add a new application with the following: -```shell {% frame="none" %} +```shell nx g @nx/node:application apps/my-new-app ``` @@ -40,7 +40,7 @@ You can run your application with `nx serve my-new-app`, which starts it in watc Node libraries are a good way to separate features within your organization. To create a Node library run the following command: -```shell {% frame="none" %} +```shell nx g @nx/node:lib libs/my-new-lib # If you want the library to be buildable or publishable to npm @@ -56,7 +56,7 @@ nx g @nx/node:lib libs/my-new-lib \ You can run unit tests with: -```shell {% frame="none" %} +```shell nx test my-new-app nx test my-new-lib ``` @@ -67,13 +67,13 @@ Replace `my-new-app` with the name or your project. This command works for both Node applications can be build with: -```shell {% frame="none" %} +```shell nx build my-new-app ``` And if you generated a library with `--buildable`, then you can build a library as well: -```shell {% frame="none" %} +```shell nx build my-new-lib ``` @@ -83,7 +83,7 @@ The output is in the `dist` folder. You can customize the output folder by setti 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 {% frame="none" %} +```shell nx g @nx/node:application apps/my-new-app \ --frontendProject my-react-app ``` diff --git a/astro-docs/src/content/docs/technologies/node/nest/introduction.mdoc b/astro-docs/src/content/docs/technologies/node/nest/introduction.mdoc index 3c67bf0a2a155..f06ad947d0976 100644 --- a/astro-docs/src/content/docs/technologies/node/nest/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/node/nest/introduction.mdoc @@ -22,13 +22,13 @@ Many conventions and best practices used in Angular applications can be also be To create a new workspace with Nest, run the following command: -```shell {% frame="none" %} +```shell npx create-nx-workspace my-workspace --preset=nest ``` Yarn users can use the following command instead: -```shell {% frame="none" %} +```shell yarn create nx-workspace my-workspace --preset=nest ``` @@ -40,7 +40,7 @@ Make sure to install the `@nx/nest` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/nest` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/nest ``` @@ -50,7 +50,7 @@ This will install the correct version of `@nx/nest`. You can add a new Nest application with the following command: -```shell {% frame="none" %} +```shell nx g @nx/nest:app apps/my-nest-app ``` @@ -58,7 +58,7 @@ nx g @nx/nest:app apps/my-nest-app 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 {% frame="none" %} +```shell nx g @nx/nest:app apps/my-nest-app --frontendProject my-angular-app ``` @@ -66,19 +66,19 @@ nx g @nx/nest:app apps/my-nest-app --frontendProject my-angular-app You can add a new Nest library with the following command: -```shell {% frame="none" %} +```shell nx g @nx/nest:lib libs/my-nest-lib ``` To make the library `buildable`, use the following command: -```shell {% frame="none" %} +```shell nx g @nx/nest:lib libs/my-nest-lib --buildable ``` To make the library `publishable`, use the following command: -```shell {% frame="none" %} +```shell nx g @nx/nest:lib libs/my-nest-lib --publishable --importPath=@my-workspace/my-nest-lib ``` @@ -96,13 +96,13 @@ The Nest plugin for Nx extends the generators provided by Nest. Any commands tha You can build an application with the following command: -```shell {% frame="none" %} +```shell nx build my-nest-app ``` This applies to `buildable` libraries as well -```shell {% frame="none" %} +```shell nx build my-nest-lib ``` @@ -114,7 +114,7 @@ Setting the `waitUntilTargets` option with an array of projects (with the follow You can serve an application with the following command: -```shell {% frame="none" %} +```shell nx serve my-nest-app ``` @@ -159,13 +159,13 @@ For additional information on Node.js debugging, see the [Node.js debugging gett You can lint an application with the following command: -```shell {% frame="none" %} +```shell nx lint my-nest-app ``` You can lint a library with the following command: -```shell {% frame="none" %} +```shell nx lint my-nest-lib ``` @@ -173,13 +173,13 @@ nx lint my-nest-lib You can run unit test for an application with the following command: -```shell {% frame="none" %} +```shell nx test my-nest-app ``` You can run unit test for a library with the following command: -```shell {% frame="none" %} +```shell nx test my-nest-lib ``` diff --git a/astro-docs/src/content/docs/technologies/react/Guides/adding-assets-react.mdoc b/astro-docs/src/content/docs/technologies/react/Guides/adding-assets-react.mdoc index bf1eb20a3a512..a7cfb70eaa9cb 100644 --- a/astro-docs/src/content/docs/technologies/react/Guides/adding-assets-react.mdoc +++ b/astro-docs/src/content/docs/technologies/react/Guides/adding-assets-react.mdoc @@ -71,21 +71,21 @@ To import SVGs as React components with Vite, you need to install the `vite-plug {% tabs %} {% tabitem label="npm" %} -```shell frame="none" +```shell npm add -D vite-plugin-svgr ``` {% /tabitem %} {% tabitem label="yarn" %} -```shell frame="none" +```shell yarn add -D vite-plugin-svgr ``` {% /tabitem %} {% tabitem label="pnpm" %} -```shell frame="none" +```shell pnpm add -D vite-plugin-svgr ``` @@ -93,7 +93,7 @@ pnpm add -D vite-plugin-svgr {% tabitem label="bun" %} -```shell frame="none" +```shell bun add -D vite-plugin-svgr ``` diff --git a/astro-docs/src/content/docs/technologies/react/Guides/deploy-nextjs-to-vercel.mdoc b/astro-docs/src/content/docs/technologies/react/Guides/deploy-nextjs-to-vercel.mdoc index 0a4bc6c1beca7..56343f89731fd 100644 --- a/astro-docs/src/content/docs/technologies/react/Guides/deploy-nextjs-to-vercel.mdoc +++ b/astro-docs/src/content/docs/technologies/react/Guides/deploy-nextjs-to-vercel.mdoc @@ -16,7 +16,7 @@ Starting from Nx 11, your Next.js application should already be ready for deploy 2. Ensure the Next.js "Framework Preset" is selected 3. Expand the "Build and Output Settings" and toggle the override switch for the build command. For example, for an application named `tuskdesk` the value will look like this: -```shell {% frame="none" %} +```shell npx nx build tuskdesk --prod ``` diff --git a/astro-docs/src/content/docs/technologies/react/Guides/react-router.mdoc b/astro-docs/src/content/docs/technologies/react/Guides/react-router.mdoc index 7eece1e7221f6..836575e1b4e5a 100644 --- a/astro-docs/src/content/docs/technologies/react/Guides/react-router.mdoc +++ b/astro-docs/src/content/docs/technologies/react/Guides/react-router.mdoc @@ -26,7 +26,7 @@ We'll show you how to create a [React Router](https://reactrouter.com/home) appl If you already have an existing React Router application and want to add Nx to it you can do so by running the following command: -```shell {% frame="none" %} +```shell npx nx@latest init ``` @@ -34,7 +34,7 @@ npx nx@latest init If you would like to generate a new React Router application, you can do so by running the following command in your Nx workspace -```shell {% frame="none" %} +```shell nx g @nx/react:app apps/happynrwl --routing --use-react-router ``` diff --git a/astro-docs/src/content/docs/technologies/react/expo/introduction.mdoc b/astro-docs/src/content/docs/technologies/react/expo/introduction.mdoc index de45b6ef25547..acb1c5e0d5a21 100644 --- a/astro-docs/src/content/docs/technologies/react/expo/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/react/expo/introduction.mdoc @@ -14,7 +14,7 @@ Expo is a set of tools built on top of React Native. The Nx Plugin for Expo cont To create a new workspace with Expo, run the following command: -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest --preset=expo --appName=your-app-name ``` @@ -26,7 +26,7 @@ Make sure to install the `@nx/expo` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/expo` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/expo ``` @@ -87,13 +87,13 @@ Once a Expo configuration file has been identified, the targets are created with Add a new application to your workspace with the following command: -```shell {% frame="none" %} +```shell nx g @nx/expo:app apps/my-app ``` Start the application by running: -```shell {% frame="none" %} +```shell nx start my-app ``` @@ -101,7 +101,7 @@ nx start my-app To generate a new library run: -```shell {% frame="none" %} +```shell npx nx g @nx/expo:lib libs/your-lib-name ``` @@ -109,7 +109,7 @@ npx nx g @nx/expo:lib libs/your-lib-name To generate a new component inside library run: -```shell {% frame="none" %} +```shell npx nx g @nx/expo:component libs/your-lib-name/src/your-component-name --export ``` @@ -121,7 +121,7 @@ Replace `your-lib-name` with the app's name as defined in your `tsconfig.base.js You can start a development server by running: -```shell {% frame="none" %} +```shell nx start ``` @@ -134,7 +134,7 @@ You can compile your app locally with `run-ios` and `run-android` commands: Compile for iOS: -```shell {% frame="none" %} +```shell nx run-ios ``` @@ -143,7 +143,7 @@ nx run-ios Compile for Android: -```shell {% frame="none" %} +```shell nx run-android ``` @@ -156,7 +156,7 @@ To run these commands, you need to have your development environment setup. To r You can build your JavaScript bundle using Metro bundler by running: -```shell {% frame="none" %} +```shell nx export ``` @@ -165,7 +165,7 @@ nx export Compile for all platforms: -```shell {% frame="none" %} +```shell nx export --platform=all ``` @@ -174,7 +174,7 @@ nx export --platform=all Compile for iOS: -```shell {% frame="none" %} +```shell nx export --platform=ios ``` @@ -183,7 +183,7 @@ nx export --platform=ios Compile for Android: -```shell {% frame="none" %} +```shell nx export --platform=android ``` @@ -192,7 +192,7 @@ nx export --platform=android Compile for Web: -```shell {% frame="none" %} +```shell nx export --platform=web ``` @@ -203,7 +203,7 @@ nx export --platform=web To generate native code, run: -```shell {% frame="none" %} +```shell nx prebuild ``` @@ -212,7 +212,7 @@ nx prebuild Generate for all platforms: -```shell {% frame="none" %} +```shell nx prebuild --platform=all ``` @@ -221,7 +221,7 @@ nx prebuild --platform=all Generate for iOS: -```shell {% frame="none" %} +```shell nx prebuild --platform=ios ``` @@ -230,7 +230,7 @@ nx prebuild --platform=ios Generate for Android: -```shell {% frame="none" %} +```shell nx prebuild --platform=android ``` @@ -241,7 +241,7 @@ nx prebuild --platform=android To install packages that is compatible with current version of Expo, run: -```shell {% frame="none" %} +```shell nx install ``` @@ -249,7 +249,7 @@ Unlike npm's `install` command, this `install` command will install the exact ri To install a specify NPM package, run: -```shell {% frame="none" %} +```shell nx install --packages= nx install --packages=,, ``` @@ -261,7 +261,7 @@ To check and fix package versions, run: Check which packages needed to be updated: -```shell {% frame="none" %} +```shell nx install --check ``` @@ -270,7 +270,7 @@ nx install --check Automatically update invalid packages versions: -```shell {% frame="none" %} +```shell nx install --fix ``` @@ -283,19 +283,19 @@ Expo Application Services (EAS) are deeply integrated cloud services for Expo an To run an EAS build: -```shell {% frame="none" %} +```shell nx build ``` If you are not signed into an EAS account, run the following command to log in: -```shell {% frame="none" %} +```shell npx eas login ``` To check the details of your build status, run: -```shell {% frame="none" %} +```shell nx build-list ``` @@ -305,7 +305,7 @@ EAS Submit is a hosted service for uploading and submitting your app binaries to To submit an EAS build: -```shell {% frame="none" %} +```shell nx submit ``` @@ -317,7 +317,7 @@ EAS Update makes fixing small bugs and pushing quick fixes a snap in between app To update an EAS build: -```shell {% frame="none" %} +```shell nx update ``` @@ -325,7 +325,7 @@ nx update You can run unit tests with: -```shell {% frame="none" %} +```shell nx test ``` diff --git a/astro-docs/src/content/docs/technologies/react/introduction.mdoc b/astro-docs/src/content/docs/technologies/react/introduction.mdoc index d58748b6a836f..d3594e5447707 100644 --- a/astro-docs/src/content/docs/technologies/react/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/react/introduction.mdoc @@ -33,7 +33,7 @@ Make sure to install the `@nx/react` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/react` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/react ``` @@ -45,7 +45,7 @@ This will install the correct version of `@nx/react`. You can add a new application with the following: -```shell {% frame="none" %} +```shell nx g @nx/react:app apps/my-new-app ``` @@ -53,7 +53,7 @@ To start the application in development mode, run `nx serve my-new-app`. And add a new library as follows: -```shell {% frame="none" %} +```shell nx g @nx/react:lib libs/my-new-lib # If you want the library to be buildable or publishable to npm @@ -70,7 +70,7 @@ Read more about [building and publishing libraries here](/docs/concepts/buildabl Adding a component to an existing project can be done with: -```shell {% frame="none" %} +```shell nx g @nx/react:component libs/my-new-lib/src/lib/my-new-component # Note: If you want to export the component @@ -84,7 +84,7 @@ Replace `my-new-app` and `my-new-lib` with the name of your projects. If you want to add a new hook, run the following -```shell {% frame="none" %} +```shell nx g @nx/react:hook libs/my-new-lib/src/lib/my-new-hook ``` @@ -96,7 +96,7 @@ Replace `my-new-lib` with the name of your project. You can run unit tests with: -```shell {% frame="none" %} +```shell nx test my-new-app nx test my-new-lib ``` @@ -105,7 +105,7 @@ Replace `my-new-app` with the name or your project. This command works for both You can also run E2E tests for applications: -```shell {% frame="none" %} +```shell nx e2e my-new-app-e2e ``` @@ -115,13 +115,13 @@ Replace `my-new-app-e2e` with the name or your project with `-e2e` appended. React applications can be build with: -```shell {% frame="none" %} +```shell nx build my-new-app ``` And if you generated a library with `--bundler` specified, then you can build a library as well: -```shell {% frame="none" %} +```shell nx build my-new-lib ``` @@ -130,7 +130,7 @@ project's `project.json` file. The application in `dist` is deployable, and you can try it out locally with: -```shell {% frame="none" %} +```shell npx http-server dist/apps/my-new-app ``` diff --git a/astro-docs/src/content/docs/technologies/react/next/introduction.mdoc b/astro-docs/src/content/docs/technologies/react/next/introduction.mdoc index c049d554713ce..f80d2340e9358 100644 --- a/astro-docs/src/content/docs/technologies/react/next/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/react/next/introduction.mdoc @@ -18,7 +18,7 @@ The Next.js plugin contains executors and generators for managing Next.js applic To create a new Nx workspace with Next.js, run: -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest --preset=next ``` @@ -33,7 +33,7 @@ In any workspace, you can install `@nx/next` by running the following command: {% tabs %} {% tabitem label="Nx 18+" %} -```shell {% frame="none" %} +```shell nx add @nx/next ``` @@ -45,7 +45,7 @@ This will install the correct version of `@nx/next`. Install the `@nx/next` package with your package manager. -```shell {% frame="none" %} +```shell npm add -D @nx/next ``` @@ -101,7 +101,7 @@ The `@nx/next/plugin` is configured in the `plugins` array in `nx.json`. You can add a new application with the following: -```shell {% frame="none" %} +```shell nx g @nx/next:app apps/my-new-app ``` @@ -115,7 +115,7 @@ Nx allows you to create libraries with just one command. Some reasons you might To generate a new library run: -```shell {% frame="none" %} +```shell nx g @nx/next:lib libs/my-new-lib ``` @@ -123,7 +123,7 @@ nx g @nx/next:lib libs/my-new-lib Nx also provides commands to quickly generate new pages and components for your application. -```shell {% frame="none" %} +```shell nx g @nx/next:page apps/my-new-app/pages/my-new-page nx g @nx/next:component apps/my-new-app/components/my-new-component @@ -143,13 +143,13 @@ Nx generates components with tests by default. For pages, you can pass the `--wi You can serve a Next.js application `my-new-app` for development: -```shell {% frame="none" %} +```shell nx dev my-new-app ``` To serve a Next.js application for production: -```shell {% frame="none" %} +```shell nx start my-new-app ``` @@ -162,7 +162,7 @@ You can run `nx serve my-new-app` to serve a Next.js application called `my-new- To serve a Next.js application for production, add the `--prod` flag to the serve command: -```shell {% frame="none" %} +```shell nx serve my-new-app --prod ``` @@ -194,7 +194,7 @@ There is no need to build the library prior to using it. When you update your li For libraries intended to be built and published to a registry (e.g. npm) you can use the `--publishable` and `--importPath` options. -```shell {% frame="none" %} +```shell nx g @nx/next:lib libs/my-new-lib --publishable --importPath=@happynrwl/ui-components ``` @@ -202,7 +202,7 @@ nx g @nx/next:lib libs/my-new-lib --publishable --importPath=@happynrwl/ui-compo You can run unit tests with: -```shell {% frame="none" %} +```shell nx test my-new-app nx test my-new-lib ``` @@ -211,7 +211,7 @@ Replace `my-new-app` and `my-new-lib` with the name or the project you want to t You can also run E2E tests for applications: -```shell {% frame="none" %} +```shell nx e2e my-new-app-e2e ``` @@ -221,7 +221,7 @@ Replace `my-new-app-e2e` with the name or your project with -e2e appended. You can lint projects with: -```shell {% frame="none" %} +```shell nx lint my-new-app nx lint my-new-lib ``` @@ -232,13 +232,13 @@ Replace `my-new-app` and `my-new-lib` with the name or the project you want to t Next.js applications can be build with: -```shell {% frame="none" %} +```shell nx build my-new-app ``` And if you generated a library with `--bundler`, then you can build a library as well: -```shell {% frame="none" %} +```shell nx build my-new-lib ``` @@ -311,7 +311,7 @@ const nextConfig = { After setting the output to `export`, you can run the `build` command to generate the static HTML files. -```shell {% frame="none" %} +```shell nx build my-next-app ``` @@ -341,7 +341,7 @@ This feature is particularly useful for testing in continuous integration (CI) p To utilize the `serve-static` target for testing, run the following command: -```shell {% frame="none" %} +```shell nx serve-static my-next-app-e2e ``` diff --git a/astro-docs/src/content/docs/technologies/react/react-native/introduction.mdoc b/astro-docs/src/content/docs/technologies/react/react-native/introduction.mdoc index d63fe68280875..6c8ebf848ff33 100644 --- a/astro-docs/src/content/docs/technologies/react/react-native/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/react/react-native/introduction.mdoc @@ -20,7 +20,7 @@ The Nx Plugin for React Native contains generators for managing React Native app To create a new workspace with React Native, run the following command: -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest your-workspace-name --preset=react-native --appName=your-app-name ``` @@ -28,7 +28,7 @@ npx create-nx-workspace@latest your-workspace-name --preset=react-native --appNa You can also run the command without arguments to go through the interactive prompts. {% /aside %} -```shell {% frame="none" %} +```shell npx create-nx-workspace your-workspace-name ``` @@ -43,7 +43,7 @@ In any Nx workspace, you can install `@nx/react-native` by running the following {% tabs syncKey="nx-version" %} {% tabitem label="Nx 18+" %} -```shell {% frame="none" %} +```shell nx add @nx/react-native ``` @@ -54,7 +54,7 @@ This will install the correct version of `@nx/react-native`. Install the `@nx/react-native` package with your package manager. -```shell {% frame="none" %} +```shell npm add -D @nx/react-native ``` @@ -106,7 +106,7 @@ Once a React Native configuration file has been identified, the targets are crea To create additional React Native apps run: -```shell {% frame="none" %} +```shell nx g @nx/react-native:app apps/ ``` @@ -114,7 +114,7 @@ nx g @nx/react-native:app apps/ To generate a new library run: -```shell {% frame="none" %} +```shell nx g @nx/react-native:lib libs/ ``` @@ -122,7 +122,7 @@ nx g @nx/react-native:lib libs/ To generate a new component inside library run: -```shell {% frame="none" %} +```shell nx g @nx/react-native:component --export ``` @@ -136,7 +136,7 @@ The Nx CLI provides the [`migrate` command](/docs/features/automate-updating-dep To upgrade native iOS and Android code to latest, you can use the [upgrade-native](/docs/technologies/react/react-native/generators#upgrade-native) generator: -```shell {% frame="none" %} +```shell nx generate @nx/react-native:upgrade-native apps/ ``` @@ -150,7 +150,7 @@ You can also upgrade React Native iOS and Android code using the [rn-diff-purge] To start the server that communicates with connected devices: -```shell {% frame="none" %} +```shell nx start ``` @@ -158,7 +158,7 @@ nx start To build your app and start it on iOS simulator or device: -```shell {% frame="none" %} +```shell nx run-ios ``` @@ -166,7 +166,7 @@ nx run-ios To build your app and start it on a connected Android emulator or device: -```shell {% frame="none" %} +```shell nx run-android ``` @@ -174,7 +174,7 @@ nx run-android To build an iOS app: -```shell {% frame="none" %} +```shell nx build-ios ``` @@ -182,7 +182,7 @@ The build artifacts will be located under `/ios/build`. You can specify the build folder by setting the `buildFolder` option: -```shell {% frame="none" %} +```shell nx build-ios --buildFolder="./build" ``` @@ -190,7 +190,7 @@ nx build-ios --buildFolder="./build" To build an Android app, run: -```shell {% frame="none" %} +```shell nx build-android ``` diff --git a/astro-docs/src/content/docs/technologies/react/remix/introduction.mdoc b/astro-docs/src/content/docs/technologies/react/remix/introduction.mdoc index c49e7da15c59f..2d0807b23adf8 100644 --- a/astro-docs/src/content/docs/technologies/react/remix/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/react/remix/introduction.mdoc @@ -28,7 +28,7 @@ Make sure to install the `@nx/remix` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/remix` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/remix ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-component-testing.mdoc b/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-component-testing.mdoc index da1152d126664..0421722b340cc 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-component-testing.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-component-testing.mdoc @@ -18,7 +18,7 @@ directly to a project, like [Jest](/docs/technologies/test-tools/jest/introducti Use the `cypress-component-configuration` generator from the respective plugin to add component testing to a project. -```shell {% frame="none" %} +```shell nx g @nx/react:cypress-component-configuration --project=your-project nx g @nx/angular:cypress-component-configuration --project=your-project @@ -32,7 +32,7 @@ Component testing supports both applications and libraries. By default, the gene > Note: The [@nx/next:cypress-component-configuration generator](/docs/technologies/react/next/generators#cypress-component-configuration) doesn't require a build target -```shell {% frame="none" %} +```shell nx g @nx/react:cypress-component-configuration --project=your-project --build-target=my-react-app:build nx g @nx/angular:cypress-component-configuration --project=your-project --build-target=my-ng-app:build diff --git a/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-v11-migration.mdoc b/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-v11-migration.mdoc index 34483534f3c4a..e045d58d4662f 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-v11-migration.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/cypress/Guides/cypress-v11-migration.mdoc @@ -12,7 +12,7 @@ Before continuing, make sure you have all your changes committed and have a clea You can migrate an E2E project to v11 by running the following command: -```shell {% frame="none" %} +```shell nx g @nx/cypress:migrate-to-cypress-11 ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/cypress/introduction.mdoc b/astro-docs/src/content/docs/technologies/test-tools/cypress/introduction.mdoc index c4e3b37c0f307..97d0fa0bd7237 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/cypress/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/cypress/introduction.mdoc @@ -30,7 +30,7 @@ In any Nx workspace, you can install `@nx/cypress` by running the following comm {% tabs %} {% tabitem label="Nx 18+" %} -```shell {% frame="none" %} +```shell nx add @nx/cypress ``` @@ -41,7 +41,7 @@ This will install the correct version of `@nx/cypress`. Install the `@nx/cypress` package with your package manager. -```shell {% frame="none" %} +```shell npm add -D @nx/cypress ``` @@ -158,7 +158,7 @@ The `@nx/cypress/plugin` can also automatically split your component testing tas By default, when creating a new frontend application, Nx will use Cypress to create the e2e tests project. -```shell {% frame="none" %} +```shell nx g @nx/web:app apps/frontend ``` @@ -166,13 +166,13 @@ nx g @nx/web:app apps/frontend To configure Cypress for an existing project, run the following generator: -```shell {% frame="none" %} +```shell nx g @nx/cypress:configuration --project=your-app-name ``` Optionally, you can use the `--baseUrl` option if you don't want the Cypress plugin to serve `your-app-name`. -```shell {% frame="none" %} +```shell nx g @nx/cypress:configuration --project=your-app-name --baseUrl=http://localhost:4200 ``` @@ -190,13 +190,13 @@ 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](/docs/concepts/executors-and-configurations#use-task-configurations) -```shell {% frame="none" %} +```shell nx e2e frontend-e2e --configuration=production ``` You can use the `--spec` flag to glob for test files. -```shell {% frame="none" %} +```shell # run the tests in the smoke/ directory nx e2e frontend-e2e --spec="**smoke/**" @@ -215,7 +215,7 @@ running and Cypress will re-run those tests as you enhance and add to the suite. {% tabs %} {% tabitem label="Using inferred tasks" %} -```shell {% frame="none" %} +```shell nx open-cypress frontend-e2e ``` @@ -223,7 +223,7 @@ nx open-cypress frontend-e2e {% tabitem label="Using the @nx/cypress:cypress executor" %} -```shell {% frame="none" %} +```shell nx e2e frontend-e2e --watch ``` @@ -237,7 +237,7 @@ The `baseUrl` property provides you the ability to test an application hosted on {% tabs %} {% tabitem label="Using inferred tasks" %} -```shell {% frame="none" %} +```shell nx e2e frontend-e2e --config="baseUrl=https://frontend.com" ``` @@ -249,7 +249,7 @@ If `baseUrl` is not provided, Cypress will expect to have the `baseUrl` property {% tabitem label="Using the @nx/cypress:cypress executor" %} -```shell {% frame="none" %} +```shell nx e2e frontend-e2e --baseUrl=https://frontend.com ``` @@ -324,7 +324,7 @@ Finally, you can also pass environment variables via the command line with the ` {% tabs %} {% tabitem label="Using inferred tasks" %} -```shell {% frame="none" %} +```shell nx e2e frontend-e2e -e=API_URL=https://api.my-nx-website.com,API_KEY=abc-123 ``` @@ -332,7 +332,7 @@ nx e2e frontend-e2e -e=API_URL=https://api.my-nx-website.com,API_KEY=abc-123 {% tabitem label="Using the @nx/cypress:cypress executor" %} -```shell {% frame="none" %} +```shell nx e2e frontend-e2e --env.API_URL="https://api.my-nx-website.com" --env.API_KEY="abc-123" ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/detox/introduction.mdoc b/astro-docs/src/content/docs/technologies/test-tools/detox/introduction.mdoc index 7c2369592ca87..429ed4d189d2e 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/detox/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/detox/introduction.mdoc @@ -22,14 +22,14 @@ Detox is gray box end-to-end testing and automation library for mobile apps. It [applesimutils](https://github.com/wix/AppleSimulatorUtils) is a collection of utils for Apple simulators. -```shell {% frame="none" %} +```shell brew tap wix/brew brew install applesimutils ``` #### Install Jest Globally -```shell {% frame="none" %} +```shell npm install -g jest ``` @@ -41,7 +41,7 @@ Make sure to install the `@nx/detox` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/detox` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/detox ``` @@ -117,7 +117,7 @@ For Android, in terminal, run `emulator -list-avds` to view a list of emulators 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 {% frame="none" %} +```shell nx test-ios frontend-e2e --device-name "iPhone 11" nx test-android frontend-e2e --device-name "Pixel_4a_API_30" ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/jest/introduction.mdoc b/astro-docs/src/content/docs/technologies/test-tools/jest/introduction.mdoc index fdb31df10c606..f5cc0b7e1d162 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/jest/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/jest/introduction.mdoc @@ -22,7 +22,7 @@ Make sure to install the `@nx/jest` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/jest` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/jest ``` @@ -148,7 +148,7 @@ The `@nx/jest/plugin` is configured in the `plugins` array in `nx.json`. By default, Nx will use Jest when creating applications and libraries. -```shell {% frame="none" %} +```shell nx g @nx/web:app apps/frontend ``` @@ -156,7 +156,7 @@ nx g @nx/web:app apps/frontend Run the `configuration` generator -```shell {% frame="none" %} +```shell nx g @nx/jest:configuration --project= ``` @@ -173,7 +173,7 @@ The recommended way to run/debug Jest tests via an editor To run Jest tests via nx use -```shell {% frame="none" %} +```shell nx test frontend ``` @@ -181,7 +181,7 @@ nx test frontend Using a single positional argument or the `--testFile` flag will run all test files matching the regex. For more info check out the [Jest documentation](https://jestjs.io/docs/cli#jest-regexfortestfiles). -```shell {% frame="none" %} +```shell nx test frontend HomePage.tsx # or nx test frontend --testFile HomePage.tsx @@ -191,7 +191,7 @@ nx test frontend --testFile HomePage.tsx Using the `--watch` flag will run the tests whenever a file changes. -```shell {% frame="none" %} +```shell nx test frontend --watch ``` @@ -214,7 +214,7 @@ When using snapshots, you can update them with the `--updateSnapshot` flag, `-u` > By default, snapshots will be generated when there are not existing snapshots for the associated test. -```shell {% frame="none" %} +```shell nx test frontend -u ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/playwright/Guides/merge-atomized-outputs.mdoc b/astro-docs/src/content/docs/technologies/test-tools/playwright/Guides/merge-atomized-outputs.mdoc index 9b4cb6d8936aa..a72111972e64b 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/playwright/Guides/merge-atomized-outputs.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/playwright/Guides/merge-atomized-outputs.mdoc @@ -99,14 +99,14 @@ With the above configurations, Nx automatically creates these targets for your P **Local Development:** -```shell {% frame="none" %} +```shell # Run tests normally (no blob reports generated) nx run my-app:e2e ``` **CI Environment:** -```shell {% frame="none" %} +```shell # Run atomized tests (generates blob reports) nx run my-app:e2e-ci diff --git a/astro-docs/src/content/docs/technologies/test-tools/playwright/introduction.mdoc b/astro-docs/src/content/docs/technologies/test-tools/playwright/introduction.mdoc index 11e752a7aa026..9216664bf38b5 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/playwright/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/playwright/introduction.mdoc @@ -24,7 +24,7 @@ Make sure to install the `@nx/playwright` version that matches the version of `n In any Nx workspace, you can install `@nx/playwright` by running the following command: -```shell frame="none" +```shell nx add @nx/playwright ``` @@ -76,7 +76,7 @@ If you would like to disable Atomizer for Playwright tasks, set `ciTargetName` t By default, when creating a new frontend application, Nx will prompt for which e2e test runner to use. Select `playwright` or pass in the arg `--e2eTestRunner=playwright` -```shell frame="none" +```shell nx g @nx/web:app apps/frontend --e2eTestRunner=playwright ``` @@ -84,13 +84,13 @@ nx g @nx/web:app apps/frontend --e2eTestRunner=playwright To generate an E2E project for an existing project, run the following generator -```shell frame="none" +```shell nx g @nx/playwright:configuration --project=your-app-name ``` Optionally, you can use the `--webServerCommand` and `--webServerAddress` option, to auto setup the [web server option](https://playwright.dev/docs/test-webserver) in the playwright config -```shell frame="none" +```shell nx g @nx/playwright:configuration --project=your-app-name --webServerCommand="npx serve your-project-name" --webServerAddress="http://localhost:4200" ``` @@ -126,7 +126,7 @@ With, `nx e2e frontend-e2e --ui` Playwright will start in headed mode where you From, there you can toggle on the watch icon which will rerun the tests when the spec file updates. -```shell frame="none" +```shell nx e2e --ui ``` @@ -164,7 +164,7 @@ By default, Playwright will run tests against all browsers in the `projects` lis You can specify a specific browser to run the tests against by passing the `--project` flag to the `nx e2e` command. -```shell frame="none" +```shell nx e2e frontend-e2e -- --project=firefox ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-configuring-styles.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-configuring-styles.mdoc index bce1e975c5c71..74fdd5cc25477 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-configuring-styles.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-configuring-styles.mdoc @@ -129,7 +129,7 @@ If your Angular project uses Tailwind CSS, configure it in your Storybook: 1. Install Tailwind CSS for Storybook: -```shell {% frame="none" %} +```shell npm install -D @storybook/addon-postcss ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-storybook-compodoc.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-storybook-compodoc.mdoc index 49c74185471d7..816eaa9b7efcd 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-storybook-compodoc.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/angular-storybook-compodoc.mdoc @@ -27,7 +27,7 @@ You need to have Storybook already configured for your Angular project. If you h Install Compodoc as a dev dependency: -```shell {% frame="none" %} +```shell npm install --save-dev @compodoc/compodoc ``` @@ -225,7 +225,7 @@ export const Disabled: Story = { With the setup complete, run your Storybook: -```shell {% frame="none" %} +```shell npm run storybook ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/best-practices.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/best-practices.mdoc index 2042e4753b019..d7b01d5a8cf41 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/best-practices.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/best-practices.mdoc @@ -94,19 +94,19 @@ Setting up Storybook on Nx reflects - and takes advantage of - the [mental model In the process of setting up Storybook in your Nx workspace that we described above, you end up with one Storybook instance per project. That way, you can use your project's Storybook targets to serve, test and build Storybook: -```shell {% frame="none" %} +```shell nx storybook my-project ``` and -```shell {% frame="none" %} +```shell nx build-storybook my-project ``` and -```shell {% frame="none" %} +```shell nx test-storybook my-project ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-for-all.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-for-all.mdoc index 92a1d866027c8..5ce80aca0f175 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-for-all.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-for-all.mdoc @@ -21,7 +21,7 @@ Let's see how we can implement this solution: According to the framework you are using, use the corresponding generator to generate a new library. Let's suppose that you are using React and all your stories are using the `@storybook/react-vite` framework: -```shell {% frame="none" %} +```shell nx g @nx/react:library libs/storybook-host --bundler=none --unitTestRunner=none ``` @@ -31,7 +31,7 @@ Now, you have a new library, which will act as a shell/host for all your stories Now let's configure our new library to use Storybook, using the [`@nx/storybook:configuration` generator](/docs/technologies/test-tools/storybook/generators#configuration). Run: -```shell {% frame="none" %} +```shell nx g @nx/storybook:configuration storybook-host --interactionTests=true --uiFramework=@storybook/react-vite ``` @@ -108,19 +108,19 @@ Notice how in the `include` array we are specifying the paths to our stories, us Now you can serve, test or build your Storybook as you would, normally. And then you can publish the bundled app! -```shell {% frame="none" %} +```shell nx storybook storybook-host ``` or -```shell {% frame="none" %} +```shell nx build-storybook storybook-host ``` or -```shell {% frame="none" %} +```shell nx test-storybook storybook-host ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-per-scope.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-per-scope.mdoc index b07eb28d5ceb4..33e4b66f48ff3 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-per-scope.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-per-scope.mdoc @@ -88,15 +88,15 @@ Let's assume in this case that all our libraries are using Angular. Let's generate three Angular libraries, one for each scope, and let's call them `storybook-host-client`, `storybook-host-admin`, and `storybook-host-shared`. We can do this by running the following commands: -```shell {% frame="none" %} +```shell nx g @nx/angular:lib libs/storybook-host-client ``` -```shell {% frame="none" %} +```shell nx g @nx/angular:lib libs/storybook-host-admin ``` -```shell {% frame="none" %} +```shell nx g @nx/angular:lib libs/storybook-host-shared ``` @@ -104,15 +104,15 @@ nx g @nx/angular:lib libs/storybook-host-shared Now, we need to generate Storybook configuration for all these new libraries. We don't want to generate `stories` for these libraries, so we can run the following commands: -```shell {% frame="none" %} +```shell nx g @nx/storybook:configuration storybook-host-client --uiFramework=@storybook/angular --interactionTests=true ``` -```shell {% frame="none" %} +```shell nx g @nx/storybook:configuration storybook-host-admin --uiFramework=@storybook/angular --interactionTests=true ``` -```shell {% frame="none" %} +```shell nx g @nx/storybook:configuration storybook-host-shared --uiFramework=@storybook/angular --interactionTests=true ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-with-composition.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-with-composition.mdoc index ba1f71f82090a..52b800b9f59d7 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-with-composition.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/one-storybook-with-composition.mdoc @@ -31,7 +31,7 @@ It does not matter which framework you use for the host Storybook library. It ca So, let's use React for the Storybook Composition host library: -```shell {% frame="none" %} +```shell nx g @nx/react:lib libs/storybook-host --bundler=none --unitTestRunner=none ``` @@ -41,7 +41,7 @@ Now that your library is generated, you can write your intro in the generated co Since you do need a story for your host Storybook, you should use the React storybook configuration generator, and actually choose to generate stories (not an e2e project though): -```shell {% frame="none" %} +```shell nx g @nx/react:storybook-configuration storybook-host --interactionTests=true --generateStories=true ``` @@ -129,19 +129,19 @@ export default config; Now, you can serve your host Storybook, as well as the hosted, composed Storybooks. You need to serve the composed Storybooks first, and then your host. -```shell {% frame="none" %} +```shell nx run storybook-host-angular:storybook ``` and on a different terminal: -```shell {% frame="none" %} +```shell nx run storybook-host-react:storybook ``` and then on a different terminal serve the host: -```shell {% frame="none" %} +```shell nx run storybook-host:storybook ``` @@ -153,7 +153,7 @@ You can now build and deploy the Storybook host. You can build the Storybook with: -```shell {% frame="none" %} +```shell nx run storybook-host:build-storybook ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-angular.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-angular.mdoc index 1e5f062fcbcdd..d822722ef0667 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-angular.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-angular.mdoc @@ -16,7 +16,7 @@ You first need to set up Storybook for your Nx workspace, if you haven't already You can generate Storybook configuration for an individual Angular project by using the [`@nx/angular:storybook-configuration` generator](/docs/technologies/angular/generators#storybook-configuration), like this: -```shell {% frame="none" %} +```shell nx g @nx/angular:storybook-configuration project-name ``` @@ -33,7 +33,7 @@ The [`@nx/angular:storybook-configuration` generator](/docs/technologies/angular {%/filetree %} If you add more components to your project, and want to generate stories for all your (new) components at any point, you can use the [`@nx/angular:stories` generator](/docs/technologies/angular/generators#stories): -```shell {% frame="none" %} +```shell nx g @nx/angular:stories --project= ``` @@ -43,7 +43,7 @@ Let's take for a example a library in your workspace, under `libs/feature/ui`, c The command to generate stories for that library would be: -```shell {% frame="none" %} +```shell nx g @nx/angular:stories --project=feature-ui ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-react.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-react.mdoc index 06264284024bc..06bf294eddc19 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-react.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-react.mdoc @@ -16,7 +16,7 @@ You first need to set up Storybook for your Nx workspace, if you haven't already You can generate Storybook configuration for an individual React project by using the [`@nx/react:storybook-configuration` generator](/docs/technologies/react/generators#storybook-configuration), like this: -```shell {% frame="none" %} +```shell nx g @nx/react:storybook-configuration project-name ``` @@ -34,7 +34,7 @@ The [`@nx/react:storybook-configuration` generator](/docs/technologies/react/gen If you add more components to your project, and want to generate stories for all your (new) components at any point, you can use the [`@nx/react:stories` generator](/docs/technologies/react/generators#stories): -```shell {% frame="none" %} +```shell nx g @nx/react:stories --project= ``` @@ -44,7 +44,7 @@ Let's take for a example a library in your workspace, under `libs/feature/ui`, c The command to generate stories for that library would be: -```shell {% frame="none" %} +```shell nx g @nx/react:stories --project=feature-ui ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-vue.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-vue.mdoc index 01c1fa3c2794c..fa8ffa8197cd6 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-vue.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/overview-vue.mdoc @@ -19,14 +19,14 @@ You can generate Storybook configuration for an individual Vue or Nuxt project b {% tabs %} {% tabitem label="Vue" %} -```shell {% frame="none" %} +```shell nx g @nx/vue:storybook-configuration project-name ``` {% /tabitem %} {% tabitem label="Nuxt" %} -```shell {% frame="none" %} +```shell nx g @nx/nuxt:storybook-configuration my-nuxt-app ``` @@ -49,14 +49,14 @@ If you add more components to your project, and want to generate stories for all {% tabs %} {% tabitem label="Vue" %} -```shell {% frame="none" %} +```shell nx g @nx/vue:stories --project= ``` {% /tabitem %} {% tabitem label="Nuxt" %} -```shell {% frame="none" %} +```shell nx g @nx/nuxt:stories --project= ``` @@ -70,7 +70,7 @@ Let's take for a example a library in your workspace, under `libs/feature/ui`, c The command to generate stories for that library would be: -```shell {% frame="none" %} +```shell nx g @nx/vue:stories --project=feature-ui ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-composition-setup.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-composition-setup.mdoc index 524af05f952d6..39b79169f09f8 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-composition-setup.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-composition-setup.mdoc @@ -22,13 +22,13 @@ First, you need a main Storybook instance that will serve as the host for other ### Generate a host library -```shell {% frame="none" %} +```shell nx g @nx/react:library storybook-host --bundler=none --unitTestRunner=none ``` ### Configure Storybook for the host -```shell {% frame="none" %} +```shell nx g @nx/storybook:configuration storybook-host --uiFramework=@storybook/react-vite ``` @@ -105,14 +105,14 @@ To see your composed Storybooks in action: 1. Start each composed Storybook on its designated port: -```shell {% frame="none" %} +```shell nx storybook ui-lib-1 nx storybook ui-lib-2 ``` 2. Start the main Storybook: -```shell {% frame="none" %} +```shell nx storybook storybook-host ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-interaction-tests.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-interaction-tests.mdoc index b35badfdcc4fd..502a4f65a4243 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-interaction-tests.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/storybook-interaction-tests.mdoc @@ -18,7 +18,7 @@ You need to have Storybook already set up in your Nx workspace. If you don't hav When generating your Storybook configuration, make sure to answer `Yes` to the `Do you want to set up Storybook interaction tests?` prompt, or pass the `--interactionTests=true` flag when generating your Storybook configuration. -```shell {% frame="none" %} +```shell nx g @nx/storybook:configuration my-project --interactionTests=true ``` @@ -74,7 +74,7 @@ export const Primary: Story = { You can run your interaction tests using: -```shell {% frame="none" %} +```shell nx test-storybook my-project ``` @@ -82,7 +82,7 @@ This will run all the interaction tests in your Storybook stories. You can also run the tests in headless mode for CI: -```shell {% frame="none" %} +```shell nx test-storybook my-project --ci ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/upgrading-storybook.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/upgrading-storybook.mdoc index 9fde374e5f9cb..6ba7fe375213d 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/upgrading-storybook.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/Guides/upgrading-storybook.mdoc @@ -14,7 +14,7 @@ filter: 'type:Guides' In the root directory of your workspace, run: -```shell {% frame="none" %} +```shell npx storybook@latest upgrade ``` diff --git a/astro-docs/src/content/docs/technologies/test-tools/storybook/introduction.mdoc b/astro-docs/src/content/docs/technologies/test-tools/storybook/introduction.mdoc index 7124559d7e2b9..36bd7c272ccd3 100644 --- a/astro-docs/src/content/docs/technologies/test-tools/storybook/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/test-tools/storybook/introduction.mdoc @@ -20,7 +20,7 @@ Make sure to install the `@nx/storybook` version that matches the version of `nx In any Nx workspace, you can install `@nx/storybook` by running the following command: -```shell frame="none" +```shell nx add @nx/storybook ``` @@ -70,7 +70,7 @@ The `builtStorybookTargetName`, `serveStorybookTargetName`, `testStorybookTarget You can generate Storybook configuration for an individual project with this command: -```shell frame="none" +```shell nx g @nx/storybook:configuration project-name ``` @@ -79,21 +79,21 @@ or {% tabs %} {% tabitem label="Angular" %} -```shell frame="none" +```shell nx g @nx/angular:storybook-configuration my-angular-project ``` {% /tabitem %} {% tabitem label="React" %} -```shell frame="none" +```shell nx g @nx/react:storybook-configuration my-react-project ``` {% /tabitem %} {% tabitem label="Vue" %} -```shell frame="none" +```shell nx g @nx/vue:storybook-configuration my-vue-project ``` @@ -129,13 +129,13 @@ Make sure to **use the framework-specific generators** if your project is using Serve Storybook using this command: -```shell frame="none" +```shell nx run project-name:storybook ``` or -```shell frame="none" +```shell nx storybook project-name ``` @@ -143,13 +143,13 @@ nx storybook project-name Build Storybook using this command: -```shell frame="none" +```shell nx run project-name:build-storybook ``` or -```shell frame="none" +```shell nx build-storybook project-name ``` @@ -157,13 +157,13 @@ nx build-storybook project-name With the Storybook server running, you can test Storybook (run all the interaction tests) using this command: -```shell frame="none" +```shell nx run project-name:test-storybook ``` or -```shell frame="none" +```shell nx test-storybook project-name ``` diff --git a/astro-docs/src/content/docs/technologies/typescript/Guides/compile-multiple-formats.mdoc b/astro-docs/src/content/docs/technologies/typescript/Guides/compile-multiple-formats.mdoc index 3f2c36a636ab6..f666aa0defaa5 100644 --- a/astro-docs/src/content/docs/technologies/typescript/Guides/compile-multiple-formats.mdoc +++ b/astro-docs/src/content/docs/technologies/typescript/Guides/compile-multiple-formats.mdoc @@ -14,7 +14,7 @@ It can be difficult to set up a typescript library to compile to ESM and CommonJ If you do not use Rollup already, install the corresponding Nx plugin as follows: -```shell {% frame="none" %} +```shell nx add @nx/rollup ``` @@ -89,23 +89,24 @@ You'll need to specify `format`, `additionalEntryPoints` and `generateExportsFie After compiling our package using `nx build my-awesome-lib` we'll get the following output in our `dist` folder. -``` -my-awesome-lib -└─ . - ├─ README.md - ├─ foo.cjs.d.ts - ├─ foo.cjs.js - ├─ foo.esm.js - ├─ index.cjs.d.ts - ├─ index.cjs.js - ├─ index.esm.js - ├─ package.json - └─ src - ├─ foo.d.ts - ├─ index.d.ts - └─ lib - └─ my-awesome-lib.d.ts -``` +{% filetree %} + +- my-awesome-lib/ + - README.md + - foo.cjs.d.ts + - foo.cjs.js + - foo.esm.js + - index.cjs.d.ts + - index.cjs.js + - index.esm.js + - package.json + - src/ + - foo.d.ts + - index.d.ts + - lib/ + - my-awesome-lib.d.ts + +{% /filetree %} And our `package.json` will look like this: diff --git a/astro-docs/src/content/docs/technologies/typescript/Guides/enable-tsc-batch-mode.mdoc b/astro-docs/src/content/docs/technologies/typescript/Guides/enable-tsc-batch-mode.mdoc index d948172d25757..faba74dd24460 100644 --- a/astro-docs/src/content/docs/technologies/typescript/Guides/enable-tsc-batch-mode.mdoc +++ b/astro-docs/src/content/docs/technologies/typescript/Guides/enable-tsc-batch-mode.mdoc @@ -22,7 +22,7 @@ Building a project with the `@nx/js:tsc` executor in batch mode requires all dep To run your builds using the batch implementation, pass in `--batch` flag: -```shell {% frame="none" %} +```shell nx build my-project --batch ``` diff --git a/astro-docs/src/content/docs/technologies/typescript/Guides/js-and-ts.mdoc b/astro-docs/src/content/docs/technologies/typescript/Guides/js-and-ts.mdoc index 84829fadc7428..df761b22b37cf 100644 --- a/astro-docs/src/content/docs/technologies/typescript/Guides/js-and-ts.mdoc +++ b/astro-docs/src/content/docs/technologies/typescript/Guides/js-and-ts.mdoc @@ -10,7 +10,7 @@ Nx is a general-purpose build system and a general-purpose CLI. It works with Ja TypeScript is a great choice for many teams, but not for everyone. If you want to use Nx with JavaScript, simply pass `--js` to all generate commands, as follows: -```shell {% frame="none" %} +```shell nx g @nx/react:app apps/myapp --js nx g @nx/react:component apps/myapp/src/lib/mycmp --js ``` diff --git a/astro-docs/src/content/docs/technologies/typescript/introduction.mdoc b/astro-docs/src/content/docs/technologies/typescript/introduction.mdoc index 60f877049af4d..dd5694d85bf38 100644 --- a/astro-docs/src/content/docs/technologies/typescript/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/typescript/introduction.mdoc @@ -19,7 +19,7 @@ Make sure to install the `@nx/js` version that matches the version of `nx` in yo In any Nx workspace, you can install `@nx/js` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/js ``` @@ -32,14 +32,14 @@ When initializing a new Nx workspace, specifying `--preset=ts` will generate a w {% tabs %} {% tabitem label="npm" %} -```shell {% frame="none" %} +```shell npx create-nx-workspace my-org --preset=ts ``` {% /tabitem %} {% tabitem label="yarn" %} -```shell {% frame="none" %} +```shell yarn create nx-workspace my-org --preset=ts ``` @@ -159,7 +159,7 @@ To disable `typecheck` task for a specific project, set the `nx.addTypecheckTarg You can add a new JS/TS library with the following command: -```shell {% frame="none" %} +```shell nx g @nx/js:lib libs/my-lib ``` @@ -167,13 +167,13 @@ nx g @nx/js:lib libs/my-lib You can `build` libraries that are generated with a bundler specified. -```shell {% frame="none" %} +```shell nx g @nx/js:lib libs/my-buildable-lib --bundler=rollup ``` Generating a library with `--bundler` specified will add a `build` target to the library's `project.json` file allows the library to be built. -```shell {% frame="none" %} +```shell nx build my-buildable-lib ``` @@ -181,7 +181,7 @@ nx build my-buildable-lib You can test a library with the following command: -```shell {% frame="none" %} +```shell nx test my-lib ``` @@ -189,7 +189,7 @@ nx test my-lib You can lint a library with the following command: -```shell {% frame="none" %} +```shell nx lint my-lib ``` @@ -205,13 +205,13 @@ Currently, `@nx/js` supports the following compilers: - Create a buildable library with `swc` -```shell {% frame="none" %} +```shell nx g @nx/js:lib libs/my-swc-lib --bundler=swc ``` - Convert a `tsc` library to use `swc` -```shell {% frame="none" %} +```shell nx g @nx/js:convert-to-swc my-buildable-lib ``` diff --git a/astro-docs/src/content/docs/technologies/vue/introduction.mdoc b/astro-docs/src/content/docs/technologies/vue/introduction.mdoc index 6f3548a923b1d..aacf04a639194 100644 --- a/astro-docs/src/content/docs/technologies/vue/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/vue/introduction.mdoc @@ -22,7 +22,7 @@ Make sure to install the `@nx/vue` version that matches the version of `nx` in y In any Nx workspace, you can install `@nx/vue` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/vue ``` @@ -34,12 +34,12 @@ This will install the correct version of `@nx/vue`. To generate a Vue application, run the following: -```shell {% frame="none" %} +```shell nx g @nx/vue:app apps/my-app ``` To generate a Vue library, run the following: -```shell {% frame="none" %} +```shell nx g @nx/vue:lib libs/my-lib ``` diff --git a/astro-docs/src/content/docs/technologies/vue/nuxt/Guides/deploy-nuxt-to-vercel.mdoc b/astro-docs/src/content/docs/technologies/vue/nuxt/Guides/deploy-nuxt-to-vercel.mdoc index 9f248c13950f1..8e9d69fc12d8b 100644 --- a/astro-docs/src/content/docs/technologies/vue/nuxt/Guides/deploy-nuxt-to-vercel.mdoc +++ b/astro-docs/src/content/docs/technologies/vue/nuxt/Guides/deploy-nuxt-to-vercel.mdoc @@ -85,7 +85,7 @@ export default defineNuxtConfig({ 2. Ensure the Nuxt.js "Framework Preset" is selected 3. Expand the "Build & Development Settings" and toggle the override switch for the build command. For example, for an application named `my-app` the value will look like this: -```shell {% frame="none" %} +```shell npx nx build my-app --prod ``` diff --git a/astro-docs/src/content/docs/technologies/vue/nuxt/introduction.mdoc b/astro-docs/src/content/docs/technologies/vue/nuxt/introduction.mdoc index fd9c56e6af7e7..0c62454b0aa43 100644 --- a/astro-docs/src/content/docs/technologies/vue/nuxt/introduction.mdoc +++ b/astro-docs/src/content/docs/technologies/vue/nuxt/introduction.mdoc @@ -14,7 +14,7 @@ You can create a new workspace that uses Nuxt with one of the following commands - Generate a new monorepo with a Nuxt app -```shell {% frame="none" %} +```shell npx create-nx-workspace@latest --preset=nuxt ``` @@ -26,7 +26,7 @@ Make sure to install the `@nx/nuxt` version that matches the version of `nx` in In any Nx workspace, you can install `@nx/nuxt` by running the following command: -```shell {% frame="none" %} +```shell nx add @nx/nuxt ``` @@ -77,7 +77,7 @@ The `buildStaticTargetName` and `serveStaticTargetName` options control the name ### Generate a new Nuxt app -```shell {% frame="none" %} +```shell nx g @nx/nuxt:app apps/my-app ``` @@ -97,7 +97,7 @@ This feature is particularly useful for testing in continuous integration (CI) p To utilize the `serve-static` target for testing, run the following command: -```shell {% frame="none" %} +```shell nx serve-static my-nuxt-app-e2e ``` diff --git a/astro-docs/src/content/docs/troubleshooting/performance-profiling.mdoc b/astro-docs/src/content/docs/troubleshooting/performance-profiling.mdoc index 43aa3d7951631..6d24d1cdbf7cf 100644 --- a/astro-docs/src/content/docs/troubleshooting/performance-profiling.mdoc +++ b/astro-docs/src/content/docs/troubleshooting/performance-profiling.mdoc @@ -13,7 +13,7 @@ Visualizing where and when the tasks were executed can help optimize the entire 1. Prepend `NX_PROFILE=profile.json` before running targets with Nx. For example, -```shell {% frame="none" %} +```shell # This builds the "cart" application and creates a profile.json file NX_PROFILE=profile.json nx build cart @@ -44,6 +44,6 @@ To investigate and optimize these slowdowns, you can use the `NX_PERF_LOGGING` [ Here's an example of running the `build` of the `admin` project with performance logging enabled: -```shell {% frame="none" %} +```shell NX_PERF_LOGGING=true NX_DAEMON=false npx nx build admin ``` diff --git a/astro-docs/src/content/docs/troubleshooting/troubleshoot-convert-to-inferred.mdoc b/astro-docs/src/content/docs/troubleshooting/troubleshoot-convert-to-inferred.mdoc index fe2f030c6b998..69a6a15cad399 100644 --- a/astro-docs/src/content/docs/troubleshooting/troubleshoot-convert-to-inferred.mdoc +++ b/astro-docs/src/content/docs/troubleshooting/troubleshoot-convert-to-inferred.mdoc @@ -12,7 +12,7 @@ that will switch from executor-based tasks to inferred tasks. To see a list of the available migration generators, run: -```shell {% frame="none" %} +```shell nx g convert-to-inferred ``` diff --git a/astro-docs/src/content/docs/troubleshooting/unknown-local-cache.mdoc b/astro-docs/src/content/docs/troubleshooting/unknown-local-cache.mdoc index b7916d4d708cf..918b4c8fa14e6 100644 --- a/astro-docs/src/content/docs/troubleshooting/unknown-local-cache.mdoc +++ b/astro-docs/src/content/docs/troubleshooting/unknown-local-cache.mdoc @@ -6,7 +6,7 @@ filter: 'type:References' This document will explain why the following errors happen and how to address them. -``` +```text NX Invalid Cache Directory for Task "myapp:build" The local cache artifact in ".nx/cache/nx/786524780459028195" was not generated on this machine. @@ -15,7 +15,7 @@ If your machine ID has changed since the artifact was cached, run "nx reset" to Read about the error and how to address it here: https://nx.dev/troubleshooting/unknown-local-cache ``` -``` +```text NX Unrecognized Cache Artifacts Nx found unrecognized artifacts in the cache directory and will not be able to use them. diff --git a/nx.json b/nx.json index 757fb325330c9..67c119a221673 100644 --- a/nx.json +++ b/nx.json @@ -444,6 +444,12 @@ }, { "rule": "./tools/workspace-plugin/src/conformance-rules/no-ignored-tracked-files" + }, + { + "rule": "./tools/workspace-plugin/src/conformance-rules/codeblock-language" + }, + { + "rule": "./tools/workspace-plugin/src/conformance-rules/relative-image-imports" } ] } diff --git a/package.json b/package.json index 37ab6796c56b2..851e923cbc2ea 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@nuxt/kit": "^3.10.0", "@nuxt/schema": "^3.10.0", "@nx/angular": "22.0.0-rc.0", - "@nx/conformance": "3.0.0", + "@nx/conformance": "4.0.0", "@nx/cypress": "22.0.0-rc.0", "@nx/devkit": "22.0.0-rc.0", "@nx/enterprise-cloud": "3.0.0", diff --git a/packages/angular/src/migrations/update-20-2-0/update-angular-cli.md b/packages/angular/src/migrations/update-20-2-0/update-angular-cli.md index ec99b17983ad2..56d75d9e2e4f9 100644 --- a/packages/angular/src/migrations/update-20-2-0/update-angular-cli.md +++ b/packages/angular/src/migrations/update-20-2-0/update-angular-cli.md @@ -9,7 +9,7 @@ Update in `devDependencies`: {% tabs %} {% tab label="Before" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "devDependencies": { "@angular/cli": "~13.3.0" @@ -20,7 +20,7 @@ Update in `devDependencies`: {% /tab %} {% tab label="After" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "devDependencies": { "@angular/cli": "~19.0.0" @@ -36,7 +36,7 @@ Update in `dependencies`: {% tabs %} {% tab label="Before" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "dependencies": { "@angular/cli": "~13.3.0" @@ -47,7 +47,7 @@ Update in `dependencies`: {% /tab %} {% tab label="After" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "dependencies": { "@angular/cli": "~19.0.0" diff --git a/packages/angular/src/migrations/update-20-4-0/update-angular-cli.md b/packages/angular/src/migrations/update-20-4-0/update-angular-cli.md index 11ff4b8d75f2e..c5762bbee895f 100644 --- a/packages/angular/src/migrations/update-20-4-0/update-angular-cli.md +++ b/packages/angular/src/migrations/update-20-4-0/update-angular-cli.md @@ -9,7 +9,7 @@ Update in `devDependencies`: {% tabs %} {% tab label="Before" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "devDependencies": { "@angular/cli": "~13.3.0" @@ -20,7 +20,7 @@ Update in `devDependencies`: {% /tab %} {% tab label="After" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "devDependencies": { "@angular/cli": "~19.1.0" @@ -36,7 +36,7 @@ Update in `dependencies`: {% tabs %} {% tab label="Before" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "dependencies": { "@angular/cli": "~13.3.0" @@ -47,7 +47,7 @@ Update in `dependencies`: {% /tab %} {% tab label="After" %} -```{% fileName="package.json" %} +```json {% fileName="package.json" %} { "dependencies": { "@angular/cli": "~19.1.0" diff --git a/packages/gradle/src/migrations/21-1-2/change-plugin-version-0-1-0.md b/packages/gradle/src/migrations/21-1-2/change-plugin-version-0-1-0.md index 2fa84fc9c3bfa..a7c55e9d46916 100644 --- a/packages/gradle/src/migrations/21-1-2/change-plugin-version-0-1-0.md +++ b/packages/gradle/src/migrations/21-1-2/change-plugin-version-0-1-0.md @@ -7,7 +7,7 @@ Change dev.nx.gradle.project-graph to version 0.1.0 in build file {% tabs %} {% tab label="Before" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.0.5" } @@ -16,7 +16,7 @@ plugins { {% /tab %} {% tab label="After" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.0" } diff --git a/packages/gradle/src/migrations/21-3-0/change-plugin-version-0-1-2.md b/packages/gradle/src/migrations/21-3-0/change-plugin-version-0-1-2.md index f7b3b7a98c93e..b62529c4df121 100644 --- a/packages/gradle/src/migrations/21-3-0/change-plugin-version-0-1-2.md +++ b/packages/gradle/src/migrations/21-3-0/change-plugin-version-0-1-2.md @@ -7,7 +7,7 @@ Change dev.nx.gradle.project-graph to version 0.1.2 in build file {% tabs %} {% tab label="Before" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.0" } @@ -16,7 +16,7 @@ plugins { {% /tab %} {% tab label="After" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.2" } diff --git a/packages/gradle/src/migrations/21-3-11/change-plugin-version-0-1-4.md b/packages/gradle/src/migrations/21-3-11/change-plugin-version-0-1-4.md index 09383bf008225..ec7a994a015d9 100644 --- a/packages/gradle/src/migrations/21-3-11/change-plugin-version-0-1-4.md +++ b/packages/gradle/src/migrations/21-3-11/change-plugin-version-0-1-4.md @@ -7,7 +7,7 @@ Change dev.nx.gradle.project-graph to version 0.1.4 in build file {% tabs %} {% tab label="Before" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.2" } @@ -16,7 +16,7 @@ plugins { {% /tab %} {% tab label="After" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.4" } diff --git a/packages/gradle/src/migrations/21-4-0/change-plugin-version-0-1-5.md b/packages/gradle/src/migrations/21-4-0/change-plugin-version-0-1-5.md index 3993b7bf7e562..a339b49e9b841 100644 --- a/packages/gradle/src/migrations/21-4-0/change-plugin-version-0-1-5.md +++ b/packages/gradle/src/migrations/21-4-0/change-plugin-version-0-1-5.md @@ -7,7 +7,7 @@ Change dev.nx.gradle.project-graph to version 0.1.5 in build file {% tabs %} {% tab label="Before" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.0" } @@ -16,7 +16,7 @@ plugins { {% /tab %} {% tab label="After" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.5" } diff --git a/packages/gradle/src/migrations/21-4-1/change-plugin-version-0-1-6.md b/packages/gradle/src/migrations/21-4-1/change-plugin-version-0-1-6.md index 60ef4462b1d19..b8600e05cdbb9 100644 --- a/packages/gradle/src/migrations/21-4-1/change-plugin-version-0-1-6.md +++ b/packages/gradle/src/migrations/21-4-1/change-plugin-version-0-1-6.md @@ -7,7 +7,7 @@ Change dev.nx.gradle.project-graph to version 0.1.6 in build file {% tabs %} {% tab label="Before" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.0" } @@ -16,7 +16,7 @@ plugins { {% /tab %} {% tab label="After" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.6" } diff --git a/packages/gradle/src/migrations/21-5-1/change-plugin-version-0-1-7.md b/packages/gradle/src/migrations/21-5-1/change-plugin-version-0-1-7.md index e12be66bc1795..4a08cca91a599 100644 --- a/packages/gradle/src/migrations/21-5-1/change-plugin-version-0-1-7.md +++ b/packages/gradle/src/migrations/21-5-1/change-plugin-version-0-1-7.md @@ -7,7 +7,7 @@ Change dev.nx.gradle.project-graph to version 0.1.7 in build file {% tabs %} {% tab label="Before" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.0" } @@ -16,7 +16,7 @@ plugins { {% /tab %} {% tab label="After" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.7" } diff --git a/packages/gradle/src/migrations/21-6-1/change-plugin-version-0-1-8.md b/packages/gradle/src/migrations/21-6-1/change-plugin-version-0-1-8.md index 519ad242c9350..2ae5210344d6b 100644 --- a/packages/gradle/src/migrations/21-6-1/change-plugin-version-0-1-8.md +++ b/packages/gradle/src/migrations/21-6-1/change-plugin-version-0-1-8.md @@ -7,7 +7,7 @@ Change dev.nx.gradle.project-graph to version 0.1.8 in build file {% tabs %} {% tab label="Before" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.0" } @@ -16,7 +16,7 @@ plugins { {% /tab %} {% tab label="After" %} -```{% fileName="build.gradle" %} +```text {% fileName="build.gradle" %} plugins { id "dev.nx.gradle.project-graph" version "0.1.8" } diff --git a/packages/nx/src/migrations/update-17-0-0/move-cache-directory.md b/packages/nx/src/migrations/update-17-0-0/move-cache-directory.md index 4d83bc51f427c..5fb594da6b2e9 100644 --- a/packages/nx/src/migrations/update-17-0-0/move-cache-directory.md +++ b/packages/nx/src/migrations/update-17-0-0/move-cache-directory.md @@ -5,14 +5,14 @@ Add `.nx/cache` to the `.gitignore` file. {% tabs %} {% tab label="Before" %} -```{% fileName=".gitignore" %} +```text {% fileName=".gitignore" %} node_modules ``` {% /tab %} {% tab label="After" %} -```{% highlightLines=[2] fileName=".gitignore" %} +```text {% highlightLines=[2] fileName=".gitignore" %} node_modules .nx/cache ``` diff --git a/packages/rollup/src/docs/rollup-examples.md b/packages/rollup/src/docs/rollup-examples.md index 2aec352f913bb..125cc29f037f7 100644 --- a/packages/rollup/src/docs/rollup-examples.md +++ b/packages/rollup/src/docs/rollup-examples.md @@ -54,7 +54,7 @@ Then for each package, you must have a `.babelrc` file that will be applied to t All packages will use its own `.babelrc` file, thus you must ensure the right presets and plugins are set in each config file. This behavior can lead to build discrepancies between packages, so we recommend that you don't set `babelUpwardRootMode` at all. -```treeview +```text ├── packages │ ├── a │ │ └── .babelrc diff --git a/packages/vite/src/migrations/update-20-5-0/update-resolve-conditions.md b/packages/vite/src/migrations/update-20-5-0/update-resolve-conditions.md index 3271d235d0e51..a4d778deea9d4 100644 --- a/packages/vite/src/migrations/update-20-5-0/update-resolve-conditions.md +++ b/packages/vite/src/migrations/update-20-5-0/update-resolve-conditions.md @@ -16,7 +16,7 @@ Remix does not currently support Vite 6 and therefore any `vite.config` file for {% tabs %} {% tab label="Before" %} -```{% fileName="vite.config.ts" %} +```typescript {% fileName="vite.config.ts" %} import { defineConfig } from 'vite'; export default defineConfig({ @@ -32,7 +32,7 @@ export default defineConfig({ {% /tab %} {% tab label="After" %} -```{% highlightLines=[4,5,6] fileName="vite.config.ts" %} +```typescript {% highlightLines=[4,5,6] fileName="vite.config.ts" %} import { defineConfig } from 'vite'; export default defineConfig({ diff --git a/packages/webpack/docs/webpack-build-executor-examples.md b/packages/webpack/docs/webpack-build-executor-examples.md index 9a706229d6c68..4648bb7f09c6c 100644 --- a/packages/webpack/docs/webpack-build-executor-examples.md +++ b/packages/webpack/docs/webpack-build-executor-examples.md @@ -68,7 +68,7 @@ Then for each package, you must have a `.babelrc` file that will be applied to t All packages will use its own `.babelrc` file, thus you must ensure the right presets and plugins are set in each config file. This behavior can lead to build discrepancies between packages, so we recommend that you don't set `babelUpwardRootMode` at all. -```treeview +```text ├── apps │ └── demo │ └── .babelrc diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4816f22ecf56a..a910821b364f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -356,8 +356,8 @@ importers: specifier: 22.0.0-rc.0 version: 22.0.0-rc.0(b747f681408547cd9ba1dd2d41295c16) '@nx/conformance': - specifier: 3.0.0 - version: 3.0.0(@nx/js@22.0.0-rc.0(@babel/traverse@7.28.3)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(verdaccio@6.0.5(encoding@0.1.13)(typanion@3.14.0)))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))) + specifier: 4.0.0 + version: 4.0.0(@nx/js@22.0.0-rc.0(@babel/traverse@7.28.3)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(verdaccio@6.0.5(encoding@0.1.13)(typanion@3.14.0)))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))) '@nx/cypress': specifier: 22.0.0-rc.0 version: 22.0.0-rc.0(@babel/traverse@7.28.3)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@zkochan/js-yaml@0.0.7)(cypress@14.3.0)(eslint@8.57.0)(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(typescript@5.9.2)(verdaccio@6.0.5(encoding@0.1.13)(typanion@3.14.0)) @@ -6028,6 +6028,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.19.9': + resolution: {integrity: sha512-q4cR+6ZD0938R19MyEW3jEsMzbb/1rulLXiNAJQADD/XYp7pT+rOS5JGxvpRW8dFDEfjW4wLgC/3FXIw4zYglQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} @@ -6064,6 +6070,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.19.9': + resolution: {integrity: sha512-jkYjjq7SdsWuNI6b5quymW0oC83NN5FdRPuCbs9HZ02mfVdAP8B8eeqLSYU3gb6OJEaY5CQabtTFbqBf26H3GA==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} @@ -6100,6 +6112,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.19.9': + resolution: {integrity: sha512-KOqoPntWAH6ZxDwx1D6mRntIgZh9KodzgNOy5Ebt9ghzffOk9X2c1sPwtM9P+0eXbefnDhqYfkh5PLP5ULtWFA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} @@ -6136,6 +6154,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.19.9': + resolution: {integrity: sha512-KBJ9S0AFyLVx2E5D8W0vExqRW01WqRtczUZ8NRu+Pi+87opZn5tL4Y0xT0mA4FtHctd0ZgwNoN639fUUGlNIWw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} @@ -6172,6 +6196,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.19.9': + resolution: {integrity: sha512-vE0VotmNTQaTdX0Q9dOHmMTao6ObjyPm58CHZr1UK7qpNleQyxlFlNCaHsHx6Uqv86VgPmR4o2wdNq3dP1qyDQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} @@ -6208,6 +6238,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.19.9': + resolution: {integrity: sha512-uFQyd/o1IjiEk3rUHSwUKkqZwqdvuD8GevWF065eqgYfexcVkxh+IJgwTaGZVu59XczZGcN/YMh9uF1fWD8j1g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} @@ -6244,6 +6280,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.19.9': + resolution: {integrity: sha512-WMLgWAtkdTbTu1AWacY7uoj/YtHthgqrqhf1OaEWnZb7PQgpt8eaA/F3LkV0E6K/Lc0cUr/uaVP/49iE4M4asA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} @@ -6280,6 +6322,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.19.9': + resolution: {integrity: sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} @@ -6316,6 +6364,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.19.9': + resolution: {integrity: sha512-C/ChPohUYoyUaqn1h17m/6yt6OB14hbXvT8EgM1ZWaiiTYz7nWZR0SYmMnB5BzQA4GXl3BgBO1l8MYqL/He3qw==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} @@ -6352,6 +6406,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.19.9': + resolution: {integrity: sha512-f37i/0zE0MjDxijkPSQw1CO/7C27Eojqb+r3BbHVxMLkj8GCa78TrBZzvPyA/FNLUMzP3eyHCVkAopkKVja+6Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} @@ -6388,6 +6448,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.19.9': + resolution: {integrity: sha512-t6mN147pUIf3t6wUt3FeumoOTPfmv9Cc6DQlsVBpB7eCpLOqQDyWBP1ymXn1lDw4fNUSb/gBcKAmvTP49oIkaA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} @@ -6424,6 +6490,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.19.9': + resolution: {integrity: sha512-jg9fujJTNTQBuDXdmAg1eeJUL4Jds7BklOTkkH80ZgQIoCTdQrDaHYgbFZyeTq8zbY+axgptncko3v9p5hLZtw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} @@ -6460,6 +6532,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.19.9': + resolution: {integrity: sha512-tkV0xUX0pUUgY4ha7z5BbDS85uI7ABw3V1d0RNTii7E9lbmV8Z37Pup2tsLV46SQWzjOeyDi1Q7Wx2+QM8WaCQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} @@ -6496,6 +6574,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.19.9': + resolution: {integrity: sha512-DfLp8dj91cufgPZDXr9p3FoR++m3ZJ6uIXsXrIvJdOjXVREtXuQCjfMfvmc3LScAVmLjcfloyVtpn43D56JFHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} @@ -6532,6 +6616,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.19.9': + resolution: {integrity: sha512-zHbglfEdC88KMgCWpOl/zc6dDYJvWGLiUtmPRsr1OgCViu3z5GncvNVdf+6/56O2Ca8jUU+t1BW261V6kp8qdw==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} @@ -6568,6 +6658,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.19.9': + resolution: {integrity: sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} @@ -6628,6 +6724,12 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.19.9': + resolution: {integrity: sha512-GThgZPAwOBOsheA2RUlW5UeroRfESwMq/guy8uEe3wJlAOjpOXuSevLRd70NZ37ZrpO6RHGHgEHvPg1h3S1Jug==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} @@ -6688,6 +6790,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.19.9': + resolution: {integrity: sha512-Ki6PlzppaFVbLnD8PtlVQfsYw4S9n3eQl87cqgeIw+O3sRr9IghpfSKY62mggdt1yCSZ8QWvTZ9jo9fjDSg9uw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} @@ -6736,6 +6844,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.19.9': + resolution: {integrity: sha512-MLHj7k9hWh4y1ddkBpvRj2b9NCBhfgBt3VpWbHQnXRedVun/hC7sIyTGDGTfsGuXo4ebik2+3ShjcPbhtFwWDw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} @@ -6772,6 +6886,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.19.9': + resolution: {integrity: sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} @@ -6808,6 +6928,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.19.9': + resolution: {integrity: sha512-UOozV7Ntykvr5tSOlGCrqU3NBr3d8JqPes0QWN2WOXfvkWVGRajC+Ym0/Wj88fUgecUCLDdJPDF0Nna2UK3Qtg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} @@ -6844,6 +6970,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.19.9': + resolution: {integrity: sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -8849,8 +8981,8 @@ packages: ng-packagr: optional: true - '@nx/conformance@3.0.0': - resolution: {integrity: sha512-GojZtOwWjojqIM9oAmvsPRhbprtlOFgY0/fbjdjymuJJ3SBl5eY9LGFHavGoIvyCPOsQeG3mGo+qxw3rlaXZQg==} + '@nx/conformance@4.0.0': + resolution: {integrity: sha512-Y30YMZlnmt7AwVy0HRVjsmnUpTseZRcw9+Cy2CS1a4dfTKZERH2CttR4bog9NGw7i6FQFxFyujJZTo/w8tzQdw==} hasBin: true peerDependencies: '@nx/js': '>= 18 < 22' @@ -8874,6 +9006,11 @@ packages: peerDependencies: nx: 21.0.0 + '@nx/devkit@21.5.1': + resolution: {integrity: sha512-eVFFLMUcxO/holHdWo0YabyUs6H3wNvnovt/0LddIRGoiMHWpbFZLB/KThiyUWvuFVuqqyDzRmS0XRo/M2kOqQ==} + peerDependencies: + nx: '>= 20 <= 22' + '@nx/devkit@22.0.0-rc.0': resolution: {integrity: sha512-+0apqedSEJMejjgkwrLfW7ubCax8T/BtiaemjMOOa+pNqErAVbQEBKuUggrySGbsY+u1rdbEpmCR2ynys+aO0A==} peerDependencies: @@ -8965,58 +9102,116 @@ packages: cpu: [arm64] os: [darwin] + '@nx/key-darwin-arm64@4.0.0': + resolution: {integrity: sha512-TnKePtrLWaDS/m001FSYOadhAHCTpcHbQnx0TYY+G3ISeDsNCC2ORVrWc4zjbgmxUNvi7J0NqfSyJk4MvKIqKg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + '@nx/key-darwin-x64@3.0.0': resolution: {integrity: sha512-eMV1Nkb4+/k7/qjPuLFjgQriSyupphWHrf+Wc5nD41G8j+Nf7SVYliiQ8Bl4/pgxr7TxCXw0vFa5FsYcIHdOzQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] + '@nx/key-darwin-x64@4.0.0': + resolution: {integrity: sha512-p1XB9IWBIPMvBp7D4QImgk4zFw07aEj5A7mUGBFNKr+Em2xc+EE8aWOarOz2GaRpFUaNbS5TjNLsL7JTWk6kuA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + '@nx/key-linux-arm-gnueabihf@3.0.0': resolution: {integrity: sha512-Ra8dsogoCyxM8W/QrLuRR4O4gU/bcFPnnzhIeQ6mTfnEtGQlqZFBDVWSjjJKVoRzwtAnruJX1liDtnUaNUg5yQ==} engines: {node: '>= 10'} cpu: [arm] os: [linux] + '@nx/key-linux-arm-gnueabihf@4.0.0': + resolution: {integrity: sha512-V9PI6UBa5H4PpIv5XgUoKooYlrsXDxQT6bqTT84S8PFrZ2GQM9SrlcE4qrQ+WQj6xF/nDg5xZz2bwhqXHlE2Cw==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + '@nx/key-linux-arm64-gnu@3.0.0': resolution: {integrity: sha512-Wrg4CYfLIQB8wmfX15lDVNeg1ivrh9B+m0eEHq1BjXAVwKuT74B5l8kquKa0GihMY0SdkGCrNCttC3Dgtm/vaQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@nx/key-linux-arm64-gnu@4.0.0': + resolution: {integrity: sha512-DYy9Q5ss5uoktZ3IA2Top25l3QsFXdXlkHLpD9h6dmqAKy3rAhOlNHaMTTPhvRiC9lemBQl1TQ7xcZeUQA2LWg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@nx/key-linux-arm64-musl@3.0.0': resolution: {integrity: sha512-vAlICrMMY5LjzoAN6elAKbkqhfKVki2uqjTF9IPULBX4BZGH8qY0VAhXjwprKkrA4044ND5TI2MIWs3OWQetMA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@nx/key-linux-arm64-musl@4.0.0': + resolution: {integrity: sha512-UKqaA0tNaqYCNFOAXwdZsozl09eIrLg3JwDu4N3U0Z8NQAQoqfOacDq/23d9D7lO+uR7Umsi7xl5h578MPrTKQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@nx/key-linux-x64-gnu@3.0.0': resolution: {integrity: sha512-51gwUYJP3SzTMwVioIXSERs63gaKg7Avlhr84dHPLcM7sABHzHaDfpiD7xl5dlKLn1+2cGETdiShUllBdC/Xvg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@nx/key-linux-x64-gnu@4.0.0': + resolution: {integrity: sha512-RC4FpcJ+72J8NgJnhwx4XyO1xm0zHzZKe3Wz3xg2LAUj/h/RVWJmqiSVcAItZcBk0XNEvJXR9YlKkT615+Y//A==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@nx/key-linux-x64-musl@3.0.0': resolution: {integrity: sha512-DG3ecD1gNzEQmE0kSRZcLE7SFY0hFVKgtuNBxuui/OJRgk0HG0yNTqxoNBEfEFKbHIZvKY0Ga2xq3+ELq7tAcQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@nx/key-linux-x64-musl@4.0.0': + resolution: {integrity: sha512-GNORZAgYLPm1I3sJSLukbBv3ac4ctbN1HsPBPzrSxHJygr6R/AaLGEmCVlhOgl2eD+x47Dqcg5WonuY9nwfl8Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@nx/key-win32-arm64-msvc@3.0.0': resolution: {integrity: sha512-4KHAnabcyyewMpXEp+SfV/Lwn4pmHZu1idg6vipIpI+wiUHPNS2tEx8cLloVEM08/Bf6O+WW8bqveyz6uNhvNw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] + '@nx/key-win32-arm64-msvc@4.0.0': + resolution: {integrity: sha512-liOMgjzIZbAtePSSpwPER7QIcUTuf883UAFpaQ8v/6w8egysKbJNEOmBk+ANig6/zJ5p6I0S4a7B8J/gUk0tXg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + '@nx/key-win32-x64-msvc@3.0.0': resolution: {integrity: sha512-Ym5ZEphBiYyDnESgMfAG99jYWqXghPTeOxAp6+FhZ5IB00+sAkIbGqOEx6sMxa+BOyDst8XlUoFsn8+14csi5w==} engines: {node: '>= 10'} cpu: [x64] os: [win32] + '@nx/key-win32-x64-msvc@4.0.0': + resolution: {integrity: sha512-jfsRGnaWv75JQxO/r8QlllbIHVD/VKaSM4GGEyUmO8aXWRwEB4SIAtlYQSIyLAdkV68qzIPkfJjCGGNWGeFt7g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + '@nx/key@3.0.0': resolution: {integrity: sha512-Lz1oDkih4bXVnuXp2vzL4MM5Ep6m+5yyftvB5qD9IAS2cCpqVEDLDwnTkqdOpdz681jtXUCJ5UlZy9yRuGPaww==} engines: {node: '>= 10'} + '@nx/key@4.0.0': + resolution: {integrity: sha512-oXYTVb79zV3J3GIMT0jUzzPBSzd6Z5ku4hkfvpSfFAQ8b0LGzNMuPWkw+wfbR7vOZZSQ2iAEzLNEm4r1O9zHnw==} + engines: {node: '>= 10'} + '@nx/module-federation@22.0.0-rc.0': resolution: {integrity: sha512-ROQB84z4s3iZcaZVG6Jtjgo3+NmA9WX9dVPSzm+f6AHzZM/ac89a9CwrDluWLDJTCuAFIqEENsY0+iyHQbNJ4g==} @@ -14852,6 +15047,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.19.9: + resolution: {integrity: sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg==} + engines: {node: '>=12'} + hasBin: true + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -28811,6 +29011,9 @@ snapshots: '@esbuild/android-arm64@0.17.6': optional: true + '@esbuild/android-arm64@0.19.9': + optional: true + '@esbuild/android-arm64@0.21.5': optional: true @@ -28829,6 +29032,9 @@ snapshots: '@esbuild/android-arm@0.17.6': optional: true + '@esbuild/android-arm@0.19.9': + optional: true + '@esbuild/android-arm@0.21.5': optional: true @@ -28847,6 +29053,9 @@ snapshots: '@esbuild/android-x64@0.17.6': optional: true + '@esbuild/android-x64@0.19.9': + optional: true + '@esbuild/android-x64@0.21.5': optional: true @@ -28865,6 +29074,9 @@ snapshots: '@esbuild/darwin-arm64@0.17.6': optional: true + '@esbuild/darwin-arm64@0.19.9': + optional: true + '@esbuild/darwin-arm64@0.21.5': optional: true @@ -28883,6 +29095,9 @@ snapshots: '@esbuild/darwin-x64@0.17.6': optional: true + '@esbuild/darwin-x64@0.19.9': + optional: true + '@esbuild/darwin-x64@0.21.5': optional: true @@ -28901,6 +29116,9 @@ snapshots: '@esbuild/freebsd-arm64@0.17.6': optional: true + '@esbuild/freebsd-arm64@0.19.9': + optional: true + '@esbuild/freebsd-arm64@0.21.5': optional: true @@ -28919,6 +29137,9 @@ snapshots: '@esbuild/freebsd-x64@0.17.6': optional: true + '@esbuild/freebsd-x64@0.19.9': + optional: true + '@esbuild/freebsd-x64@0.21.5': optional: true @@ -28937,6 +29158,9 @@ snapshots: '@esbuild/linux-arm64@0.17.6': optional: true + '@esbuild/linux-arm64@0.19.9': + optional: true + '@esbuild/linux-arm64@0.21.5': optional: true @@ -28955,6 +29179,9 @@ snapshots: '@esbuild/linux-arm@0.17.6': optional: true + '@esbuild/linux-arm@0.19.9': + optional: true + '@esbuild/linux-arm@0.21.5': optional: true @@ -28973,6 +29200,9 @@ snapshots: '@esbuild/linux-ia32@0.17.6': optional: true + '@esbuild/linux-ia32@0.19.9': + optional: true + '@esbuild/linux-ia32@0.21.5': optional: true @@ -28991,6 +29221,9 @@ snapshots: '@esbuild/linux-loong64@0.17.6': optional: true + '@esbuild/linux-loong64@0.19.9': + optional: true + '@esbuild/linux-loong64@0.21.5': optional: true @@ -29009,6 +29242,9 @@ snapshots: '@esbuild/linux-mips64el@0.17.6': optional: true + '@esbuild/linux-mips64el@0.19.9': + optional: true + '@esbuild/linux-mips64el@0.21.5': optional: true @@ -29027,6 +29263,9 @@ snapshots: '@esbuild/linux-ppc64@0.17.6': optional: true + '@esbuild/linux-ppc64@0.19.9': + optional: true + '@esbuild/linux-ppc64@0.21.5': optional: true @@ -29045,6 +29284,9 @@ snapshots: '@esbuild/linux-riscv64@0.17.6': optional: true + '@esbuild/linux-riscv64@0.19.9': + optional: true + '@esbuild/linux-riscv64@0.21.5': optional: true @@ -29063,6 +29305,9 @@ snapshots: '@esbuild/linux-s390x@0.17.6': optional: true + '@esbuild/linux-s390x@0.19.9': + optional: true + '@esbuild/linux-s390x@0.21.5': optional: true @@ -29081,6 +29326,9 @@ snapshots: '@esbuild/linux-x64@0.17.6': optional: true + '@esbuild/linux-x64@0.19.9': + optional: true + '@esbuild/linux-x64@0.21.5': optional: true @@ -29111,6 +29359,9 @@ snapshots: '@esbuild/netbsd-x64@0.17.6': optional: true + '@esbuild/netbsd-x64@0.19.9': + optional: true + '@esbuild/netbsd-x64@0.21.5': optional: true @@ -29141,6 +29392,9 @@ snapshots: '@esbuild/openbsd-x64@0.17.6': optional: true + '@esbuild/openbsd-x64@0.19.9': + optional: true + '@esbuild/openbsd-x64@0.21.5': optional: true @@ -29165,6 +29419,9 @@ snapshots: '@esbuild/sunos-x64@0.17.6': optional: true + '@esbuild/sunos-x64@0.19.9': + optional: true + '@esbuild/sunos-x64@0.21.5': optional: true @@ -29183,6 +29440,9 @@ snapshots: '@esbuild/win32-arm64@0.17.6': optional: true + '@esbuild/win32-arm64@0.19.9': + optional: true + '@esbuild/win32-arm64@0.21.5': optional: true @@ -29201,6 +29461,9 @@ snapshots: '@esbuild/win32-ia32@0.17.6': optional: true + '@esbuild/win32-ia32@0.19.9': + optional: true + '@esbuild/win32-ia32@0.21.5': optional: true @@ -29219,6 +29482,9 @@ snapshots: '@esbuild/win32-x64@0.17.6': optional: true + '@esbuild/win32-x64@0.19.9': + optional: true + '@esbuild/win32-x64@0.21.5': optional: true @@ -32098,13 +32364,13 @@ snapshots: - webpack-cli - webpack-hot-middleware - '@nx/conformance@3.0.0(@nx/js@22.0.0-rc.0(@babel/traverse@7.28.3)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(verdaccio@6.0.5(encoding@0.1.13)(typanion@3.14.0)))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))': + '@nx/conformance@4.0.0(@nx/js@22.0.0-rc.0(@babel/traverse@7.28.3)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(verdaccio@6.0.5(encoding@0.1.13)(typanion@3.14.0)))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))': dependencies: - '@nx/devkit': 21.0.0(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))) + '@nx/devkit': 21.5.1(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))) '@nx/js': 22.0.0-rc.0(@babel/traverse@7.28.3)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(verdaccio@6.0.5(encoding@0.1.13)(typanion@3.14.0)) - '@nx/key': 3.0.0 + '@nx/key': 4.0.0 ajv: 8.17.1 - esbuild: 0.21.5 + esbuild: 0.19.9 nx: 22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)) picocolors: 1.1.1 semver: 7.5.4 @@ -32160,6 +32426,18 @@ snapshots: tslib: 2.8.1 yargs-parser: 21.1.1 + '@nx/devkit@21.5.1(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))': + dependencies: + ejs: 3.1.10 + enquirer: 2.3.6 + ignore: 5.3.2 + minimatch: 9.0.3 + nx: 22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)) + semver: 7.7.2 + tmp: 0.2.4 + tslib: 2.8.1 + yargs-parser: 21.1.1 + '@nx/devkit@22.0.0-rc.0(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))': dependencies: '@zkochan/js-yaml': 0.0.7 @@ -32344,30 +32622,57 @@ snapshots: '@nx/key-darwin-arm64@3.0.0': optional: true + '@nx/key-darwin-arm64@4.0.0': + optional: true + '@nx/key-darwin-x64@3.0.0': optional: true + '@nx/key-darwin-x64@4.0.0': + optional: true + '@nx/key-linux-arm-gnueabihf@3.0.0': optional: true + '@nx/key-linux-arm-gnueabihf@4.0.0': + optional: true + '@nx/key-linux-arm64-gnu@3.0.0': optional: true + '@nx/key-linux-arm64-gnu@4.0.0': + optional: true + '@nx/key-linux-arm64-musl@3.0.0': optional: true + '@nx/key-linux-arm64-musl@4.0.0': + optional: true + '@nx/key-linux-x64-gnu@3.0.0': optional: true + '@nx/key-linux-x64-gnu@4.0.0': + optional: true + '@nx/key-linux-x64-musl@3.0.0': optional: true + '@nx/key-linux-x64-musl@4.0.0': + optional: true + '@nx/key-win32-arm64-msvc@3.0.0': optional: true + '@nx/key-win32-arm64-msvc@4.0.0': + optional: true + '@nx/key-win32-x64-msvc@3.0.0': optional: true + '@nx/key-win32-x64-msvc@4.0.0': + optional: true + '@nx/key@3.0.0': dependencies: '@napi-rs/wasm-runtime': 0.2.4 @@ -32389,6 +32694,27 @@ snapshots: transitivePeerDependencies: - debug + '@nx/key@4.0.0': + dependencies: + '@napi-rs/wasm-runtime': 0.2.4 + axios: 1.12.0 + axios-retry: 4.5.0(axios@1.12.0) + chalk: 4.1.2 + enquirer: 2.4.1 + ora: 5.4.1 + optionalDependencies: + '@nx/key-darwin-arm64': 4.0.0 + '@nx/key-darwin-x64': 4.0.0 + '@nx/key-linux-arm-gnueabihf': 4.0.0 + '@nx/key-linux-arm64-gnu': 4.0.0 + '@nx/key-linux-arm64-musl': 4.0.0 + '@nx/key-linux-x64-gnu': 4.0.0 + '@nx/key-linux-x64-musl': 4.0.0 + '@nx/key-win32-arm64-msvc': 4.0.0 + '@nx/key-win32-x64-msvc': 4.0.0 + transitivePeerDependencies: + - debug + '@nx/module-federation@22.0.0-rc.0(@babel/traverse@7.28.3)(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/helpers@0.5.11)(esbuild@0.25.0)(next@14.2.28(@babel/core@7.26.10)(@opentelemetry/api@1.9.0)(@playwright/test@1.54.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.55.0))(nx@22.0.0-rc.0(@swc-node/register@1.9.1(@swc/core@1.5.7(@swc/helpers@0.5.11))(@swc/types@0.1.7)(typescript@5.9.2))(@swc/core@1.5.7(@swc/helpers@0.5.11)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.9.2)(verdaccio@6.0.5(encoding@0.1.13)(typanion@3.14.0))(webpack-cli@5.1.4)': dependencies: '@module-federation/enhanced': 0.18.0(@rspack/core@1.5.2(@swc/helpers@0.5.11))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.9.2)(webpack@5.101.3) @@ -35918,7 +36244,7 @@ snapshots: '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) '@vanilla-extract/babel-plugin-debug-ids': 1.2.2 '@vanilla-extract/css': 1.17.4(babel-plugin-macros@3.1.0) - esbuild: 0.17.6 + esbuild: 0.19.9 eval: 0.1.8 find-up: 5.0.0 javascript-stringify: 2.1.0 @@ -35945,7 +36271,7 @@ snapshots: '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) '@vanilla-extract/babel-plugin-debug-ids': 1.2.2 '@vanilla-extract/css': 1.17.4(babel-plugin-macros@3.1.0) - esbuild: 0.17.6 + esbuild: 0.19.9 eval: 0.1.8 find-up: 5.0.0 javascript-stringify: 2.1.0 @@ -40176,6 +40502,31 @@ snapshots: '@esbuild/win32-ia32': 0.17.6 '@esbuild/win32-x64': 0.17.6 + esbuild@0.19.9: + optionalDependencies: + '@esbuild/android-arm': 0.19.9 + '@esbuild/android-arm64': 0.19.9 + '@esbuild/android-x64': 0.19.9 + '@esbuild/darwin-arm64': 0.19.9 + '@esbuild/darwin-x64': 0.19.9 + '@esbuild/freebsd-arm64': 0.19.9 + '@esbuild/freebsd-x64': 0.19.9 + '@esbuild/linux-arm': 0.19.9 + '@esbuild/linux-arm64': 0.19.9 + '@esbuild/linux-ia32': 0.19.9 + '@esbuild/linux-loong64': 0.19.9 + '@esbuild/linux-mips64el': 0.19.9 + '@esbuild/linux-ppc64': 0.19.9 + '@esbuild/linux-riscv64': 0.19.9 + '@esbuild/linux-s390x': 0.19.9 + '@esbuild/linux-x64': 0.19.9 + '@esbuild/netbsd-x64': 0.19.9 + '@esbuild/openbsd-x64': 0.19.9 + '@esbuild/sunos-x64': 0.19.9 + '@esbuild/win32-arm64': 0.19.9 + '@esbuild/win32-ia32': 0.19.9 + '@esbuild/win32-x64': 0.19.9 + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 diff --git a/tools/workspace-plugin/src/conformance-rules/codeblock-language/index.ts b/tools/workspace-plugin/src/conformance-rules/codeblock-language/index.ts new file mode 100644 index 0000000000000..6f1e58fd3985b --- /dev/null +++ b/tools/workspace-plugin/src/conformance-rules/codeblock-language/index.ts @@ -0,0 +1,302 @@ +import { + createConformanceRule, + type ConformanceViolation, +} from '@nx/conformance'; +import { workspaceRoot } from '@nx/devkit'; +import { sync as globSync } from 'glob'; +import { join, relative } from 'node:path'; +import { bundledLanguages } from 'shiki'; +// Common mappings for file extensions that don't match language IDs exactly +const extensionToLang: Record = { + js: 'javascript', + jsx: 'jsx', + ts: 'typescript', + tsx: 'tsx', + md: 'markdown', + sh: 'bash', + yml: 'yaml', + env: 'dotenv', +}; + +export default createConformanceRule({ + name: 'codeblock-language', + category: 'consistency', + description: + 'Ensures that all code blocks in markdown and markdoc files have a language specified', + implementation: async ({ tree, fileMapCache }) => { + const docsProjectName = 'astro-docs'; + const violations: ConformanceViolation[] = []; + + const docsFiles = fileMapCache.fileMap.projectFileMap?.[docsProjectName]; + + if (!docsFiles) { + violations.push({ + message: `Could not find ${docsProjectName} project files. This is most likely an issue where the graph failed to create correctly.`, + sourceProject: docsProjectName, + }); + return { + severity: 'high', + details: { + violations, + }, + }; + } + + for (const { file } of docsFiles) { + const isMarkdoc = file.endsWith('.mdoc'); + if (!isMarkdoc) { + // only validate markdoc files + continue; + } + const content = tree.read(file, 'utf-8'); + + const fileViolations = checkCodeBlocks(content, file); + violations.push(...fileViolations); + } + + return { + severity: violations.length > 0 ? 'medium' : 'low', + details: { + violations, + }, + }; + }, +}); + +// Get all supported language identifiers and aliases from shiki +function getSupportedLanguages(): Set { + const supported = new Set(); + + // bundledLanguages is an object with keys as language IDs + for (const [langId, langGetter] of Object.entries(bundledLanguages)) { + supported.add(langId); + + // Also add aliases if they exist in the language definition + const lang = typeof langGetter === 'function' ? langGetter() : langGetter; + if (lang && 'aliases' in lang && Array.isArray(lang.aliases)) { + lang.aliases.forEach((alias: string) => supported.add(alias)); + } + } + + return supported; +} + +// Suggest a language based on file extension +function suggestLanguageFromFilename( + filename: string, + supportedLanguages: Set +): string { + const extensionMatch = filename.match(/\.([a-zA-Z0-9]+)$/); + if (!extensionMatch) { + return 'text'; + } + + const ext = extensionMatch[1].toLowerCase(); + + // First check our custom mappings + if (extensionToLang[ext] && supportedLanguages.has(extensionToLang[ext])) { + return extensionToLang[ext]; + } + + // Then check if the extension itself is a supported language + if (supportedLanguages.has(ext)) { + return ext; + } + + // Fall back to text + return 'text'; +} + +function extractFilenameFromComment(line: string): string { + if (line.startsWith('//')) { + return line.slice(2).trim(); + } + if (line.startsWith('#')) { + return line.slice(1).trim(); + } + if (line.startsWith('/*')) { + return line.slice(2).replace('*/', '').trim(); + } + return line; +} + +function looksLikeFilename(line: string): boolean { + if (!line) return false; + + const isCommentWithContent = + line.startsWith('//') || line.startsWith('#') || line.startsWith('/*'); + + const isFilePathWithExtension = + line.includes('.') && + !line.startsWith('.') && + line.split(/\s+/)[0].includes('.'); + + return isCommentWithContent || isFilePathWithExtension; +} + +function checkEmptyCodeFence( + lineNumber: number, + nextLine: string, + filePath: string, + supportedLanguages: Set +): ConformanceViolation { + if (!looksLikeFilename(nextLine)) { + return { + message: `Code block at line ${lineNumber} is missing a language identifier. Add a language to code block e.g. \`\`\`text for command output or \`\`\`shell for a command`, + file: filePath, + }; + } + + const filename = extractFilenameFromComment(nextLine); + const suggestedLang = suggestLanguageFromFilename( + filename, + supportedLanguages + ); + + return { + message: `Code block at line ${lineNumber} is missing a language identifier but has filename "${filename}" specified. Add a language to code block e.g. \`\`\`${suggestedLang}.`, + file: filePath, + }; +} + +function checkTemplateOnlyFence( + lineNumber: number, + filePath: string +): ConformanceViolation { + return { + message: `Code block at line ${lineNumber} has template fences but no language identifier. Add a language before the {% %} fences e.g., \`\`\`text {% ... %}`, + file: resolveFilePathToWorkspaceRoot(filePath), + }; +} + +function checkTreeviewLanguage( + lineNumber: number, + language: string, + filePath: string +): ConformanceViolation | null { + if (language === 'treeview') { + return { + message: `Code block at line ${lineNumber} uses 'treeview' which is not supported. Use 'text' or the {% filetree %} tag.`, + file: resolveFilePathToWorkspaceRoot(filePath), + }; + } + return null; +} + +function checkShellFrameNone( + lineNumber: number, + language: string, + afterBackticks: string, + filePath: string +): ConformanceViolation | null { + if (language !== 'shell') { + return null; + } + + if (afterBackticks.includes('frame="none"')) { + return { + message: `Code block at line ${lineNumber} uses 'shell' language with frame="none". Shell code blocks should not use frame="none".`, + file: resolveFilePathToWorkspaceRoot(filePath), + }; + } + + return null; +} + +function checkFileNameInFence( + lineNumber: number, + afterBackticks: string, + filePath: string +): ConformanceViolation | null { + // Check if fileName attribute is present in the fence line + const fileNameMatch = afterBackticks.match(/fileName=["']([^"']+)["']/); + if (!fileNameMatch) { + return null; + } + + const fileName = fileNameMatch[1]; + return { + message: `Code block at line ${lineNumber} has fileName="${fileName}" in the fence line. Move the filename to a comment on the next line instead (e.g., // ${fileName} or # ${fileName}).`, + file: resolveFilePathToWorkspaceRoot(filePath), + }; +} + +function checkCodeBlocks( + content: string, + filePath: string +): ConformanceViolation[] { + const violations: ConformanceViolation[] = []; + const lines = content.split('\n'); + const supportedLanguages = getSupportedLanguages(); + const codeFenceRegex = /^```(.*)$/; + let inCodeBlock = false; + + for (let i = 0; i < lines.length; i++) { + const match = lines[i].match(codeFenceRegex); + if (!match) continue; + + if (inCodeBlock) { + inCodeBlock = false; + continue; + } + + inCodeBlock = true; + const afterBackticks = match[1].trim(); + + if (afterBackticks === '') { + const nextLine = i + 1 < lines.length ? lines[i + 1].trim() : ''; + const violation = checkEmptyCodeFence( + i + 1, + nextLine, + filePath, + supportedLanguages + ); + violations.push(violation); + continue; + } + + if (afterBackticks.startsWith('{%')) { + violations.push(checkTemplateOnlyFence(i + 1, filePath)); + continue; + } + + const languageMatch = afterBackticks.match(/^(\S+)/); + if (languageMatch) { + const treeviewViolation = checkTreeviewLanguage( + i + 1, + languageMatch[1], + filePath + ); + if (treeviewViolation) violations.push(treeviewViolation); + + const shellFrameViolation = checkShellFrameNone( + i + 1, + languageMatch[1], + afterBackticks, + filePath + ); + if (shellFrameViolation) violations.push(shellFrameViolation); + + const fileNameViolation = checkFileNameInFence( + i + 1, + afterBackticks, + filePath + ); + if (fileNameViolation) violations.push(fileNameViolation); + } + } + + return violations; +} + +/** + * make sure file path is resolved from workspace root + * so conformance reports are correctly grouped + **/ +function resolveFilePathToWorkspaceRoot(filePath: string) { + if (!filePath || !filePath.startsWith(workspaceRoot)) { + return filePath; + } + + return filePath.replace(workspaceRoot + '/', ''); +} diff --git a/tools/workspace-plugin/src/conformance-rules/codeblock-language/schema.json b/tools/workspace-plugin/src/conformance-rules/codeblock-language/schema.json new file mode 100644 index 0000000000000..5ba9e821a0d58 --- /dev/null +++ b/tools/workspace-plugin/src/conformance-rules/codeblock-language/schema.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": {}, + "additionalProperties": false +} diff --git a/tools/workspace-plugin/src/conformance-rules/relative-image-imports/index.ts b/tools/workspace-plugin/src/conformance-rules/relative-image-imports/index.ts new file mode 100644 index 0000000000000..32d0211d676a2 --- /dev/null +++ b/tools/workspace-plugin/src/conformance-rules/relative-image-imports/index.ts @@ -0,0 +1,170 @@ +import { ConformanceViolation, createConformanceRule } from '@nx/conformance'; +import { workspaceRoot } from '@nx/devkit'; +import { sync as globSync } from 'glob'; +import { readFileSync, existsSync } from 'node:fs'; +import { join, dirname, resolve, relative, isAbsolute } from 'node:path'; + +const ignorePatterns = ['**/node_modules/**', '**/dist/**', '**/.astro/**']; + +// Image file extensions to check +const imageExtensions = ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp']; + +export default createConformanceRule({ + name: 'image-import-paths', + category: 'consistency', + description: 'Ensures that all doc image references are valid', + implementation: async ({ projectGraph }) => { + const violations: ConformanceViolation[] = []; + + // Find all .mdoc files in astro-docs + const mdocFiles = globSync(join(workspaceRoot, 'astro-docs/**/*.mdoc'), { + ignore: ignorePatterns, + }); + + for (const file of mdocFiles) { + const content = readFileSync(file, 'utf-8'); + const fileViolations = checkImagePaths(content, file); + violations.push(...fileViolations); + } + + return { + severity: violations.length > 0 ? 'medium' : 'low', + details: { + violations, + }, + }; + }, +}); + +function checkImagePaths( + content: string, + filePath: string +): ConformanceViolation[] { + const violations: ConformanceViolation[] = []; + const lines = content.split('\n'); + let inCodeBlock = false; + + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + + // Track code block state + if (line.trim().startsWith('```')) { + inCodeBlock = !inCodeBlock; + continue; + } + + // Skip lines inside code blocks + if (inCodeBlock) { + continue; + } + + // Check for markdown image syntax: ![alt](path) + const markdownImageRegex = /!\[([^\]]*)\]\(([^)]+)\)/g; + let match; + + while ((match = markdownImageRegex.exec(line)) !== null) { + const imagePath = match[2]; + + // Skip URLs (http://, https://, //) + if ( + imagePath.startsWith('http://') || + imagePath.startsWith('https://') || + imagePath.startsWith('//') + ) { + continue; + } + + const violation = validateImagePath(imagePath, filePath, i + 1); + if (violation) { + violations.push(violation); + } + } + + // Check for import statements: import ... from './path/to/image.png' + const importRegex = /import\s+.*\s+from\s+['"]([^'"]+)['"]/; + const importMatch = line.match(importRegex); + + if (importMatch) { + const importPath = importMatch[1]; + + // Check if this is an image import + const hasImageExtension = imageExtensions.some((ext) => + importPath.toLowerCase().endsWith(ext) + ); + + if (hasImageExtension) { + const violation = validateImagePath(importPath, filePath, i + 1); + if (violation) { + violations.push(violation); + } + } + } + } + + return violations; +} + +function validateImagePath( + imagePath: string, + mdocFilePath: string, + lineNumber: number +): ConformanceViolation | null { + // Handle paths starting with / (public folder references in Astro) + if (imagePath.startsWith('/')) { + const publicPath = join(workspaceRoot, 'astro-docs/public', imagePath); + + if (!existsSync(publicPath)) { + return { + message: `Image path at line ${lineNumber} does not exist in public folder: "${imagePath}"`, + file: resolveFilePathToWorkspaceRoot(mdocFilePath), + }; + } + + // Path exists in public folder - this is valid + return null; + } + + // Check if path is absolute (not relative) + if ( + isAbsolute(imagePath) || + (!imagePath.startsWith('.') && !imagePath.startsWith('..')) + ) { + return { + message: `Image path at line ${lineNumber} must be relative (start with ./ or ../) or an absolute path to public folder (start with /). Found: "${imagePath}"`, + file: resolveFilePathToWorkspaceRoot(mdocFilePath), + }; + } + + // Resolve the full path to the image + const mdocDir = dirname(mdocFilePath); + const resolvedImagePath = resolve(mdocDir, imagePath); + + // Check if the file exists + if (!existsSync(resolvedImagePath)) { + return { + message: `Image path at line ${lineNumber} does not exist: "${imagePath}"`, + file: resolveFilePathToWorkspaceRoot(mdocFilePath), + }; + } + + // Relative paths must be in src/assets folder only + const relativeToWorkspace = relative(workspaceRoot, resolvedImagePath); + const isInAssets = relativeToWorkspace.startsWith('astro-docs/src/assets/'); + + if (!isInAssets) { + return { + message: `Image at line ${lineNumber} with relative path must be in astro-docs/src/assets/ folder. Found: "${relativeToWorkspace}". If the image is in the public folder, use an absolute path starting with /`, + file: resolveFilePathToWorkspaceRoot(mdocFilePath), + }; + } + + return null; +} + +function resolveFilePathToWorkspaceRoot(filePath: string) { + if (!filePath || !filePath.startsWith(workspaceRoot)) { + return filePath; + } + + return filePath.replace(workspaceRoot + '/', ''); +} diff --git a/tools/workspace-plugin/src/conformance-rules/relative-image-imports/schema.json b/tools/workspace-plugin/src/conformance-rules/relative-image-imports/schema.json new file mode 100644 index 0000000000000..5ba9e821a0d58 --- /dev/null +++ b/tools/workspace-plugin/src/conformance-rules/relative-image-imports/schema.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": {}, + "additionalProperties": false +}