1.1.3 • Published 4 years ago

tbrex v1.1.3

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

TBrex - CLI Maker

This is a library intended to help creating CLI tools.

Installation

npm install tbrex --save

Example Usage

  const {Command, Switcher} = require('tbrex');
  
  class EchoCommand extends Command {
    constructor() {
      super("echo");
    }

    async exec(args, out) {
      out.send(args);
      return this.SUCCESS;
    }

    describe() {
      return 'Echoes back any arguments passed to it';
    }
  }

  const app = new Switcher({
    options: {
      echo: new EchoCommand()
    }
  })

  app.run(process.argv.slice(2)).then(process.exit);
1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago