dev: ansi-html stack tweaking

This commit is contained in:
bordun 2018-10-27 14:49:11 +02:00
parent 95c53ee70b
commit dcf587778f
3 changed files with 6 additions and 1 deletions

View file

@ -20,6 +20,7 @@
"license": "GPL-3.0",
"dependencies": {
"ansi-html": "0.0.7",
"ansi-to-html": "^0.6.8",
"babel-core": "^6.26.3",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-preset-env": "^1.7.0",

View file

@ -92,7 +92,7 @@ function bundle() {
'<div class="error-stack">' +
ansiHTML(
err.stack
.replace(/\n\s*at Parser.*/g, '') // remove useless stack
.replace(/^ at .*/gm, '') // remove useless stack
.replace(new RegExp(path.resolve(__dirname + '/..'), 'g'),'.') // shorten file path
.trim()
.replace('\n','\n\n') // add 1 new line after 1st line

View file

@ -573,6 +573,10 @@ body {
}
.error-stack {
> span {
background: none!important;
color: inherit!important;
}
padding:10rem;
user-select:initial;
cursor: initial;