diff --git a/lib/metadata/policies.js b/lib/metadata/policies.js index 269c8b2..3354348 100644 --- a/lib/metadata/policies.js +++ b/lib/metadata/policies.js @@ -875,7 +875,7 @@ var policies = { "fileMinification": { "tool": "weightChecker", "label": "File minification", - "message": "
This is the weight that could be saved if all text resources were correctly minified.
The tools in use here are UglifyJS, clean-css and HTMLMinifier.
The gains of minification are generally small, but the impact can be high when these text files are loaded on the critical path.
", + "message": "This is the weight that could be saved if all text resources were correctly minified.
The tools in use here are UglifyJS, clean-css and HTMLMinifier. These tools are so good that some of your minified files can be marked as unminified. Change your tool it this happens :)
The gains of minification are generally small, but the impact can be high when these text files are loaded on the critical path.
", "isOkThreshold": 20480, "isBadThreshold": 81920, "isAbnormalThreshold": 153600, diff --git a/lib/tools/weightChecker/fileMinifier.js b/lib/tools/weightChecker/fileMinifier.js index dd5ec2b..c879cef 100644 --- a/lib/tools/weightChecker/fileMinifier.js +++ b/lib/tools/weightChecker/fileMinifier.js @@ -89,7 +89,6 @@ var FileMinifier = function() { return minifyHtml(entry.weightCheck.body) .then(function(newFile) { - console.log('KKKKKKKKKKKK'); if (!newFile) { debug('Optimization didn\'t work'); return entry; @@ -103,18 +102,12 @@ var FileMinifier = function() { entry.weightCheck.minified = newFileSize; entry.weightCheck.isMinified = false; debug('Filesize is %d bytes smaller (-%d%)', fileSize - newFileSize, Math.round((fileSize - newFileSize) * 100 / fileSize)); - } else { - console.log('OOOO old file size: ' + fileSize); - console.log('OOOO new file size: ' + newFileSize); - console.log(entry.weightCheck); } return entry; }) .fail(function(err) { - console.log('LLLLLLLLLLLLLLL'); - console.log(err); return entry; }); @@ -127,7 +120,7 @@ var FileMinifier = function() { } // The gain is estimated of enough value if it's over 2KB or over 20%, - // but it's ignored if is below 100 bytes + // but it's ignored if is below 400 bytes function gainIsEnough(oldWeight, newWeight) { var gain = oldWeight - newWeight; var ratio = gain / oldWeight;