Skip to content

Notekunn/schematics

Repository files navigation

NestJS CLI Schematics for CQRS Structure

Usage

Import this package as your dev dependencies: yarn add -D @notekunn/schematics

Then to create new feature call nest g <feature-name> <name> where feature-name is the name of the feature.

This call will create the following structure in libs directory:

src
|-- modules
    |-- users
    |   |   |-- commands
    |   |   |   |-- handler
    |   |   |   |-- impl
    |   |   |-- event
    |   |   |   |-- handler
    |   |   |   |-- impl
    |   |   |-- queries
    |   |   |   |-- handler
    |   |   |   |-- impl
    |   |   |-- saga
    |   |   |   |-- index.ts