-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Start re-factoring the CLI codebase #177
Conversation
c09ad3f
to
2684cc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think “commands” should be under “lib”
} | ||
|
||
const verifications: Array<() => boolean> = [ | ||
displayVersionInformation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to make these asynchronous since you will potentially have some file I/O to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense!
@@ -0,0 +1,60 @@ | |||
import * as mockery from 'mockery'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note that this must be required first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be required whenever... But I guess if you want to use it, you have to not require
the stuff you want it to change how they are require
d before you've configured it... Which feels kind of obvious...
2684cc4
to
00ffaa9
Compare
Breaking down the monolithic CLI infrastructure by using `yarg`'s `commandDir` directive (see #176). This allows modelling each command in a separate module for a cleaner interface. Migrated the `docs` command, and created a prototype of a `doctor` command (see #154). The new commands also have basic unit tests that verify the handlers honor their promises.
Breaking down the monolithic CLI infrastructure by using `yarg`'s `commandDir` directive (see #176). This allows modelling each command in a separate module for a cleaner interface. Migrated the `docs` command, and created a prototype of a `doctor` command (see #154). The new commands also have basic unit tests that verify the handlers honor their promises.
00ffaa9
to
8db8ad9
Compare
Breaking down the monolithic CLI infrastructure by using
yarg
'scommandDir
directive (see #176). This allows modelling each command in a separate module for a cleaner interface.Migrated the
docs
command, and created a prototype of adoctor
command (see #154). The new commands also have basic unit tests that verify the handlers honor their promises.