commandpost
commandpost copied to clipboard
Way to receive commands in any order.
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
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 });