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

add(nest-cli): flat generate option #2561

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
9 changes: 9 additions & 0 deletions src/schemas/json/nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,20 @@
"properties": {
"spec": {
"$ref": "#/definitions/GenerateSpecOptions"
},
"flat": {
"$ref": "#/definitions/GenerateFlatOptions"
}
},
"default": {},
"additionalProperties": false
},
"GenerateFlatOptions": {
"type": "boolean",
"default": false,
"description": "If true, all generate commands will generate a flat structure",
"$comment": "https://docs.nestjs.com/cli/monorepo#global-generate-options"
},
"GenerateSpecOptions": {
"type": ["boolean", "object"],
"description": "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. See https://docs.nestjs.com/cli/monorepo#global-generate-options for details.",
Expand Down
6 changes: 4 additions & 2 deletions src/test/nest-cli/nest-cli-generateOptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"config": true,
"controller": false,
"co": false
}
},
"flat": false
},
"monorepo": true,
"projects": {
Expand All @@ -57,7 +58,8 @@
"config": false,
"controller": true,
"co": true
}
},
"flat": true
}
}
},
Expand Down