hxnodejs-commander

Externs for the commander NPM module
https://github.com/nadako/hxnodejs-commander

To install, run:

haxelib install hxnodejs-commander 2.9.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Haxe/hxnodejs externs for the commander NPM module

For commander version: 2.9.0

Build Status

It is really simple and usage is quite similar to the original JavaScript API:

import js.Node.process;
import js.Node.console;
import js.npm.Commander.root as program;

class Intro {
    static function main() {
        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(process.argv);

        console.log('you ordered a pizza with:');
        if (program.peppers) console.log('  - peppers');
        if (program.pineapple) console.log('  - pineapple');
        if (program.bbqSauce) console.log('  - bbq');
        console.log('  - %s cheese', program.cheese);
    }
}

See more examples in the examples directory.

Contributors
nadako
Version
2.9.0
Published
2 years ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github