nest-codegen
v0.1.8
Published
Create nest modules from the cli
Downloads
22
Maintainers
Readme
Nest code generator
Description
$ nest-codegen generate module
Generates a dto and an entity inside the modules folder, and a folder inside your src module containing:
- A repository folder, with index, a repository.interface and a repository
- A service folder, with index, a service.interface and a service
- A controller folder, with index, and a controller
- A module file
$ nest-codegen generate test
Generates a folder inside the provided directory with
- A dummies folder, with a repository mocking common functions (complete for your custom ones)
- A integration folder for e2e tests
- A unit folder for testing controllers and services
Installation
$ npm i -g nest-codegen
$ npm i --save nest-codegen
Usage
$ nest-codegen generate module
? What is the name of the module? Insert-name-here
? Path to the code, or leave blank for src/ (src)
$ nest-codegen generate test
? What is the name of the test module? Insert-test-name-here
? Path to the code, or leave blank for test/ (test)
Stay in touch
- Author - Nacho Ferrari