Skip to content

Commit

Permalink
docs(misc): expose nx init command flags in docs and the terminal help (
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez authored Apr 27, 2023
1 parent afa5eb5 commit 13a35bf
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 7 deletions.
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

1 comment on commit 13a35bf

@vercel
Copy link

@vercel vercel bot commented on 13a35bf Apr 27, 2023

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-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.