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 install
Usage
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 controller
Types of Generators and Their Commands
Resource: Generate a new Nest resource, including a controller, service, and module.
$ yarn generate resource
DTO: Generate a new Data Transfer Object.
$ yarn generate dto
Controller: Generate a new Nest controller.
$ yarn generate controller
Decorator: Generate a new Nest decorator.
$ yarn generate decorator
Filter: Generate a new Nest filter.
$ yarn generate filter
Guard: Generate a new Nest guard.
$ yarn generate guard
Interceptor: Generate a new Nest interceptor.
$ yarn generate interceptor
Interface: Generate a new Nest interface.
$ yarn generate interface
Middleware: Generate a new Nest middleware.
$ yarn generate middleware
Module: Generate a new Nest module.
$ yarn generate module
Pipe: Generate a new Nest pipe.
$ yarn generate pipe
Provider: Generate a new Nest provider.
$ yarn generate provider
Service: Generate a new Nest service.
$ yarn generate service
Command: Generate a new Nest CQRS command.
$ yarn generate command
Query: Generate a new Nest CQRS query.
$ yarn generate query
Stay in touch
- Website - https://nestjs.com
- Twitter - @nestframework
License
Nest is MIT licensed.