-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Fix duplicate output when more than 1 line (fixes #153) #168
Conversation
Done! |
Thank you dude! This is a big one |
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.
Looks really good - once again thank you
lib/elements/prompt.js
Outdated
@@ -12,7 +12,7 @@ const color = require('kleur'); | |||
* @param {Stream} [opts.stdout] The Writable stream to write readline data to | |||
*/ | |||
class Prompt extends EventEmitter { | |||
constructor(opts={}) { | |||
constructor(opts = {}) { |
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.
Looks like there is some auto-formatting going on. Should we introduce something like prettier to avoid this in the future?
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.
Would be a good idea ... this would also allow to unify the code style
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.
Fixed!
lib/elements/date.js
Outdated
* @param {Function} [opts.validate] Function to validate the submitted value | ||
* @param {Stream} [opts.stdin] The Readable stream to listen to | ||
* @param {Stream} [opts.stdout] The Writable stream to write readline data to | ||
* @param {Number} [opts.initial] Index |
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.
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.
Fixed! Don't know why it did that. My formatting settings are setted so my IDE should not even touch the comments. That's weird.
lib/util/ansi.js
Outdated
@@ -0,0 +1,8 @@ | |||
'use strict'; |
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.
Should we add this to sister-ansi
instead?
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's also what I was thinking so I've already created a PR for that on sisteransi. 😉
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.
Awesome! I somehow missed that. It's merged now!
Other than the code style issue, everything looks fine :) |
Hyped to get this one published. I have merged your sisteransi PR in terkelg/sisteransi#4 and published a new version. It should be ready to be used in Prompts |
I just realised that in the Update: I've already updated package.json so it works with the next version of sisteransi which should be 1.0.2. That's probably why travis fails. |
I fixed sisteransi but I noticed something else... (See the note in the PR) |
Awesome! 🚀 |
Fixes #153
Note: don't merge yet. I'll check the other prompt types too...
Update: I've fixed the other prompt types. You can merge if you want.