dev: ansi-html stack tweaking
This commit is contained in:
parent
95c53ee70b
commit
dcf587778f
3 changed files with 6 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -573,6 +573,10 @@ body {
|
|||
}
|
||||
|
||||
.error-stack {
|
||||
> span {
|
||||
background: none!important;
|
||||
color: inherit!important;
|
||||
}
|
||||
padding:10rem;
|
||||
user-select:initial;
|
||||
cursor: initial;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue