Skip to content

ExternKit/extern-js-commander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extern-js-commander

  • Target : Javascript (NodeJS)
  • Library : commander
  • Last tested version : 2.9.0
  • Available on : Github - NPM

Usage

import js.commander.*;
import js.Node;

class Main
{
  static function main()
  {
    var program = new Commander(); // To use this syntax: require('commander');
    // OR
    var program = new Command('name'); // To use this syntax: new (require('commander').Command);
    
    program
      .version('0.0.1')
      .option('-p, --peppers', 'Add peppers')
      .option('-P, --pineapple', 'Add pineapple')
      .option('-b, --bbq-sauce', 'Add bbq sauce')
      .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')
      .parse(Node.process.argv)
    ;
    
    trace('you ordered a pizza with:');
    if (null != program.peppers) trace('  - peppers');
    if (null != program.pineapple) trace('  - pineapple');
    if (null != program.bbqSauce) trace('  - bbq');
    trace('  - ${program.cheese} cheese');
  }
}

About

NodeJS commander library extern

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages