Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (do-ddd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
do-ddd
do-ddd is a command-line tool designed to automate domain driven design abstractions on code. It generates scaffolding for your DDD-based Node.js projects. It can -
- Generate scaffolding for Controller and UseCase files based on RequestType and ResponseType files.
Features
- Analyzes user-defined Request and Response Types and generates corresponding UseCase and Controller files.
- TypeScript compatible.
- Utilizes AST manipulation for smart code generation.
How to Install
You can install do-ddd globally using npm:
npm install -g do-dddUsage
Once installed, you can use the do-ddd command to generate the necessary files. Here's how it works:
- Defined your Request and Response Types
I[SomethingSomething]Request.tsI[SomethingSomething]Response.ts
IAuthenticationRequest.ts
export const IAuthenticationRequest = {userEmail: String, password: String}IAuthenticationResponse.ts
export const IAuthenticationResponse = {authCode: String}- Run the following command in the directory containing these files:
```bash do-ddd generate ```
This will create:
[SomethingSomething]UseCase.ts[SomethingSomething]Controller.ts
Development
To contribute or modify the project, you can clone the repository and install the dependencies:
```bash git clone https://github.com/your-username/do-ddd.git cd do-ddd npm install ```
Build the project:
```bash npm run build ```
Link the project for local testing:
```bash npm run link ```
License
This project is licensed under the ISC License. See the LICENSE file for details.