Skip to content

Commit

Permalink
fix: when in debug, output verbose line-by-line
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed May 22, 2016
1 parent e61f7bd commit ba67ef1
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,16 @@ function main() {
'\nLast job: ' + progress +
styles.gray.close;

process.stderr.write(
ansi.cursorRestorePosition +
ansi.cursorLeft +
ansi.eraseLines(2) +
str.trim() + '\n');
if (argv.debug) {
process.stderr.write(
str.trim() + '\n');
} else {
process.stderr.write(
ansi.cursorRestorePosition +
ansi.cursorLeft +
ansi.eraseLines(2) +
str.trim() + '\n');
}
};

inliner.on('progress', function progressEvent(event) {
Expand Down Expand Up @@ -138,5 +143,7 @@ function main() {
console.warn('warning: ' + event);
});
}
}).catch(function (error) {
console.error(error.stack);
});
}

0 comments on commit ba67ef1

Please sign in to comment.