nscaf-cli
v1.4.0
Published
A NestJS Scaffolding CLI
Downloads
2
Readme
nscaf-cli
A NestJS Scaffolding CLI
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