This PR adds the ability to register commander commands dynamically using the NodeJS fs method called readdir. How does it work? It's simple - we are reading the cli-commands directory and then by looping through the directories we are requiring commands and then pushing it to the array of available commands. All the rest of the bin code stays the same.
Fast Summary
This PR adds the ability to register
commander
commands dynamically using the NodeJS fs method calledreaddir
. How does it work? It's simple - we are reading thecli-commands
directory and then by looping through the directories we are requiring commands and then pushing it to the array of available commands. All the rest of the bin code stays the same.