prisma-json-generator

0.0.1 • Public • Published

prisma-json-generator

npm GitHub Workflow Status (with branch)

prisma-json-generator is a Prisma Generator to expose into a single file (.ts, .json or .js) all attributes coming from the Prisma Schema, in particular comments and annotations.

Get started

  • Setup your Prisma project as usual (Get Started With Prisma)
  • Install this package
    • npm install -D prisma-json-generator
    • yarn add -D prisma-json-generator
    • pnpm install -D prisma-json-generator
  • Modify your Prisma model file
    generator json {
        provider = "prisma-json-generator"
        output   = "./schema.ts"
    }
  • Run npx prisma generate

Enjoy !

Thanks

Special Thanks to @loancrate for his powerful and fast AST parser, and to @luisrudge for his prisma-generator-fake-data generator which help me bootstrap this project!

Package Sidebar

Install

npm i prisma-json-generator

Weekly Downloads

164

Version

0.0.1

License

MIT

Unpacked Size

32.6 kB

Total Files

15

Last publish

Collaborators

  • svengau