Sensible defaults for git style subcommands
npm install yarg-scriptsAutomatically load git-style subcommand pattern with yargs
First install yarg-scripts as usual:
yarn add yarg-scripts or npm install --save yarg-scripts
Then set your bin directive in your package.json to point to yarg-scripts:
``json`
...
"bin": {
"
},
...
Now, create a directory called scripts, and fill it with javascript files that export configuration for yargs subcommands as specified by yarg's command` function.
See yargs command documentation for more details.