Socket
Socket
Sign inDemoInstall

@mgansler/nx-prisma

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @mgansler/nx-prisma

Nx Plugin for Prisma


Version published
Maintainers
1
Install size
7.52 kB
Created

Readme

Source

Nx Plugin for prisma

This plugin helps with the usage of Prisma in a Nx workspace.

How to use

Put this into targets of your project.json.

{
  "format": {
    "executor": "@mgansler/nx-prisma:format"
  },
  "generate": {
    "executor": "@mgansler/nx-prisma:generate"
  }
}

Your schema should be located at <sourceRoot>/libs/schema.prisma

Running nx run <projectName>:generate will generate the Prisma client under libs/client. This directory can be added to your .gitignore.

You may want a src/index.ts with the following content:

export * from './lib/client/index'

Also, don't forget to add "src/lib/client/**" to the ignorePatterns of your .eslintrc.json.

Options

schema: Path to schema.prisma relative to the sourceRoot of the application/library. Default is libs/schema.prisma

Keywords

FAQs

Last updated on 21 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc