@lava-x/nest-generator
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

LxNestGenerator

NestJs automation cli from Lava X

Available features

  • Enum generator
  • module generator
  • redis-cache generator
  • seeder generator

Getting started

# Install package
yarn add -D @lava-x/nest-generator

# Add the this line under the scripts section in package.json file
"generate": "./node_modules/.bin/plop --plopfile ./node_modules/@lava-x/nest-generator/dist/generate/index.js",

# Run the generator
yarn generate

Guide

  • Enum generator

    • generates enum which also registers to graphql
    Enum name: order-status
  • Module generator

    • Prompts 2 types of modules (with-nest-query & without-nest-query)
    • with-nest-query : Builds module with nest-query package (automated CRUD resolvers).
    • without-nest-query : Builds module without nest-query package.
    • with-relation : If the module has relationship such as (ManyToOne, OneToMany, OneToOne, ManyToMany) with other modules.
    • without-relation : If the module has no relationship with other modules (stand-alone).
    • Does the module needs customized services? : If the module needs additional business logic service, (yes,no).
    • Does the Relation Module exist? : If the relation module exists in the src/modules directory. (yes,no)
  • Redis-module generator

    • Uses the Cache module from the Nestjs and takes advantage by using 3rd-party stores. Ex: Redis.
    • Sets up the redis module into the project.
  • Seeder generator

    • Uses to generate seeds (test data) for a specific module.

Readme

Keywords

none

Package Sidebar

Install

npm i @lava-x/nest-generator

Weekly Downloads

19

Version

0.0.16

License

none

Unpacked Size

954 kB

Total Files

310

Last publish

Collaborators

  • lavax