Skip to content

Commit d8cb9a3

Browse files
committed
docs(workspaces): document flat field for generateOptions
1 parent a5b8181 commit d8cb9a3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

content/cli/workspaces.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ These properties specify the compiler to use as well as various options that aff
197197
These properties specify the default generate options to be used by the `nest generate` command.
198198

199199
| Property Name | Property Value Type | Description |
200-
| ------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
200+
|---------------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
201201
| `spec` | boolean _or_ object | If the value is boolean, a value of `true` enables `spec` generation by default and a value of `false` disables it. A flag passed on the CLI command line overrides this setting, as does a project-specific `generateOptions` setting (more below). If the value is an object, each key represents a schematic name, and the boolean value determines whether the default spec generation is enabled / disabled for that specific schematic. |
202+
| `flat` | boolean | If true, all generate commands will generate a flat structure |
202203

203204
The following example uses a boolean value to specify that spec file generation should be disabled by default for all projects:
204205

@@ -211,6 +212,17 @@ The following example uses a boolean value to specify that spec file generation
211212
}
212213
```
213214

215+
The following example uses a boolean value to specify flat file generation should be the default for all projects:
216+
217+
```javascript
218+
{
219+
"generateOptions": {
220+
"flat": true
221+
},
222+
...
223+
}
224+
```
225+
214226
In the following example, `spec` file generation is disabled only for `service` schematics (e.g., `nest generate service...`):
215227

216228
```javascript

0 commit comments

Comments
 (0)