-
Notifications
You must be signed in to change notification settings - Fork 223
feat: initial support for case type selection #1501
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
base: master
Are you sure you want to change the base?
Changes from 17 commits
e67bc17
e724ccc
fa95c45
6472604
6a5892d
d887360
a6b53ea
b5a6000
7084629
9ae257c
c751a00
ee5d4db
919522e
226b62d
4c91bbe
e23da4c
d1008be
ff66dcb
a74f420
2ebc2b5
3e196c8
c9afe4a
c92fd1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import { | |
url, | ||
} from '@angular-devkit/schematics'; | ||
import { basename, parse } from 'path'; | ||
import { normalizeToKebabOrSnakeCase } from '../../utils/formatting'; | ||
import { normalizeToCase } from '../../utils/formatting'; | ||
import { | ||
DEFAULT_AUTHOR, | ||
DEFAULT_DESCRIPTION, | ||
|
@@ -19,7 +19,7 @@ import { | |
import { ApplicationOptions } from './application.schema'; | ||
|
||
export function main(options: ApplicationOptions): Rule { | ||
options.name = normalizeToKebabOrSnakeCase(options.name.toString()); | ||
options.name = normalizeToCase(options.name.toString(), 'kebab-or-snake'); | ||
|
||
const path = | ||
!options.directory || options.directory === 'undefined' | ||
|
@@ -41,6 +41,9 @@ function transform(options: ApplicationOptions): ApplicationOptions { | |
target.name = resolvePackageName(target.name.toString()); | ||
target.version = !!target.version ? target.version : DEFAULT_VERSION; | ||
|
||
target.caseNaming = !!target.caseNaming ? target.caseNaming : 'snake'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, maybe i missed something, but this shouldn't be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the original implementation a case named |
||
|
||
|
||
target.packageManager = | ||
!target.packageManager || target.packageManager === 'undefined' | ||
? 'npm' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Controller } from '@nestjs/common'; | ||
|
||
@Controller('<%= dasherize(name) %>') | ||
@Controller('<%= name %>') | ||
export class <%= classify(name) %>Controller {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Controller } from '@nestjs/common'; | ||
|
||
@Controller('<%= dasherize(name) %>') | ||
@Controller('<%= name %>') | ||
export class <%= classify(name) %>Controller {} |
Uh oh!
There was an error while loading. Please reload this page.