node-ddd-cli
v1.0.2
Published
Small code structure generator for DDD generation
Downloads
9
Readme
DDD structure generator
Small code structure generator for DDD generation
Options:
- path
By default CLI generate the structure in
./src/modules/<name_of_your_module>
How to use
- Build project
npm run build
- Run generator
./bin/cli.js generate subscription
install from npm
- npm i generate-code-ddd
- run
./node_modules/node-ddd-cli/bin/cli.js generate <name_of_your_module>
- Crete the `structure file in your root folder like:
{
"structure": [
{
"name": "domain",
"children": [
"value-objects",
"entities",
"aggregates",
"events",
"subscriptions",
"repositories",
"services"
]
},
{ "name": "application", "children": ["use-cases"] },
{
"name": "infrastructure",
"children": ["models", "repositories", "mappers"]
}
]
}
Structure should looks like below:
└── modules
│
└── [module-name]
│
│── domain
│ ├── value-objects
│ ├── entities
│ ├── aggregates
│ ├── events
│ ├── subscriptions
│ ├── repositories
│ └── services
│
├── application
│ └── use-cases
│
└── infra
├── models
├── repositories
└── mappers