Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
espoal wants to merge 3 commits into nestjs:master
base: master
Choose a base branch
Loading
from espoal:feat/caseNaming

Conversation

Copy link

@espoal espoal commented Oct 17, 2023
edited
Loading

Summary

This is the third of a multi PR effort aiming at supporting custom name casing conventions, as detailed here.

  1. The first PR attempts to update @nestjs/schematics to accept a caseType option when generating a new file.
  2. In this PR we add a caseNaming field to GenerateOptions
  3. This is the PR to document the new option
  4. Future PRs will extend this feature in term of supported actions, tests and configuration

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Currently @nestjs/cli uses kebab-case, as mentioned in this issue.

Issue Number: 462

What is the new behavior?

The goal is to add a caseNaming option to the GenerateOptions CLI config so that generated files will follow the desired name casing convention.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other informations

How to run

  • Install deps and build:
npm install
npm run build
  • Build updated @nestjs/schematics
    Clone this branch, and do:
npm install
npm run build
  • Install the updated @nestjs/schematics package
    Copy the dist folder in @nestjs/nest-cli deps: nest-cli/node_modules/@nestjs/schematics/dist/

  • Run it with one of those commands:
    node bin/nest.js new test-nest -s --caseNaming=camel to generate a custom nest-cli.json
    node bin/nest.js g co keb-pap in a folder with the correct nest-cli.json

Copy link

<3 thank you for creating this feature. it is really handy! can't wait to have it merged. Which version can it be expected?

espoal reacted with heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /