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

update node modules

This commit is contained in:
s2
2019-03-29 15:56:41 +01:00
parent f114871153
commit 89c32fb4e6
8347 changed files with 390123 additions and 159877 deletions

36
node_modules/cssom/lib/CSSSupportsRule.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
//.CommonJS
var CSSOM = {
CSSRule: require("./CSSRule").CSSRule,
};
///CommonJS
/**
* @constructor
* @see https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface
*/
CSSOM.CSSSupportsRule = function CSSSupportsRule() {
CSSOM.CSSRule.call(this);
this.conditionText = '';
this.cssRules = [];
};
CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSRule();
CSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule;
CSSOM.CSSSupportsRule.prototype.type = 12;
Object.defineProperty(CSSOM.CSSSupportsRule.prototype, "cssText", {
get: function() {
var cssTexts = [];
for (var i = 0, length = this.cssRules.length; i < length; i++) {
cssTexts.push(this.cssRules[i].cssText);
}
return "@supports " + this.conditionText + " {" + cssTexts.join("") + "}";
}
});
//.CommonJS
exports.CSSSupportsRule = CSSOM.CSSSupportsRule;
///CommonJS

8
node_modules/cssom/lib/clone.js generated vendored
View File

@@ -3,6 +3,7 @@ var CSSOM = {
CSSStyleSheet: require("./CSSStyleSheet").CSSStyleSheet,
CSSStyleRule: require("./CSSStyleRule").CSSStyleRule,
CSSMediaRule: require("./CSSMediaRule").CSSMediaRule,
CSSSupportsRule: require("./CSSSupportsRule").CSSSupportsRule,
CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration,
CSSKeyframeRule: require('./CSSKeyframeRule').CSSKeyframeRule,
CSSKeyframesRule: require('./CSSKeyframesRule').CSSKeyframesRule
@@ -32,7 +33,8 @@ CSSOM.clone = function clone(stylesheet) {
//5: CSSOM.CSSFontFaceRule,
//6: CSSOM.CSSPageRule,
8: CSSOM.CSSKeyframesRule,
9: CSSOM.CSSKeyframeRule
9: CSSOM.CSSKeyframeRule,
12: CSSOM.CSSSupportsRule
};
for (var i=0, rulesLength=rules.length; i < rulesLength; i++) {
@@ -62,6 +64,10 @@ CSSOM.clone = function clone(stylesheet) {
ruleClone.mediaText = rule.mediaText;
}
if (rule.hasOwnProperty('conditionText')) {
ruleClone.conditionText = rule.conditionText;
}
if (rule.hasOwnProperty('cssRules')) {
ruleClone.cssRules = clone(rule).cssRules;
}

31
node_modules/cssom/lib/index.js generated vendored
View File

@@ -1,10 +1,21 @@
exports.CSSStyleDeclaration = require("./CSSStyleDeclaration").CSSStyleDeclaration;
exports.CSSRule = require("./CSSRule").CSSRule;
exports.CSSStyleRule = require("./CSSStyleRule").CSSStyleRule;
exports.CSSImportRule = require("./CSSImportRule").CSSImportRule;
exports.MediaList = require("./MediaList").MediaList;
exports.CSSMediaRule = require("./CSSMediaRule").CSSMediaRule;
exports.StyleSheet = require("./StyleSheet").StyleSheet;
exports.CSSStyleSheet = require("./CSSStyleSheet").CSSStyleSheet;
exports.parse = require("./parse").parse;
exports.clone = require("./clone").clone;
'use strict';
exports.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration;
exports.CSSRule = require('./CSSRule').CSSRule;
exports.CSSStyleRule = require('./CSSStyleRule').CSSStyleRule;
exports.MediaList = require('./MediaList').MediaList;
exports.CSSMediaRule = require('./CSSMediaRule').CSSMediaRule;
exports.CSSSupportsRule = require('./CSSSupportsRule').CSSSupportsRule;
exports.CSSImportRule = require('./CSSImportRule').CSSImportRule;
exports.CSSFontFaceRule = require('./CSSFontFaceRule').CSSFontFaceRule;
exports.CSSHostRule = require('./CSSHostRule').CSSHostRule;
exports.StyleSheet = require('./StyleSheet').StyleSheet;
exports.CSSStyleSheet = require('./CSSStyleSheet').CSSStyleSheet;
exports.CSSKeyframesRule = require('./CSSKeyframesRule').CSSKeyframesRule;
exports.CSSKeyframeRule = require('./CSSKeyframeRule').CSSKeyframeRule;
exports.MatcherList = require('./MatcherList').MatcherList;
exports.CSSDocumentRule = require('./CSSDocumentRule').CSSDocumentRule;
exports.CSSValue = require('./CSSValue').CSSValue;
exports.CSSValueExpression = require('./CSSValueExpression').CSSValueExpression;
exports.parse = require('./parse').parse;
exports.clone = require('./clone').clone;

79
node_modules/cssom/lib/parse.js generated vendored
View File

@@ -15,6 +15,7 @@ CSSOM.parse = function parse(token) {
"selector" or
"atRule" or
"atBlock" or
"conditionBlock" or
"before-name" or
"name" or
"before-value" or
@@ -34,18 +35,23 @@ CSSOM.parse = function parse(token) {
"importRule-begin": true,
"importRule": true,
"atBlock": true,
"conditionBlock": true,
'documentRule-begin': true
};
var styleSheet = new CSSOM.CSSStyleSheet();
// @type CSSStyleSheet|CSSMediaRule|CSSFontFaceRule|CSSKeyframesRule|CSSDocumentRule
// @type CSSStyleSheet|CSSMediaRule|CSSSupportsRule|CSSFontFaceRule|CSSKeyframesRule|CSSDocumentRule
var currentScope = styleSheet;
// @type CSSMediaRule|CSSKeyframesRule|CSSDocumentRule
// @type CSSMediaRule|CSSSupportsRule|CSSKeyframesRule|CSSDocumentRule
var parentRule;
var name, priority="", styleRule, mediaRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule;
var ancestorRules = [];
var hasAncestors = false;
var prevScope;
var name, priority="", styleRule, mediaRule, supportsRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule;
var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g;
@@ -151,6 +157,13 @@ CSSOM.parse = function parse(token) {
i += "media".length;
buffer = "";
break;
} else if (token.indexOf("@supports", i) === i) {
state = "conditionBlock";
supportsRule = new CSSOM.CSSSupportsRule();
supportsRule.__starts = i;
i += "supports".length;
buffer = "";
break;
} else if (token.indexOf("@host", i) === i) {
state = "hostRule-begin";
i += "host".length;
@@ -196,17 +209,38 @@ CSSOM.parse = function parse(token) {
state = "before-name";
} else if (state === "atBlock") {
mediaRule.media.mediaText = buffer.trim();
if (parentRule) {
ancestorRules.push(parentRule);
}
currentScope = parentRule = mediaRule;
mediaRule.parentStyleSheet = styleSheet;
buffer = "";
state = "before-selector";
} else if (state === "conditionBlock") {
supportsRule.conditionText = buffer.trim();
if (parentRule) {
ancestorRules.push(parentRule);
}
currentScope = parentRule = supportsRule;
supportsRule.parentStyleSheet = styleSheet;
buffer = "";
state = "before-selector";
} else if (state === "hostRule-begin") {
if (parentRule) {
ancestorRules.push(parentRule);
}
currentScope = parentRule = hostRule;
hostRule.parentStyleSheet = styleSheet;
buffer = "";
state = "before-selector";
} else if (state === "fontFaceRule-begin") {
if (parentRule) {
ancestorRules.push(parentRule);
fontFaceRule.parentRule = parentRule;
}
fontFaceRule.parentStyleSheet = styleSheet;
@@ -216,6 +250,7 @@ CSSOM.parse = function parse(token) {
} else if (state === "keyframesRule-begin") {
keyframesRule.name = buffer.trim();
if (parentRule) {
ancestorRules.push(parentRule);
keyframesRule.parentRule = parentRule;
}
keyframesRule.parentStyleSheet = styleSheet;
@@ -232,6 +267,7 @@ CSSOM.parse = function parse(token) {
// FIXME: what if this '{' is in the url text of the match function?
documentRule.matcher.matcherText = buffer.trim();
if (parentRule) {
ancestorRules.push(parentRule);
documentRule.parentRule = parentRule;
}
currentScope = parentRule = documentRule;
@@ -345,15 +381,39 @@ CSSOM.parse = function parse(token) {
case "keyframeRule-begin":
case "before-selector":
case "selector":
// End of media/document rule.
// End of media/supports/document rule.
if (!parentRule) {
parseError("Unexpected }");
}
currentScope.__ends = i + 1;
// Nesting rules aren't supported yet
styleSheet.cssRules.push(currentScope);
currentScope = styleSheet;
parentRule = null;
// Handle rules nested in @media or @supports
hasAncestors = ancestorRules.length > 0;
while (ancestorRules.length > 0) {
parentRule = ancestorRules.pop();
if (
parentRule.constructor.name === "CSSMediaRule"
|| parentRule.constructor.name === "CSSSupportsRule"
) {
prevScope = currentScope;
currentScope = parentRule;
currentScope.cssRules.push(prevScope);
break;
}
if (ancestorRules.length === 0) {
hasAncestors = false;
}
}
if (!hasAncestors) {
currentScope.__ends = i + 1;
styleSheet.cssRules.push(currentScope);
currentScope = styleSheet;
parentRule = null;
}
buffer = "";
state = "before-selector";
break;
@@ -393,6 +453,7 @@ CSSOM.CSSStyleSheet = require("./CSSStyleSheet").CSSStyleSheet;
CSSOM.CSSStyleRule = require("./CSSStyleRule").CSSStyleRule;
CSSOM.CSSImportRule = require("./CSSImportRule").CSSImportRule;
CSSOM.CSSMediaRule = require("./CSSMediaRule").CSSMediaRule;
CSSOM.CSSSupportsRule = require("./CSSSupportsRule").CSSSupportsRule;
CSSOM.CSSFontFaceRule = require("./CSSFontFaceRule").CSSFontFaceRule;
CSSOM.CSSHostRule = require("./CSSHostRule").CSSHostRule;
CSSOM.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration;

22
node_modules/cssom/package.json generated vendored
View File

@@ -1,28 +1,28 @@
{
"_from": "cssom@>= 0.3.2 < 0.4.0",
"_id": "cssom@0.3.2",
"_from": "cssom@^0.3.4",
"_id": "cssom@0.3.6",
"_inBundle": false,
"_integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=",
"_integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==",
"_location": "/cssom",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "cssom@>= 0.3.2 < 0.4.0",
"raw": "cssom@^0.3.4",
"name": "cssom",
"escapedName": "cssom",
"rawSpec": ">= 0.3.2 < 0.4.0",
"rawSpec": "^0.3.4",
"saveSpec": null,
"fetchSpec": ">= 0.3.2 < 0.4.0"
"fetchSpec": "^0.3.4"
},
"_requiredBy": [
"/cssstyle",
"/jsdom"
],
"_resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz",
"_shasum": "b8036170c79f07a90ff2f16e22284027a243848b",
"_spec": "cssom@>= 0.3.2 < 0.4.0",
"_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom",
"_resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz",
"_shasum": "f85206cee04efa841f3c5982a74ba96ab20d65ad",
"_spec": "cssom@^0.3.4",
"_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom",
"author": {
"name": "Nikita Vasilyev",
"email": "me@elv1s.ru"
@@ -56,5 +56,5 @@
"scripts": {
"prepublish": "jake lib/index.js"
},
"version": "0.3.2"
"version": "0.3.6"
}