-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add the "add" cli command (#20976)
- Loading branch information
1 parent
6141f44
commit 28438bb
Showing
19 changed files
with
542 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: 'add - CLI command' | ||
description: 'Install a plugin and initialize it.' | ||
--- | ||
|
||
# add | ||
|
||
Install a plugin and initialize it. | ||
|
||
## Usage | ||
|
||
```shell | ||
nx add <packageSpecifier> | ||
``` | ||
|
||
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. | ||
|
||
### Examples | ||
|
||
Install the `@nx/react` package matching the installed version of the `nx` package and run its `@nx/react:init` generator: | ||
|
||
```shell | ||
nx add @nx/react | ||
``` | ||
|
||
Install the latest version of the `non-core-nx-plugin` package and run its `non-core-nx-plugin:init` generator if available: | ||
|
||
```shell | ||
nx add non-core-nx-plugin | ||
``` | ||
|
||
Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator: | ||
|
||
```shell | ||
nx add @nx/[email protected] | ||
``` | ||
|
||
## Options | ||
|
||
### help | ||
|
||
Type: `boolean` | ||
|
||
Show help | ||
|
||
### packageSpecifier | ||
|
||
Type: `string` | ||
|
||
The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages | ||
|
||
### verbose | ||
|
||
Type: `boolean` | ||
|
||
Prints additional information about the commands (e.g., stack traces) | ||
|
||
### version | ||
|
||
Type: `boolean` | ||
|
||
Show version number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: 'add - CLI command' | ||
description: 'Install a plugin and initialize it.' | ||
--- | ||
|
||
# add | ||
|
||
Install a plugin and initialize it. | ||
|
||
## Usage | ||
|
||
```shell | ||
nx add <packageSpecifier> | ||
``` | ||
|
||
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`. | ||
|
||
### Examples | ||
|
||
Install the `@nx/react` package matching the installed version of the `nx` package and run its `@nx/react:init` generator: | ||
|
||
```shell | ||
nx add @nx/react | ||
``` | ||
|
||
Install the latest version of the `non-core-nx-plugin` package and run its `non-core-nx-plugin:init` generator if available: | ||
|
||
```shell | ||
nx add non-core-nx-plugin | ||
``` | ||
|
||
Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator: | ||
|
||
```shell | ||
nx add @nx/[email protected] | ||
``` | ||
|
||
## Options | ||
|
||
### help | ||
|
||
Type: `boolean` | ||
|
||
Show help | ||
|
||
### packageSpecifier | ||
|
||
Type: `string` | ||
|
||
The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize. If the version is not specified it will install the same version as the `nx` package for Nx core plugins or the latest version for other packages | ||
|
||
### verbose | ||
|
||
Type: `boolean` | ||
|
||
Prints additional information about the commands (e.g., stack traces) | ||
|
||
### version | ||
|
||
Type: `boolean` | ||
|
||
Show version number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
28438bb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-five.vercel.app