Thanks for reading! I did use the showHelp() function but that only showed the usage instructions when I used the --help flag, I wanted to show the usage too when no argument was passed hence I also made a custom usage template to print it out in the absence of an argument.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Cool, very good quick intro to yargs.
For the help function you couldve just used yarg.showHelp()
They already made that.
Thanks for reading! I did use the
showHelp()
function but that only showed the usage instructions when I used the--help
flag, I wanted to show the usage too when no argument was passed hence I also made a custom usage template to print it out in the absence of an argument.