-
Notifications
You must be signed in to change notification settings - Fork 72
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
[Requests] - Don't override existing - Generate Only Entity/Dto/Create #103
Comments
another idea could be checking if file exists on that path and has some other annotations then generate classes with those existing annotations. |
This is actually better but I don't know if it is harder to do. |
not overriding existing files could lead to inconsistent behaviour. esp. when we import that existing file in another newly generated file to reuse its generated contents. What I found to work great for me is to have generators produce code in a separate folder (e.g. // src/my-module/dto/input/create-foo.input.ts
import { CreateFooInput as GeneratedCreateFooInput } from 'src/generated';
export CreateFooInput extends GeneratedCreateFooInput {
// add custom props here
} This way you can always generate all the things - and only import what you need - and even make modifications. |
Hello, firstly I would like to say thank you for this amazing package. It saved a lot of time for me. Because I am using it currently, I would like to suggest/request two features.
1: Don't override if file exists
outputToNestJsResourceStructure = "true"
, I do add validators. It would be good if this package does not do anything if there is any file on that location. ( as an option )2: Select what is going to be generated. For example only generate Entity and Create Dto
The text was updated successfully, but these errors were encountered: