0.3.2 • Published 5 years ago

class-cli v0.3.2

Weekly downloads
18
License
-
Repository
github
Last release
5 years ago

class-cli

A class-based approach to creating a CLI app

Install

npm i class-cli

Usage

const CLI = require('class-cli')

class App extends CLI {

  /* Use `CLI.option` to Define the args/flags using yargs-like options object */
  arg = CLI.option({ type: 'string', default: 'value' })

  /* Use `CLI.command` to Define commands the same way */
  command = CLI.command({
    command: '$0 [arg]',
    description: 'do stuff',
    ...
  })
}

const app = new App()
/* Initialize */
CLI.init(app);
/* Run */
CLI.run(app);
0.3.2

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.3.1

5 years ago

0.1.0

5 years ago