1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-04 12:40:05 +02:00

update packages to latest version

This commit is contained in:
s2
2022-08-20 18:51:33 +02:00
parent 09663a35a5
commit 806ebf9a57
4513 changed files with 366205 additions and 92512 deletions

View File

@@ -4,9 +4,7 @@ var DEFAULTS = {
hexAlpha: false, // 4- and 8-character hex notation
opacity: true // rgba / hsla
},
customUnits: {
rpx: false
},
customUnits: { rpx: false },
properties: {
backgroundClipMerging: true, // background-clip to shorthand
backgroundOriginMerging: true, // background-origin to shorthand
@@ -79,17 +77,9 @@ var DEFAULTS = {
}
};
DEFAULTS.ie11 = merge(DEFAULTS['*'], {
properties: {
ieSuffixHack: true
}
});
DEFAULTS.ie11 = merge(DEFAULTS['*'], { properties: { ieSuffixHack: true } });
DEFAULTS.ie10 = merge(DEFAULTS['*'], {
properties: {
ieSuffixHack: true
}
});
DEFAULTS.ie10 = merge(DEFAULTS['*'], { properties: { ieSuffixHack: true } });
DEFAULTS.ie9 = merge(DEFAULTS['*'], {
properties: {
@@ -99,9 +89,7 @@ DEFAULTS.ie9 = merge(DEFAULTS['*'], {
});
DEFAULTS.ie8 = merge(DEFAULTS.ie9, {
colors: {
opacity: false
},
colors: { opacity: false },
properties: {
backgroundClipMerging: false,
backgroundOriginMerging: false,
@@ -133,9 +121,7 @@ DEFAULTS.ie8 = merge(DEFAULTS.ie9, {
});
DEFAULTS.ie7 = merge(DEFAULTS.ie8, {
properties: {
ieBangHack: true
},
properties: { ieBangHack: true },
selectors: {
ie7Hack: true,
mergeablePseudoClasses: [
@@ -144,7 +130,7 @@ DEFAULTS.ie7 = merge(DEFAULTS.ie8, {
':hover',
':visited'
]
},
}
});
function compatibilityFrom(source) {
@@ -153,12 +139,14 @@ function compatibilityFrom(source) {
function merge(source, target) {
for (var key in source) {
var value = source[key];
if (Object.prototype.hasOwnProperty.call(source, key)) {
var value = source[key];
if (typeof value === 'object' && !Array.isArray(value)) {
target[key] = merge(value, target[key] || {});
} else {
target[key] = key in target ? target[key] : value;
if (Object.prototype.hasOwnProperty.call(target, key) && typeof value === 'object' && !Array.isArray(value)) {
target[key] = merge(value, target[key] || {});
} else {
target[key] = key in target ? target[key] : value;
}
}
}
@@ -166,20 +154,18 @@ function merge(source, target) {
}
function calculateSource(source) {
if (typeof source == 'object')
return source;
if (typeof source == 'object') { return source; }
if (!/[,\+\-]/.test(source))
return DEFAULTS[source] || DEFAULTS['*'];
if (!/[,+-]/.test(source)) { return DEFAULTS[source] || DEFAULTS['*']; }
var parts = source.split(',');
var template = parts[0] in DEFAULTS ?
DEFAULTS[parts.shift()] :
DEFAULTS['*'];
var template = parts[0] in DEFAULTS
? DEFAULTS[parts.shift()]
: DEFAULTS['*'];
source = {};
parts.forEach(function (part) {
parts.forEach(function(part) {
var isAdd = part[0] == '+';
var key = part.substring(1).split('.');
var group = key[0];