nest-crud-schematics
v0.1.3
Published
Opinionated NestJS Schematics. Uses Prisma, Zod validations, and REST controllers.
Downloads
8
Maintainers
Readme
nest-crud-schematics
Schematics for NestJS REST API resources
This package generates opinionated NestJS REST API resources. Key takeaways:
- Uses Prisma Service (
nestjs-prisma
needs to be installed separately)- Expects Prisma entities to have singular naming (e.g. User)
- Uses Zod for DTO Validation (
nestjs-zod
needs to be installed separately) - Does not follow the NestJS naming convention (uses camelCase for the file names)
Installation
npm i --save-dev nest-crud-schematics
Usage
nest g -c nest-crud-schematics crud <Resource Name>
Or add npm alias
"scripts": {
"gen": "nest g crud -c nest-crud-schematics"
}
And then use
npm run gen <Resource Name>