docs(misc): expose nx init command flags in docs and the terminal help (#16433)

This commit is contained in:
Leosvel Pérez Espinosa 2023-04-27 23:20:36 +01:00 committed by GitHub
parent afa5eb59fa
commit 13a35bfb89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 92 additions and 7 deletions

View File

@ -17,14 +17,60 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options
### addE2e
Type: `boolean`
Default: `false`
Set up Cypress E2E tests in integrated workspaces. Only for CRA projects.
### force
Type: `boolean`
Default: `false`
Force the migration to continue and ignore custom webpack setup or uncommitted changes. Only for CRA projects.
### help
Type: `boolean`
Show help
### integrated
Type: `boolean`
Default: `false`
Migrate to an Nx integrated layout workspace. Only for Angular CLI workspaces and CRA projects.
### interactive
Type: `boolean`
Default: `true`
When false disables interactive input prompts for options.
### nxCloud
Type: `boolean`
Set up distributed caching with Nx Cloud.
### version
Type: `boolean`
Show version number
### vite
Type: `boolean`
Default: `true`
Use Vite as the bundler. Only for CRA projects.

View File

@ -17,14 +17,60 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
## Options
### addE2e
Type: `boolean`
Default: `false`
Set up Cypress E2E tests in integrated workspaces. Only for CRA projects.
### force
Type: `boolean`
Default: `false`
Force the migration to continue and ignore custom webpack setup or uncommitted changes. Only for CRA projects.
### help
Type: `boolean`
Show help
### integrated
Type: `boolean`
Default: `false`
Migrate to an Nx integrated layout workspace. Only for Angular CLI workspaces and CRA projects.
### interactive
Type: `boolean`
Default: `true`
When false disables interactive input prompts for options.
### nxCloud
Type: `boolean`
Set up distributed caching with Nx Cloud.
### version
Type: `boolean`
Show version number
### vite
Type: `boolean`
Default: `true`
Use Vite as the bundler. Only for CRA projects.

View File

@ -953,45 +953,38 @@ function withListOptions(yargs) {
}
function withInitOptions(yargs: yargs.Argv) {
// TODO(leo): make them visible in docs/help once the feature is released in Nx 16
return yargs
.options('nxCloud', {
type: 'boolean',
description: 'Set up distributed caching with Nx Cloud.',
hidden: true,
})
.option('interactive', {
describe: 'When false disables interactive input prompts for options.',
type: 'boolean',
default: true,
hidden: true,
})
.option('integrated', {
type: 'boolean',
description:
'Migrate to an Nx integrated layout workspace. Only for Angular CLI workspaces and CRA projects.',
default: false,
hidden: true,
})
.option('addE2e', {
describe:
'Set up Cypress E2E tests in integrated workspaces. Only for CRA projects.',
type: 'boolean',
default: false,
hidden: true,
})
.option('force', {
describe:
'Force the migration to continue and ignore custom webpack setup or uncommitted changes. Only for CRA projects.',
type: 'boolean',
default: false,
hidden: true,
})
.options('vite', {
type: 'boolean',
description: 'Use Vite as the bundler. Only for CRA projects.',
default: true,
hidden: true,
})
.options('cacheable', {
type: 'string',