Skip to content

feat: document case naming generate option #2886

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion content/cli/usages.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ Creates and initializes a new Nest project. Prompts for package manager.
##### Options

| Option | Description |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--dry-run` | Reports changes that would be made, but does not change the filesystem.<br/> Alias: `-d` |
| `--skip-git` | Skip git repository initialization.<br/> Alias: `-g` |
| `--skip-install` | Skip package installation.<br/> Alias: `-s` |
| `--package-manager [package-manager]` | Specify package manager. Use `npm`, `yarn`, or `pnpm`. Package manager must be installed globally.<br/> Alias: `-p` |
| `--language [language]` | Specify programming language (`TS` or `JS`).<br/> Alias: `-l` |
| `--collection [collectionName]` | Specify schematics collection. Use package name of installed npm package containing schematic.<br/> Alias: `-c` |
| `--strict` | Start the project with the following TypeScript compiler flags enabled: `strictNullChecks`, `noImplicitAny`, `strictBindCallApply`, `forceConsistentCasingInFileNames`, `noFallthroughCasesInSwitch` |
| `--caseNaming [caseType]` | Set a preferred case convention, options are: `camel`, `kebab`, `snake`, `pascal`, `kebab-or-snake` |

#### nest generate

Expand Down
3 changes: 2 additions & 1 deletion content/cli/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ These properties specify the compiler to use as well as various options that aff
These properties specify the default generate options to be used by the `nest generate` command.

| Property Name | Property Value Type | Description |
| ------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|---------------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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. |
| `caseNaming` | CaseType | Determines the case naming convention for newly generated files / variables. Default is `kebab`, options are `camel`, `kebab`, `snake`, `pascal`, `kebab-or-snake`. |
| `flat` | boolean | If true, all generate commands will generate a flat structure |

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