-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Clean messy output #2
Comments
👍 Also seeing messy output |
I rewrote the var lastChar;
function logWithPrefix(prefix, prefixColor, text, color) {
if (config.raw) {
process.stdout.write(text);
return;
}
text = text.replace(/\u2026/g,'...'); // Ellipsis
var lines = text.split('\n');
// Do not bgColor trailing space
var coloredPrefix = colorText(prefix.replace(/ $/, ''), prefixColor) + ' ';
var paddedLines = _.map(lines, function(line, index) {
var coloredLine = color ? colorText(line, color) : line;
if (index !== 0 && index !== (lines.length - 1)) {
coloredLine = coloredPrefix + coloredLine;
}
return coloredLine;
});
if (!lastChar || lastChar == '\n' ){
process.stdout.write(coloredPrefix);
}
lastChar = text[text.length - 1];
process.stdout.write(paddedLines.join('\n'));
} |
Has this been fixed, perhaps by the move to node v4? I'm running the latest version of @kimmobrunfeldt @elliottsj what commands were you running? Just wondering if I can repro |
Sorry, didnt link the PR. Here it is #70 |
Sorry for the delay on releasing this, folks! Check v3.5.1 🚢 |
Example of messy output:
Outputs should be grouped so that lines wouldn't be cut.
The text was updated successfully, but these errors were encountered: