Advanced yargs
Before we get into the advanced discussion of yargs
, first, I want to pull up the yargs
docs so that you at least know where the information about yargs
is coming from. You can get it by Googling npm yargs
. We're going to go to the yargs
package page on npm
. This has the documentation for yargs
, as shown here:

Now there is no table of contents for the yargs
docs, which makes it kind of difficult to navigate. It starts off with some examples that don't go in any particular order, and then eventually it gets into a list of all the methods you have available, and that's what we're looking for.
So I'll use command + F (Ctrl + F) to search the page for methods, and as shown in the following screenshot, we get the methods header, which is the one we're looking for:

If you scroll down on the page, we start to see an alphabetical list of all the methods you have access to inside of yargs
. We're specifically looking for .command
; this is the method we can use to configure all four of...