Skip to content

Commit 2d69aa1

Browse files
authored
feat(misc): enable ts solution setup by default for new workspaces (#30372)
## Current Behavior To create a new workspace that uses the new TS solution setup the `--workspaces` flag must be provided (Node, React, and Vue stacks). ## Expected Behavior New workspaces should be created by default using the new TS solution setup (Node, React, and Vue stacks). Users can opt out of it by providing the `--no-workspaces` flag. ## Related Issue(s) Fixes #
1 parent 398ab35 commit 2d69aa1

File tree

16 files changed

+66
-65
lines changed

16 files changed

+66
-65
lines changed

docs/generated/cli/create-nx-workspace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
4747
| `--unitTestRunner` | `jest`, `vitest`, `none` | Test runner to use for unit tests. |
4848
| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
4949
| `--version` | boolean | Show version number. |
50-
| `--workspaces` | boolean | Use package manager workspaces. (Default: `false`) |
50+
| `--workspaces` | boolean | Use package manager workspaces. (Default: `true`) |
5151
| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. |
5252

5353
## Presets

docs/generated/packages/nx/documents/create-nx-workspace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
4747
| `--unitTestRunner` | `jest`, `vitest`, `none` | Test runner to use for unit tests. |
4848
| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
4949
| `--version` | boolean | Show version number. |
50-
| `--workspaces` | boolean | Use package manager workspaces. (Default: `false`) |
50+
| `--workspaces` | boolean | Use package manager workspaces. (Default: `true`) |
5151
| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. |
5252

5353
## Presets

docs/generated/packages/workspace/generators/new.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"workspaces": {
103103
"description": "Whether to use package manager workspaces.",
104104
"type": "boolean",
105-
"default": false
105+
"default": true
106106
}
107107
},
108108
"additionalProperties": true,

docs/generated/packages/workspace/generators/preset.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"workspaces": {
120120
"description": "Whether to use package manager workspaces.",
121121
"type": "boolean",
122-
"default": false
122+
"default": true
123123
}
124124
},
125125
"required": ["preset", "name"],

docs/shared/concepts/typescript-project-linking.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ There are two different methods that Nx supports for linking TypeScript projects
2929

3030
## Project Linking with Workspaces
3131

32-
To create a new Nx workspace that links projects with package manager workspaces, use the `--workspaces` flag.
32+
Create a new Nx workspace that links projects with package manager workspaces:
3333

3434
```shell
35-
npx create-nx-workspace --workspaces
35+
npx create-nx-workspace
3636
```
3737

38+
{% callout type="note" title="Opt-out of Workspaces" %}
39+
You can opt-out of workspaces by running `npx create-nx-workspace --no-workspaces`.
40+
{% /callout %}
41+
3842
### Set Up Package Manager Workspaces
3943

4044
The configuration for package manager workspaces varies based on which package manager you're using.

0 commit comments

Comments
 (0)