0.3.0 • Published 3 years ago

x-commander v0.3.0

Weekly downloads
21
License
MIT
Repository
-
Last release
3 years ago

x-commander

Extended version of commander.js

Installation

npm install x-commander

Usage

const { program } = require('x-commander');

// defaults
program.configureHelp({
    labels: {
        usage: 'Usage:',
        description: undefined,
        arguments: 'Arguments:',
        options: 'Options:',
        commands: 'Commands:',
    },
    styles: {
        label: str => str,
        usage: str => str,
        description: str => str,
        term: str => str,
        termDescription: str => str,
    },
    formatParams: {
        newLineUsage: false,
        indentDescription: false,
        baseIndentWidth: 0,
        itemIndentWidth: 2,
        itemSeparatorWidth: 2,
        minColumnWidthForWrap: 40,
    },
    formatHelp(cmd, helper) {
        return helper.renderHelpTemplate(cmd, helper);
    }
});

License

MIT

0.3.0

3 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago