I have wrong font-family value: font-family:13px, and cssshrink CLI gets:
/usr/local/lib/node_modules/cssshrink/lib/visitors/font-family-generic.js:28
var value = node[2][i][1].toLowerCase();
^
TypeError: Object number,13 has no method 'toLowerCase'
at Object.module.exports.process (/usr/local/lib/node_modules/cssshrink/lib/visitors/font-family-generic.js:28:33)
at tree (/usr/local/lib/node_modules/cssshrink/node_modules/gonzales-ast/lib/traverse.js:7:20)
at tree (/usr/local/lib/node_modules/cssshrink/node_modules/gonzales-ast/lib/traverse.js:15:13)
at tree (/usr/local/lib/node_modules/cssshrink/node_modules/gonzales-ast/lib/traverse.js:15:13)
at tree (/usr/local/lib/node_modules/cssshrink/node_modules/gonzales-ast/lib/traverse.js:15:13)
at /usr/local/lib/node_modules/cssshrink/node_modules/gonzales-ast/lib/traverse.js:24:11
at Array.forEach (native)
at Object.traverse (/usr/local/lib/node_modules/cssshrink/node_modules/gonzales-ast/lib/traverse.js:23:12)
at traverseAST (/usr/local/lib/node_modules/cssshrink/lib/shrink.js:50:15)
at Object.shrink (/usr/local/lib/node_modules/cssshrink/lib/shrink.js:66:9)
It took a while to find out that CSS was invalid. It would be great to log a bit more humanized error messages.
I have wrong font-family value:
font-family:13px
, and cssshrink CLI gets:It took a while to find out that CSS was invalid. It would be great to log a bit more humanized error messages.