I need to run some code before each command runs, using the name of the command. i was unable to find anything in the yargs api docs.
specifically, i want to delete the cache created by each of my commands. for example the command foo
, creates a cache in ./.tmp/foo
. i want to delete only that cache before each time it runs. i can delete it from each command callback, but curious if there is a more programmatic way to do it.
does yargs have any features i can use to accomplish this?