Skip to content

Commit

Permalink
chore(misc): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Feb 19, 2025
1 parent b0f8cf6 commit 65ef633
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
15 changes: 8 additions & 7 deletions docs/generated/cli/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

## Options

| Option | Type | Description |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------- |
| `--help` | boolean | Show help. |
| `--interactive` | boolean | When false disables interactive input prompts for options. (Default: `true`) |
| `--nxCloud` | boolean | Set up distributed caching with Nx Cloud. |
| `--useDotNxInstallation` | boolean | Initialize an Nx workspace setup in the .nx directory of the current repository. (Default: `false`) |
| `--version` | boolean | Show version number. |
| Option | Type | Description |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `--force` | boolean | Force the migration to continue and ignore custom webpack setup or uncommitted changes. Only for CRA projects. (Default: `false`) |
| `--help` | boolean | Show help. |
| `--interactive` | boolean | When false disables interactive input prompts for options. (Default: `true`) |
| `--nxCloud` | boolean | Set up distributed caching with Nx Cloud. |
| `--useDotNxInstallation` | boolean | Initialize an Nx workspace setup in the .nx directory of the current repository. (Default: `false`) |
| `--version` | boolean | Show version number. |
15 changes: 8 additions & 7 deletions docs/generated/packages/nx/documents/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`

## Options

| Option | Type | Description |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------- |
| `--help` | boolean | Show help. |
| `--interactive` | boolean | When false disables interactive input prompts for options. (Default: `true`) |
| `--nxCloud` | boolean | Set up distributed caching with Nx Cloud. |
| `--useDotNxInstallation` | boolean | Initialize an Nx workspace setup in the .nx directory of the current repository. (Default: `false`) |
| `--version` | boolean | Show version number. |
| Option | Type | Description |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `--force` | boolean | Force the migration to continue and ignore custom webpack setup or uncommitted changes. Only for CRA projects. (Default: `false`) |
| `--help` | boolean | Show help. |
| `--interactive` | boolean | When false disables interactive input prompts for options. (Default: `true`) |
| `--nxCloud` | boolean | Set up distributed caching with Nx Cloud. |
| `--useDotNxInstallation` | boolean | Initialize an Nx workspace setup in the .nx directory of the current repository. (Default: `false`) |
| `--version` | boolean | Show version number. |
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export async function addNxToCraRepo(_options: Options) {
output.note({
title: `A new ${indexPath} has been created. Compare it to the previous ${oldIndexPath} file and make any changes needed, then delete the previous file.`,
});

if (_options.force) {
output.note({
title: `Using --force converts projects with custom Webpack setup. You will need to manually update your vite.config.js file to match the plugins used in your old Webpack configuration.`,
});
}
}

function installDependencies(options: NormalizedOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/init/init-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function initHandler(options: InitArgs): Promise<void> {
if (_isCRA) {
await addNxToCraRepo({
addE2e: false,
force: false,
force: options.force,
vite: true,
integrated: false,
interactive: options.interactive,
Expand Down

0 comments on commit 65ef633

Please sign in to comment.