-
Notifications
You must be signed in to change notification settings - Fork 28
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
Create combined index.ts when outputToNestJsResourceStructure and reExport are set to true #22
Comments
I can't reproduce this issue. Can you please share all your config? |
generator nestjsDto {
provider = "prisma-generator-nestjs-dto"
output = "../../libs/api/models/generated"
outputToNestJsResourceStructure = "true"
reExport = "true"
flatResourceStructure = "false"
exportRelationModifierClasses = "true"
createDtoPrefix = "Create"
updateDtoPrefix = "Update"
dtoSuffix = "Dto"
entityPrefix = ""
entitySuffix = ""
classValidation = "true"
fileNamingStyle = "kebab"
noDependencies = "false"
outputType = "class"
definiteAssignmentAssertion = "true"
prettier = "true"
} This will generate the following structure:
There is a barrel If I set the configuration to the following: generator nestjsDto {
...
outputToNestJsResourceStructure = "false"
flatResourceStructure = "true"
reExport = "true"
...
} I get this folder structure, where every file, including a barrel
This is quite messy but allows me to export everything from a single barrel I would like to have the following folder structure:
Here while and This allows me to re-export everything from a single barrel |
What about setting all 3 options to
It would generate a structure like below having model1 and model2 separated, but model1.dto.ts and model1.entity.ts are in the same folder with a common index.ts:
|
This would still require maintaining a barrel file on the root level manually. It's the smallest of inconveniences, I just wanted to put it out there ;-) |
Ah, I missed the last index.ts in the generated folder in your example. |
I added a combined index.ts in the root output folder. Please checkout https://www.npmjs.com/package/@brakebein/prisma-generator-nestjs-dto/v/1.18.0-beta4 |
When setting both outputToNestJsResourceStructure and reExport to true, no index.ts is created that re-exports from the individual dto and entity folders.
Perhaps a third option could be added to enable this behavior.
The text was updated successfully, but these errors were encountered: