commandpost icon indicating copy to clipboard operation
commandpost copied to clipboard

Way to receive commands in any order.

Open zoecarver opened this issue 7 years ago • 1 comments

Is there any way to receive commands in any order? For example, it would be nice to be able to do something like this:

$ node index.js --port 1234 server --uglify -inspect

Currently only this works:

$ node index.js server --port 1234 --uglify --inspect

zoecarver avatar Apr 11 '18 19:04 zoecarver

sorry for late response. It's a specification. commandpost can organize options to root or sub commands.

If you want to do that, You can access & merge options in subcommands. for example... https://github.com/vvakame/commandpost/blob/master/example/usage.ts#L64

console.log({ ...root.parsedOpts, ...remote.parsedOpts, ...opts });

vvakame avatar Apr 18 '18 06:04 vvakame