@@ -473,24 +473,6 @@ var policies = {
|
||||
return offendersHelpers.orderByFile(parsedOffenders);
|
||||
}
|
||||
},
|
||||
"cssComplexSelectorsByAttribute": {
|
||||
"tool": "phantomas",
|
||||
"label": "Complex attributes selector",
|
||||
"message": "<p>Complex attributes selectors are one of these:<ul><li>.foo[type*=bar] (contains bar)</li><li>.foo[type^=bar] (starts with bar)</li><li>.foo[type|=bar] (starts with bar or bar-)</li><li>.foo[type$=bar] (ends with bar)</li><li>.foo[type~=bar baz] (bar or baz)</li></ul></p><p>Their matching process needs more CPU and it has a cost on performances.</p>",
|
||||
"isOkThreshold": 0,
|
||||
"isBadThreshold": 75,
|
||||
"isAbnormalThreshold": 150,
|
||||
"hasOffenders": true,
|
||||
"offendersTransformFn": function(offenders) {
|
||||
var parsedOffenders = offenders.map(function(offender) {
|
||||
var splittedOffender = offendersHelpers.cssOffenderPattern(offender);
|
||||
splittedOffender.bolded = splittedOffender.css.replace(/(\[[^ ]+[~\|\^\$\*]=["']?[^"'\]]+["']?\])/g, '<b>$1</b>');
|
||||
return splittedOffender;
|
||||
});
|
||||
|
||||
return offendersHelpers.orderByFile(parsedOffenders);
|
||||
}
|
||||
},
|
||||
"cssColors": {
|
||||
"tool": "phantomas",
|
||||
"label": "Colors count",
|
||||
@@ -856,20 +838,6 @@ var policies = {
|
||||
};
|
||||
}
|
||||
},
|
||||
"cssUniversalSelectors": {
|
||||
"tool": "phantomas",
|
||||
"label": "Universal selectors",
|
||||
"message": "<p>Universal selectors are the most expensive CSS selectors.</p><p>More informations <a href=\"http://perfectionkills.com/profiling-css-for-fun-and-profit-optimization-notes/\" target=\"_blank\">here</a>.</p>",
|
||||
"isOkThreshold": 0,
|
||||
"isBadThreshold": 50,
|
||||
"isAbnormalThreshold": 150,
|
||||
"hasOffenders": true,
|
||||
"offendersTransformFn": function(offenders) {
|
||||
var parsedOffenders = offenders.map(offendersHelpers.cssOffenderPattern);
|
||||
|
||||
return offendersHelpers.orderByFile(parsedOffenders);
|
||||
}
|
||||
},
|
||||
"cssRedundantBodySelectors": {
|
||||
"tool": "phantomas",
|
||||
"label": "Redundant body selectors",
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
"policies": {
|
||||
"cssRules": 2,
|
||||
"cssComplexSelectors": 2,
|
||||
"cssComplexSelectorsByAttribute": 1.5,
|
||||
"cssColors": 0.5,
|
||||
"similarColors": 0.5,
|
||||
"cssBreakpoints": 1,
|
||||
@@ -88,7 +87,6 @@
|
||||
"cssImportants": 3,
|
||||
"cssOldIEFixes": 1,
|
||||
"cssOldPropertyPrefixes": 1,
|
||||
"cssUniversalSelectors": 1,
|
||||
"cssRedundantBodySelectors": 1,
|
||||
"cssRedundantChildNodesSelectors": 1
|
||||
}
|
||||
|
||||
@@ -214,7 +214,6 @@ var ImageOptimizer = function() {
|
||||
var endTime = Date.now();
|
||||
debug('Optimization for %s took %d ms', type, endTime - startTime);
|
||||
deferred.resolve(file);
|
||||
console.log('ET HOP');
|
||||
})
|
||||
|
||||
.catch(function(err) {
|
||||
|
||||
Reference in New Issue
Block a user