-
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.
- Loading branch information
1 parent
804220e
commit b342a10
Showing
5 changed files
with
43 additions
and
16 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 |
---|---|---|
|
@@ -23,7 +23,7 @@ Install the latest version of the `@nx/react` package and run its `@nx/react:ini | |
nx add @nx/react | ||
``` | ||
|
||
Install the version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator: | ||
Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator: | ||
|
||
```shell | ||
nx add @nx/[email protected] | ||
|
@@ -41,7 +41,13 @@ Show help | |
|
||
Type: `string` | ||
|
||
The name of an installed plugin to query | ||
The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize | ||
|
||
### verbose | ||
|
||
Type: `boolean` | ||
|
||
Prints additional information about the commands (e.g., stack traces) | ||
|
||
### version | ||
|
||
|
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ Install the latest version of the `@nx/react` package and run its `@nx/react:ini | |
nx add @nx/react | ||
``` | ||
|
||
Install the version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator: | ||
Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator: | ||
|
||
```shell | ||
nx add @nx/[email protected] | ||
|
@@ -41,7 +41,13 @@ Show help | |
|
||
Type: `string` | ||
|
||
The name of an installed plugin to query | ||
The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize | ||
|
||
### verbose | ||
|
||
Type: `boolean` | ||
|
||
Prints additional information about the commands (e.g., stack traces) | ||
|
||
### version | ||
|
||
|
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ import { CommandModule } from 'yargs'; | |
|
||
export interface AddOptions { | ||
packageSpecifier: string; | ||
verbose?: boolean; | ||
} | ||
|
||
export const yargsAddCommand: CommandModule< | ||
|
@@ -14,15 +15,21 @@ export const yargsAddCommand: CommandModule< | |
yargs | ||
.positional('packageSpecifier', { | ||
type: 'string', | ||
description: 'The name of an installed plugin to query', | ||
description: | ||
'The package name and optional version (e.g. `@nx/react` or `@nx/react@latest`) to install and initialize', | ||
}) | ||
.option('verbose', { | ||
type: 'boolean', | ||
description: | ||
'Prints additional information about the commands (e.g., stack traces)', | ||
}) | ||
.example( | ||
'$0 add @nx/react', | ||
'Install the latest version of the `@nx/react` package and run its `@nx/react:init` generator' | ||
) | ||
.example( | ||
'$0 add @nx/[email protected]', | ||
'Install the version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator' | ||
), | ||
'Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator' | ||
) as any, | ||
handler: (args) => import('./add').then((m) => m.addHandler(args)), | ||
}; |
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 |
---|---|---|
|
@@ -398,7 +398,7 @@ export const examples: Record<string, Example[]> = { | |
{ | ||
command: 'add @nx/[email protected]', | ||
description: | ||
'Install the version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator', | ||
'Install version `17.0.0` of the `@nx/react` package and run its `@nx/react:init` generator', | ||
}, | ||
], | ||
}; |