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

feat: added new generate option to control spec file name #1968

Merged
merged 2 commits into from Apr 14, 2023

Conversation

hrkeni
Copy link

@hrkeni hrkeni commented Mar 12, 2023

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, a generated spec file always ends with .spec.ts

Issue Number: #1683

What is the new behavior?

There should be a cli flag and config option to specify the suffix to be used, with the default being spec.

nest g res foo --spec-file-suffix=test
nest-cli.json:

{
"generateOptions": {
"spec": true,
"specFileSuffix": "test"
}
}

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@kamilmysliwiec
Copy link
Member

And how is this new option applied to schematics?

@hrkeni
Copy link
Author

hrkeni commented Apr 13, 2023

@kamilmysliwiec The changes to schematics were already made in July 22 nestjs/schematics#1077
This is just enabling CLI to use those

@kamilmysliwiec kamilmysliwiec merged commit 4781b7d into nestjs:master Apr 14, 2023
@kamilmysliwiec
Copy link
Member

LGTM

@hrkeni hrkeni deleted the spec-file-suffix branch April 18, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants