@shelfjs/schematics
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

Schematics

Library contains utils to generate and execute commands working with Nx

npm i --save-dev @shelfjs/schematics

Executors

Prisma

Run prisma under your project configuration

Supports

  • Generate
  • Migrate deploy
  • Migrate dev
  • Migrate reset
  • Pull
  • Studio

Usage in project.json

{
  "name": "server",
  "$schema": "../../node_modules/nx/schemas/project-schema.json",
  "sourceRoot": "packages/server/src",
  "targets": {
    "generate": {
      "executor": "@shelfjs/schematics:prisma-generate",
      "outputs": ["{workspaceRoot}/node_modules/generatedprisma"], // for cache
      "options": {
        "schema": "{projectRoot}/prisma/schema.prisma" // provide if your schema not in {projectRoot}/src/prisma/schema.prisma
      }
    },
  }
}

Generators

Nest Module

Generate nest dynamic module with .forRoot() and module configs

Usage:

--events generate additional events provider interface. default: true

--repository generate additional repostiory provider interface. default: false

nx g @shelfjs/schematics:nest-module <module-name> <path from root>

Nest CQRS

Generate nest command and queries with additional GraphQL resolver

Usage:

--graphql generate GraphQL resolver

--rest generate REST controller

--test generate Jest tests

nx g @shelfjs/schematics:nest-cqrs <command/query> <name> <path from root>

Readme

Keywords

none

Package Sidebar

Install

npm i @shelfjs/schematics

Weekly Downloads

2

Version

1.3.0

License

none

Unpacked Size

49.6 kB

Total Files

64

Last publish

Collaborators

  • temzzzz1