nest-console
TypeScript icon, indicating that this package has built-in type declarations

6.10.4 • Public • Published

nest-console

The nest-console module eases the creation of beautiful and testable command line interfaces for applications base on nestjs framework.

installation

yarn add nest-console

or

npm install nest-console --save

write a console class

import { Console, Argument, Option, Logger, Command } from 'nest-console' 

@Console('hello')
export class HelloCommand {
    @Command('test')
    test(
        @Argument('arg1', 'The first argument') arg1: string,
        @Argument('arg2', 'The second argument') arg2: string,
        @Option('opt1', 'The first option') opt1: string,
        logger: Logger
    ) {
        logger.info({
            arg1,
            arg2,
            opt1
        })
    }
}

Package Sidebar

Install

npm i nest-console

Weekly Downloads

38

Version

6.10.4

License

none

Unpacked Size

28.1 kB

Total Files

32

Last publish

Collaborators

  • mr5