leopardslab / clocal-gcp

🔭 Emulation engine for GCP
Apache License 2.0
67 stars 57 forks source link

Add dynamic commands registering #49

Open TheLukaszNs opened 5 years ago

TheLukaszNs commented 5 years ago

Fast Summary

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.