WIP new image analizis module in Phantomas
This commit is contained in:
@@ -47,6 +47,7 @@ var PhantomasWrapper = function() {
|
||||
|
||||
// Mandatory
|
||||
'analyze-css': true,
|
||||
'analyze-images': true,
|
||||
'ignoreSslErrors': true, // until Phantomas 2.1
|
||||
'ignore-ssl-errors': true // for Phantomas >= 2.2
|
||||
};
|
||||
@@ -80,6 +81,12 @@ var PhantomasWrapper = function() {
|
||||
offenders: results.getAllOffenders()
|
||||
};
|
||||
|
||||
// Special rules here
|
||||
if (task.options.device !== 'phone') {
|
||||
delete json.metrics.imagesExcessiveDensity;
|
||||
delete json.offenders.imagesExcessiveDensity;
|
||||
}
|
||||
|
||||
deferred.resolve(json);
|
||||
}).
|
||||
catch(res => {
|
||||
|
||||
Reference in New Issue
Block a user