1
0
Fork 0
freesewing/packages/plugin-debug/src/index.js

32 lines
575 B
JavaScript
Raw Normal View History

2018-08-09 11:08:54 +02:00
import { version, name } from "../package.json";
export default {
name: name,
version: version,
hooks: {
debug: function(next, d = "", e = "", b = "", u = "", g = "") {
if(typeof d === 'object' && d.debug === 'custom') {
console.log(
"%c"+d.text,
d.style,
e,
b,
u,
g
2018-08-09 11:08:54 +02:00
);
} else {
console.log(
"%cDebug",
"color: #dd69dd; font-weight: bold",
d,
e,
b,
u,
g
);
}
2018-08-09 11:08:54 +02:00
next();
}
}
};