nscaf-cli
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

nscaf-cli

A NestJS Scaffolding CLI

oclif Version Downloads/week License

About

Made with oclif - the open CLI framework.

This is a cli to generate advanced modules for nestJS. These modules include the CRUD actions from @nestjsx/crud.

Note:

You must have an entityService class that the generated modules will inherit from in case of database requirements.

This is a sample EntityService:

import { TypeOrmCrudService } from '@nestjsx/crud-typeorm';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
 
export class EntityService<T> extends TypeOrmCrudService<T> {
    get repository(): Repository<T> {
        return this.repo;
    }
 
    constructor(repo: Repository<T>) {
        super(repo);
    }
}
 

Usage

$ npm install -g nscaf-cli
$ nscaf COMMAND
running command...
$ nscaf (-v|--version|version)
nscaf-cli/1.4.0 win32-x64 node-v10.16.0
$ nscaf --help [COMMAND]
USAGE
  $ nscaf COMMAND
...

Commands

nscaf help [COMMAND]

display help for nscaf

USAGE
  $ nscaf help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

nscaf nestmodule MODULENAME

Generate a new NestJS Module

USAGE
  $ nscaf nestmodule MODULENAME

OPTIONS
  -h, --help  show CLI help

See code: src\commands\nestmodule.ts

Readme

Keywords

Package Sidebar

Install

npm i nscaf-cli

Weekly Downloads

0

Version

1.4.0

License

MIT

Unpacked Size

16 kB

Total Files

20

Last publish

Collaborators

  • dimosthenisk