Open JoeRoddy opened 1 year ago
Hey, I thought the blog I've written does a much better job doing that. check it out https://dev.to/yassineldeeb/create-prisma-generator-2mdg and let me know what do you think?
I think the bits I missed out after the initial npx
command then running pnpm
install was the command mentioned in step 2 (build the generator!).
Fairly obvious now that I think about it but I couldn't work out why pnpm prisma generate
in /usage
wasn't doing anything for longer than I care to admin 😆
Hi! Awesome project btw!
Is your feature request related to a problem? Please describe.
Spent about an hour digging through the source code to get a feel for how everything is working. Would be convenient to have explicit directions on how to make changes to the generator and test the updates. I'm now able to make changes and test them in the
/usage
directory, but tbh I'm still not sure if I'm technically using it correctly.I feel like the documentation of the usage of the generated codebase is somewhat lacking.
Describe the solution you'd like
Documentation on the correct workflow for making changes to your generator and testing them. Right now my workflow is:
/packages/generator/src/generator.ts
cd /packages/generator && npm run prepack
cd /packages/usage && npx prisma migrate
Not sure if there's an easier way, but that's what I arrived at via trial and error.
Could also provide a QOL script in the base directory's
package.json
: "generate": "cd packages/generator && npm run prepack && cd ../usage && npx prisma generate"Thanks again for your time making this great project!