-
Notifications
You must be signed in to change notification settings - Fork 38
Conversation
…n by default in cases where the required arguments are not provided.
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.
Just some small changes :)
src/index.ts
Outdated
import validatorBaseImport = require('./validator'); | ||
import docsBaseImport = require('./docs'); | ||
program | ||
.version(version) |
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.
Can all these .something be indented so it's clear?
src/index.ts
Outdated
|
||
program.parse(process.argv); | ||
function doNoCommand() { | ||
console.error('\nno command given!'); |
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.
Lets format this nicely
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.
Sure, but I'm not really sure what you're referring to? :)
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.
Sorry, can we have better English on these feedback messages? As you mentioned in the issue
src/index.ts
Outdated
if (typeof firstArg === 'undefined') { | ||
console.error('no command given!'); | ||
function doNoArgument() { | ||
console.error('\nmissing required argument'); |
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.
Lets format this nicely
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.
Ditto.
Hi @martysweet, I've just noticed a few small considerations that also occur in
Should we treat these defects here, and if so then how? or should I open separate issues? |
Regarding new issues, has number 2 changed operation since this refactor or has it also been wrong in the docs? |
The second issue was already occuring, as are all the rest. You can clearly see it from: |
Ok, I'm going to merge this into master. Lets make an issue to fix the clashing |
Fixes #110 by updating "--help" to account for the supported commands and to be shown by default in cases where the required arguments are not provided.