awesome-nestjs-schematics v10.1.1
Description
Awesome NestJS Schematics is a collection of code generators designed to streamline the development process when using the Awesome Nest Boilerplate. These schematics provide a set of commands to quickly generate various NestJS components such as controllers, services, modules, and more, ensuring consistency and reducing boilerplate code in your projects.
Installation
First, ensure you have the Awesome Nest Boilerplate installed in your project.
$ git clone git@github.com:NarHakobyan/awesome-nest-boilerplate.git
$ cd awesome-nest-boilerplate
$ yarn installUsage
To generate code using the schematics, run the following command:
$ nest g -c awesome-nestjs-schematics <schematic>OR
$ yarn generate <schematic> <name>For example, to generate a new controller:
$ nest g -c awesome-nestjs-schematics controllerTypes of Generators and Their Commands
Resource: Generate a new Nest resource, including a controller, service, and module.
$ yarn generate resourceDTO: Generate a new Data Transfer Object.
$ yarn generate dtoController: Generate a new Nest controller.
$ yarn generate controllerDecorator: Generate a new Nest decorator.
$ yarn generate decoratorFilter: Generate a new Nest filter.
$ yarn generate filterGuard: Generate a new Nest guard.
$ yarn generate guardInterceptor: Generate a new Nest interceptor.
$ yarn generate interceptorInterface: Generate a new Nest interface.
$ yarn generate interfaceMiddleware: Generate a new Nest middleware.
$ yarn generate middlewareModule: Generate a new Nest module.
$ yarn generate modulePipe: Generate a new Nest pipe.
$ yarn generate pipeProvider: Generate a new Nest provider.
$ yarn generate providerService: Generate a new Nest service.
$ yarn generate serviceCommand: Generate a new Nest CQRS command.
$ yarn generate commandQuery: Generate a new Nest CQRS query.
$ yarn generate query
Stay in touch
- Website - https://nestjs.com
- Twitter - @nestframework
License
Nest is MIT licensed.