Miss any of our Open RFC calls?Watch the recordings here! »

nscaf-cli

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

Keywords

Install

npm i nscaf-cli

DownloadsWeekly Downloads

1

Version

1.4.0

License

MIT

Unpacked Size

16 kB

Total Files

20

Last publish

Collaborators

  • avatar