Skip to content
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

Update Readme to clarify installation procedure #115

Merged
merged 2 commits into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,17 @@ Just add the following code to your `prisma.schema` file to create a single `ind

```prisma
generator zod {
provider = "zod-prisma-types"
provider = "npx zod-prisma-types"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is strange that you needed to add npx here.Ccan we add this change as a solution for cases like you encountered it instead of making it the default behaviour, since the standard behaviour should generally work.

}
```

Then import the schema's into your file:

```
import { mySchema } from "/prisma/generated/zod"; // All schemas are here by default, use the 'output' option to change it
```


If you want to customize the behaviour of the generator you can use the following options:

```prisma
Expand Down