Release Notes:
README: https://github.com/tj/commander.js/blob/release/7.x/Readme.md
You can try the prerelease with:
npm install commander@next
Open an issue or add a comment here for any problems you encounter.
Nice work @shadowspawn to keep this repo going! 馃憤 馃檹
I'll do another prerelease soon to add #1387
Prerelease v7.0.0-1 has a couple of new features, and a number of minor improvements. Release notes:
Work underway to change the default behaviour so options are _not_ stored as properties on the command: #1409
The latest code for upcoming Commander 7 is now on the develop branch. There will not be another prerelease to npm, but you can try the latest code by installing from GitHub:
npm install tj/commander.js#develop
The main changes from 7.0.0-2 are:
For changes see:
Hi @shadowspawn,
When you plan to make a release?
Aiming to release this Friday or over the weekend.
7.0.0 has been released. Thanks to all who have contributed.
Hi @shadowspawn,
I wrote basic help extensions for commander.js@7, maybe will be useful for someone:
const program = require('x-commander');
program.configureHelp({
labels: {
usage: '>>> Usage:\n',
description: '>>> Description:\n',
arguments: '>>> Arguments:\n',
options: '>>> Options:\n',
commands: '>>> Commands:\n',
},
styles: {
label: str => '\x1b[33m' + str + '\x1b[0m', // yellow
term: str => '\x1b[32m' + str + '\x1b[0m', // green
description: str => '\x1b[36m' + str + '\x1b[0m', // cyan
},
formatParams: {
newLineUsage: true,
baseIndentWidth: 2,
itemIndentWidth: 4,
},
formatHelp(cmd, helper) {
return ['', helper.renderHelpTemplate(cmd, helper), ''].join('\n');
}
});
program
.command('test <cmd> [env] [val]')
.description('long description '.repeat(100), {
cmd: 'cmd description '.repeat(50),
env: 'env description '.repeat(50),
val: 'val description '.repeat(50)
})
.action((cmd, env, options) => {});
program.parse(process.argv);
Nice. I like the styles especially.
Most helpful comment
Aiming to release this Friday or over the weekend.