omar-dulaimi / prisma-zod-generator

Prisma 2+ generator to emit Zod schemas from your Prisma schema
MIT License
513 stars 45 forks source link

fix issue-71 #79

Open justinsgithub opened 1 year ago

justinsgithub commented 1 year ago

Description

when a user chooses a custom output directory, everything inside of that directory is deleted. it is common for users to put code in /src directory, if this is their chosen output directory, all of their code will be deleted

References

Issue 71

omar-dulaimi commented 1 year ago

Hey @justinsgithub

Does this handle other files/folders this library generates? or just the schemas folder?

justinsgithub commented 1 year ago

@omar-dulaimi

it handles all files and folders generated by placing them in a folder called "schemas", inside of the directory specified by the user (or the default directory if user does not specify one).

The "schmas" directory just adds a layer of protection so that user does not accidentally delete their own files by specifying a non-empty directory in their project

"schemas" was just a name from the top of my head at the moment