Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic commands registering #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TheLukaszNs
Copy link

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.

* Update docs

* Remove redundant require of express library

* Remove redundant require of express library
* Update docs

* Remove redundant require of express library

* Remove redundant require of express library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants