sparkles: Changes for new freesewing plugin model
This commit is contained in:
parent
c6aea002e0
commit
c89f7c66a1
1 changed files with 10 additions and 29 deletions
|
@ -21,37 +21,18 @@ export default {
|
||||||
name: name,
|
name: name,
|
||||||
version: version,
|
version: version,
|
||||||
hooks: {
|
hooks: {
|
||||||
debug: function(next, d = "", e = "", b = "", u = "", g = "") {
|
debug: function(data, more) {
|
||||||
if(typeof d === 'object' && d.debug === 'custom') {
|
if(
|
||||||
console.log(
|
typeof data === "object" &&
|
||||||
"%c"+d.text,
|
typeof data.type === "string" &&
|
||||||
d.style,
|
typeof data.label === "string" &&
|
||||||
e,
|
typeof data.msg === "string" &&
|
||||||
b,
|
Object.keys(data).length === 3) {
|
||||||
u,
|
// Make it pretty
|
||||||
g
|
console.log("%c"+data.label, debugStyle(data.type), data.msg);
|
||||||
);
|
|
||||||
} else if(typeof d === 'object' && typeof d.style !== 'undefined') {
|
|
||||||
console.log(
|
|
||||||
"%c"+d.label,
|
|
||||||
debugStyle(d.style),
|
|
||||||
e,
|
|
||||||
b,
|
|
||||||
u,
|
|
||||||
g
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(data);
|
||||||
"%c💡 Debug",
|
|
||||||
"color: #dd69dd; font-weight: bold",
|
|
||||||
d,
|
|
||||||
e,
|
|
||||||
b,
|
|
||||||
u,
|
|
||||||
g
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
next();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue