squareboat / nestjs-boilerplate

A production-ready 🏭 NestJS boilerplate with batteries 🔋 included. No Kidding! Now Supports NestJS V10!!
https://squareboat.com/open-source/nestjs-boilerplate/
MIT License
685 stars 99 forks source link

Feature/cli scaffolding #20

Closed rasikraj01 closed 3 years ago

rasikraj01 commented 3 years ago

Added console commands for generation of transformers and module

Commands ⬇️

➜  nestjs-boilerplate transformer:create
? Enter Transformer name :  test
✅ /transformer/index.ts
✅ /transformer/test/Detail.ts
✅ transformer/test/index.ts
➜   nestjs-boilerplate module:create
? Enter name of module : post
✅ posts/repositories/databases/index.ts
✅ posts/services/PostService.ts
✅ posts/services/index.ts
✅ posts/controllers/PostController.ts
✅ posts/controllers/index.ts
✅ posts/module.ts
✅ posts/constants.ts
✅ posts/index.ts
✅ posts/models/Post.ts
✅ posts/repositories/databases/Post.ts
✅ posts/repositories/index.ts
✅ posts/repositories/index.ts
✅ posts/models/index.ts
✅ posts/repositories/contracts/Post.ts
✅ posts/repositories/contracts/index.ts

Directory Structure for the generated code :

Transformer :

Screenshot 2020-12-04 at 8 36 31 AM

Module:

Screenshot 2020-12-04 at 8 52 59 AM Screenshot 2020-12-13 at 3 00 36 AM