[Feature request] Generate class with suffix
See original GitHub issueI’m submitting a…
[ ] Regression
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
command
nest g cl User.Entity
file
user.entity.ts
code
export class User.Entity {}
Expected behavior
command
nest g cl User --suffix entity
or nest g cl User -s entity
file
user.entity.ts
code
export class User {}
additional
User.Entity
is not a legal class name. If command like nest g cl User.Entity
shall generate export class UserEntity {}
without illegal characters. But in filename shall keep the dot because it legal and consider as a suffix.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
The file pattern of nest.js
is like angular
that each file has a suffix to represent its role in the project. So we shall add suffix to every file, but class
generator is playing not well.
Environment
_ _ _ ___ _____ _____ _ _____
| \ | | | | |_ |/ ___|/ __ \| | |_ _|
| \| | ___ ___ | |_ | |\ `--. | / \/| | | |
| . ` | / _ \/ __|| __| | | `--. \| | | | | |
| |\ || __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_
\_| \_/ \___||___/ \__|\____/ \____/ \____/\_____/\___/
[System Information]
OS Version : macOS
NodeJS Version : v10.14.2
NPM Version : 6.5.0
[Nest Information]
common version : 5.5.0
core version : 5.5.0
cqrs version : 5.1.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
[Feature Request]Suffix appending behind of all class name · Issue ...
When using inner classes will generate a inner class and a field named Mater . data class Blubber( val Master: Master? ) {...
Read more >Base Class Suffix on Model Generator - Feature Requests
I've implemented a patch to allow for generated models to have a suffix. This allows for easy regeneration of models.
Read more >Feature Request - Additional suffix to repeated methods - Unity Forum
Feature Request Additional suffix to repeated methods ... In API and Manual we can make some warning, like: "Avoid using loops and loops...
Read more >Name prefix/suffix functionality – IDEs Support (IntelliJ Platform)
functionality I can determine is that when generating accessor methods for class members with prefixes and suffixes, those accessor methods
Read more >Using Class Suffixes - Joomla! Documentation
The Class Suffix and Menu Tag ID parameters allow you to fine-tune the CSS styling of your web site. By using a leading...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @kamilmysliwiec , can I take this one?
PR merged