-
Notifications
You must be signed in to change notification settings - Fork 21
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
Remove Serverless:
prefix from inquirer
#82
Conversation
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
=======================================
Coverage 91.59% 91.59%
=======================================
Files 9 9
Lines 226 226
=======================================
Hits 207 207
Misses 19 19
Continue to review full report at Codecov.
|
const BasePrompt = require('inquirer/lib/prompts/base'); | ||
const originalGetQuestion = BasePrompt.prototype.getQuestion; | ||
BasePrompt.prototype.getQuestion = function () { | ||
this.opt.prefix = 'Serverless:'; | ||
this.opt.prefix = ''; |
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.
Overriding to empty string because by default it's equal to chalk.green('?')
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.
👍
const BasePrompt = require('inquirer/lib/prompts/base'); | ||
const originalGetQuestion = BasePrompt.prototype.getQuestion; | ||
BasePrompt.prototype.getQuestion = function () { | ||
this.opt.prefix = 'Serverless:'; | ||
this.opt.prefix = ''; |
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.
Maybe let's add comment, that we're overriding ?
, otherwise it looks obsolete
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.
Good call 👍
BREAKING CHANGE: Inquirer prompt will have no prefix instead of `Serverless:` If you wish, to still use `Serverless:` prefix, override it on the client side.
d58c637
to
59b2662
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.
👍
BREAKING CHANGE: Inquirer prompt will have no prefix instead of
Serverless:
If you wish, to still use
Serverless:
prefix, override it on the client side.Related to: serverless/serverless#9367