fix(nx-dev): remove fence from new packages and "nx add" commands (#21705)
This commit is contained in:
parent
49bba42d37
commit
3ead01987b
@ -33,7 +33,7 @@ In any Nx workspace, you can install `@nx/angular` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/angular
|
||||
```
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ In any Nx workspace, you can install `@nx/cypress` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/cypress
|
||||
```
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ In any Nx workspace, you can install `@nx/detox` by running the following comman
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/detox
|
||||
```
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ In any Nx workspace, you can install `@nx/esbuild` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/esbuild
|
||||
```
|
||||
|
||||
|
||||
@ -13,10 +13,27 @@ Make sure to install the `@nx/eslint-plugin` version that matches the version of
|
||||
|
||||
In any Nx workspace, you can install `@nx/eslint-plugin` by running the following commands if the package is not already installed:
|
||||
|
||||
```shell
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/eslint-plugin
|
||||
```
|
||||
|
||||
This will install the correct version of `@nx/eslint-plugin`.
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Nx < 18" %}
|
||||
|
||||
Install the `@nx/eslint-plugin` package with your package manager.
|
||||
|
||||
```shell
|
||||
npm add -D @nx/eslint-plugin
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
## Included plugins
|
||||
|
||||
The plugin contains the following rule configurations divided into sub-plugins.
|
||||
|
||||
@ -13,7 +13,7 @@ In any Nx workspace, you can install `@nx/eslint` by running the following comma
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/eslint
|
||||
```
|
||||
|
||||
@ -57,14 +57,23 @@ The `@nx/eslint/plugin` is configured in the `plugins` array in `nx.json`.
|
||||
- The `targetName` option controls the name of the inferred ESLint tasks. The default name is `lint`.
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Nx < 18" %}
|
||||
{% tab label="Nx 17" %}
|
||||
|
||||
Install the `@nx/eslint` package with your package manager.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
npm add -D @nx/eslint
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Nx < 17" %}
|
||||
|
||||
Install the `@nx/linter` package with your package manager.
|
||||
|
||||
```shell
|
||||
npm add -D @nx/linter
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ In any Nx workspace, you can install `@nx/expo` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/expo
|
||||
```
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ In any Nx workspace, you can install `@nx/express` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/express
|
||||
```
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ In any Nx workspace, you can install `@nx/jest` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/jest
|
||||
```
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ In any Nx workspace, you can install `@nx/js` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/js
|
||||
```
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ In any Nx workspace, you can install `@nx/nest` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/nest
|
||||
```
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ In any workspace, you can install `@nx/next` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/next
|
||||
```
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ In any Nx workspace, you can install `@nx/node` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/node
|
||||
```
|
||||
|
||||
|
||||
@ -23,7 +23,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
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/nuxt
|
||||
```
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ In any Nx workspace, you can install `@nx/playwright` by running the following c
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/playwright
|
||||
```
|
||||
|
||||
@ -74,7 +74,7 @@ The `@nx/playwright/plugin` will automatically split your e2e tasks by file. You
|
||||
|
||||
Install the `@nx/playwright` package with your package manager.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
npm add -D @nx/playwright
|
||||
```
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ In any Nx workspace, you can install `@nx/react-native` by running the following
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/react-native
|
||||
```
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ In any Nx workspace, you can install `@nx/react` by running the following comman
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/react
|
||||
```
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ In any Nx workspace, you can install `@nx/remix` by running the following comman
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/remix
|
||||
```
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ In any Nx workspace, you can install `@nx/storybook` by running the following co
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/storybook
|
||||
```
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ In any Nx workspace, you can install `@nx/vite` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/vite
|
||||
```
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ In any Nx workspace, you can install `@nx/vue` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/vue
|
||||
```
|
||||
|
||||
@ -37,7 +37,7 @@ This will install the correct version of `@nx/vue`.
|
||||
|
||||
Install the `@nx/vue` package with your package manager.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
npm add -D @nx/vue
|
||||
```
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ In any Nx workspace, you can install `@nx/web` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/web
|
||||
```
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ In any Nx workspace, you can install `@nx/webpack` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/webpack
|
||||
```
|
||||
|
||||
|
||||
@ -11,14 +11,14 @@ To enable automatically split e2e tasks, you need to turn on [inferred tasks](/c
|
||||
{% tabs %}
|
||||
{% tab label="Cypress" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/cypress
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Playwright" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/playwright
|
||||
```
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ Nx provides an `enforce-module-boundaries` eslint rule that enforces the public
|
||||
|
||||
To set up the lint rule, install these dependencies:
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/eslint-plugin @nx/devkit
|
||||
```
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ When using React Native in Nx, you get the out-of-the-box support for TypeScript
|
||||
|
||||
For existing Nx workspaces, install the `@nx/react-native` package to add React Native capabilities to it.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/react-native
|
||||
```
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ In this recipe, we'll show you how to create a [Remix](https://remix.run) applic
|
||||
Make sure to install the `@nx/remix` version that is on the same minor version as the `nx` version in your repository. If the version numbers get out of sync, you can encounter some difficult to debug errors. You can [fix Nx version mismatches with this recipe](/recipes/tips-n-tricks/keep-nx-versions-in-sync).
|
||||
{% /callout %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/remix
|
||||
```
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ At the next prompt, you can choose whether to use [Nx Cloud](https://nx.app) or
|
||||
|
||||
Your new workspace won’t have much in it because of the `apps` preset. You’ll need to generate an application to have some structure created. Add the Angular plugin to your workspace:
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/angular
|
||||
```
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ In any Nx workspace, you can install `@nx/angular` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/angular
|
||||
```
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ In any Nx workspace, you can install `@nx/cypress` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/cypress
|
||||
```
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ In any Nx workspace, you can install `@nx/detox` by running the following comman
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/detox
|
||||
```
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ In any Nx workspace, you can install `@nx/esbuild` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/esbuild
|
||||
```
|
||||
|
||||
|
||||
@ -13,10 +13,27 @@ Make sure to install the `@nx/eslint-plugin` version that matches the version of
|
||||
|
||||
In any Nx workspace, you can install `@nx/eslint-plugin` by running the following commands if the package is not already installed:
|
||||
|
||||
```shell
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/eslint-plugin
|
||||
```
|
||||
|
||||
This will install the correct version of `@nx/eslint-plugin`.
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Nx < 18" %}
|
||||
|
||||
Install the `@nx/eslint-plugin` package with your package manager.
|
||||
|
||||
```shell
|
||||
npm add -D @nx/eslint-plugin
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
## Included plugins
|
||||
|
||||
The plugin contains the following rule configurations divided into sub-plugins.
|
||||
|
||||
@ -13,7 +13,7 @@ In any Nx workspace, you can install `@nx/eslint` by running the following comma
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/eslint
|
||||
```
|
||||
|
||||
@ -57,14 +57,23 @@ The `@nx/eslint/plugin` is configured in the `plugins` array in `nx.json`.
|
||||
- The `targetName` option controls the name of the inferred ESLint tasks. The default name is `lint`.
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Nx < 18" %}
|
||||
{% tab label="Nx 17" %}
|
||||
|
||||
Install the `@nx/eslint` package with your package manager.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
npm add -D @nx/eslint
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="Nx < 17" %}
|
||||
|
||||
Install the `@nx/linter` package with your package manager.
|
||||
|
||||
```shell
|
||||
npm add -D @nx/linter
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ In any Nx workspace, you can install `@nx/expo` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/expo
|
||||
```
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ In any Nx workspace, you can install `@nx/express` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/express
|
||||
```
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ In any Nx workspace, you can install `@nx/jest` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/jest
|
||||
```
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ In any Nx workspace, you can install `@nx/js` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/js
|
||||
```
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ In any Nx workspace, you can install `@nx/nest` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/nest
|
||||
```
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ In any workspace, you can install `@nx/next` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/next
|
||||
```
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ In any Nx workspace, you can install `@nx/node` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/node
|
||||
```
|
||||
|
||||
|
||||
@ -23,7 +23,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
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/nuxt
|
||||
```
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ In any Nx workspace, you can install `@nx/playwright` by running the following c
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/playwright
|
||||
```
|
||||
|
||||
@ -74,7 +74,7 @@ The `@nx/playwright/plugin` will automatically split your e2e tasks by file. You
|
||||
|
||||
Install the `@nx/playwright` package with your package manager.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
npm add -D @nx/playwright
|
||||
```
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ In any Nx workspace, you can install `@nx/react-native` by running the following
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/react-native
|
||||
```
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ In any Nx workspace, you can install `@nx/react` by running the following comman
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/react
|
||||
```
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ In any Nx workspace, you can install `@nx/remix` by running the following comman
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/remix
|
||||
```
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ In any Nx workspace, you can install `@nx/storybook` by running the following co
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/storybook
|
||||
```
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ In any Nx workspace, you can install `@nx/vite` by running the following command
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/vite
|
||||
```
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ In any Nx workspace, you can install `@nx/vue` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/vue
|
||||
```
|
||||
|
||||
@ -37,7 +37,7 @@ This will install the correct version of `@nx/vue`.
|
||||
|
||||
Install the `@nx/vue` package with your package manager.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
npm add -D @nx/vue
|
||||
```
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ In any Nx workspace, you can install `@nx/web` by running the following command:
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/web
|
||||
```
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ In any Nx workspace, you can install `@nx/webpack` by running the following comm
|
||||
{% tabs %}
|
||||
{% tab label="Nx 18+" %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/webpack
|
||||
```
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ Install `@nx/js` plugin.
|
||||
|
||||
> Note: you should make sure any first party, `@nx/` scoped, plugins match the `nx` package version
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/js@<nx-version>
|
||||
```
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ Because we are using an Nx plugin for Deno, all the features of Nx are available
|
||||
Make sure you have Deno installed on your machine. Consult the [Deno docs for more details](https://deno.com/manual/getting_started/installation)
|
||||
{% /callout %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/deno
|
||||
```
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ Because we are using an Nx plugin for Express, all the features of Nx are availa
|
||||
Make sure to install the `@nx/express` version that matches the version of `nx` in your repository. If the version numbers get out of sync, you can encounter some difficult to debug errors. You can [fix Nx version mismatches with this recipe](/recipes/tips-n-tricks/keep-nx-versions-in-sync).
|
||||
{% /callout %}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/express
|
||||
```
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ If you are adding Fastify to an existing repo, continue to the next section.
|
||||
|
||||
## Install the Node Plugin
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/node
|
||||
```
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ Install all the dependencies we need:
|
||||
{% tabs %}
|
||||
{%tab label="npm"%}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/node
|
||||
npm add -D lit http-server
|
||||
```
|
||||
@ -34,7 +34,7 @@ npm add -D lit http-server
|
||||
{% /tab %}
|
||||
{%tab label="yarn"%}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/node
|
||||
yarn add -D lit http-server
|
||||
```
|
||||
@ -42,7 +42,7 @@ yarn add -D lit http-server
|
||||
{% /tab %}
|
||||
{%tab label="pnpm"%}
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/node
|
||||
pnpm add -D lit http-server
|
||||
```
|
||||
|
||||
@ -18,7 +18,7 @@ This creates a single Deno application.
|
||||
|
||||
You can also add a new Deno application to an existing Nx monorepo workspace. Make sure you have the `@nx/deno` package installed:
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/deno
|
||||
```
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ This creates a single Deno application.
|
||||
|
||||
You can also add a new Deno application to an existing Nx monorepo workspace. Make sure you have the `@nx/deno` package installed:
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/deno
|
||||
```
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ npx create-nx-workspace@latest my-functions --preset=@nx/aws-lambda
|
||||
|
||||
First, make sure you have `@nx/aws-lambda` installed.
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/aws-lambda
|
||||
```
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ 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
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/netlify
|
||||
```
|
||||
|
||||
|
||||
@ -14,7 +14,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
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/plugin
|
||||
nx g @nx/plugin:plugin my-plugin
|
||||
```
|
||||
|
||||
@ -12,7 +12,7 @@ Ensure that Nx is installed in your monorepo. Check out the [Installation docs](
|
||||
|
||||
The [`@nx/js` package](/nx-api/js) is required for Nx Release to manage and release JavaScript packages. Add it if it is not already installed:
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/js
|
||||
```
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ This guide shows you how to create, run, and customize executors within your Nx
|
||||
|
||||
If you don't already have a local plugin, use Nx to generate one:
|
||||
|
||||
```shell
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/plugin
|
||||
nx g @nx/plugin:plugin my-plugin
|
||||
```
|
||||
|
||||
@ -11,7 +11,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
|
||||
```shell {% skipRescope=true %}
|
||||
nx add @nx/rollup
|
||||
```
|
||||
|
||||
|
||||
@ -92,6 +92,7 @@ export interface FenceProps {
|
||||
lineGroups: Record<string, number[]>;
|
||||
language: string;
|
||||
enableCopy: boolean;
|
||||
skipRescope?: boolean;
|
||||
selectedLineGroup?: string;
|
||||
onLineGroupSelectionChange?: (selection: string) => void;
|
||||
}
|
||||
@ -106,6 +107,7 @@ export function Fence({
|
||||
language,
|
||||
enableCopy,
|
||||
selectedLineGroup,
|
||||
skipRescope,
|
||||
onLineGroupSelectionChange,
|
||||
}: FenceProps) {
|
||||
if (highlightLines) {
|
||||
@ -162,7 +164,7 @@ export function Fence({
|
||||
};
|
||||
}, [copied]);
|
||||
const showRescopeMessage =
|
||||
children.includes('@nx/') || command.includes('@nx/');
|
||||
(!skipRescope && children.includes('@nx/')) || command.includes('@nx/');
|
||||
function highlightChange(item: { label: string; value: string }) {
|
||||
onLineGroupSelectionChange?.(item.value);
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ export const fence: Schema = {
|
||||
command: { type: 'String', default: '' },
|
||||
path: { type: 'String', default: '~/workspace' },
|
||||
process: { type: 'Boolean', render: false, default: true },
|
||||
skipRescope: { type: 'Boolean', default: false },
|
||||
enableCopy: { type: 'Boolean', default: true },
|
||||
},
|
||||
transform(node, config) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user