1
0
Fork 0

sparkles: Changes for new freesewing plugin model

This commit is contained in:
Joost De Cock 2018-12-18 14:19:16 +01:00
parent c6aea002e0
commit c89f7c66a1

View file

@ -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();
} }
} }
}; };