Change policy text
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user