sparkles: Added ability to format message prefix
This commit is contained in:
parent
be79f77940
commit
6105b18467
2 changed files with 19 additions and 10 deletions
|
@ -1,4 +1,2 @@
|
||||||
src
|
src
|
||||||
.editorconfig
|
.editorconfig
|
||||||
rollup.browser.js
|
|
||||||
rollup.node.js
|
|
||||||
|
|
|
@ -5,15 +5,26 @@ export default {
|
||||||
version: version,
|
version: version,
|
||||||
hooks: {
|
hooks: {
|
||||||
debug: function(next, d = "", e = "", b = "", u = "", g = "") {
|
debug: function(next, d = "", e = "", b = "", u = "", g = "") {
|
||||||
console.log(
|
if(typeof d === 'object' && d.debug === 'custom') {
|
||||||
"%cDebug",
|
console.log(
|
||||||
"color: #dd69dd; font-weight: bold",
|
"%c"+d.text,
|
||||||
d,
|
d.style,
|
||||||
e,
|
e,
|
||||||
b,
|
b,
|
||||||
u,
|
u,
|
||||||
g
|
g
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
console.log(
|
||||||
|
"%cDebug",
|
||||||
|
"color: #dd69dd; font-weight: bold",
|
||||||
|
d,
|
||||||
|
e,
|
||||||
|
b,
|
||||||
|
u,
|
||||||
|
g
|
||||||
|
);
|
||||||
|
}
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue