Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/generated/cli/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
46 changes: 46 additions & 0 deletions docs/generated/packages/nx/documents/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
7 changes: 0 additions & 7 deletions packages/nx/src/command-line/nx-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down