mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
update packages to latest version
This commit is contained in:
4
node_modules/cssom/README.mdown
generated
vendored
4
node_modules/cssom/README.mdown
generated
vendored
@@ -46,9 +46,9 @@ div {
|
||||
|
||||
This pattern is often used to give browsers that don’t understand linear gradients a fallback solution (e.g. gray color in the example).
|
||||
In CSSOM, `background: gray` [gets overwritten](http://nv.github.io/CSSOM/docs/parse.html#css=div%20%7B%0A%20%20%20%20%20%20background%3A%20gray%3B%0A%20%20%20%20background%3A%20linear-gradient(to%20bottom%2C%20white%200%25%2C%20black%20100%25)%3B%0A%7D).
|
||||
It doesn't get preserved.
|
||||
It does **NOT** get preserved.
|
||||
|
||||
If you do CSS mungling, minification, image inlining, and such, CSSOM.js is no good for you, considere using one of the following:
|
||||
If you do CSS mungling, minification, or image inlining, considere using one of the following:
|
||||
|
||||
* [postcss](https://github.com/postcss/postcss)
|
||||
* [reworkcss/css](https://github.com/reworkcss/css)
|
||||
|
25
node_modules/cssom/lib/CSSConditionRule.js
generated
vendored
Normal file
25
node_modules/cssom/lib/CSSConditionRule.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
//.CommonJS
|
||||
var CSSOM = {
|
||||
CSSRule: require("./CSSRule").CSSRule,
|
||||
CSSGroupingRule: require("./CSSGroupingRule").CSSGroupingRule
|
||||
};
|
||||
///CommonJS
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see https://www.w3.org/TR/css-conditional-3/#the-cssconditionrule-interface
|
||||
*/
|
||||
CSSOM.CSSConditionRule = function CSSConditionRule() {
|
||||
CSSOM.CSSGroupingRule.call(this);
|
||||
this.cssRules = [];
|
||||
};
|
||||
|
||||
CSSOM.CSSConditionRule.prototype = new CSSOM.CSSGroupingRule();
|
||||
CSSOM.CSSConditionRule.prototype.constructor = CSSOM.CSSConditionRule;
|
||||
CSSOM.CSSConditionRule.prototype.conditionText = ''
|
||||
CSSOM.CSSConditionRule.prototype.cssText = ''
|
||||
|
||||
//.CommonJS
|
||||
exports.CSSConditionRule = CSSOM.CSSConditionRule;
|
||||
///CommonJS
|
68
node_modules/cssom/lib/CSSGroupingRule.js
generated
vendored
Normal file
68
node_modules/cssom/lib/CSSGroupingRule.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
//.CommonJS
|
||||
var CSSOM = {
|
||||
CSSRule: require("./CSSRule").CSSRule
|
||||
};
|
||||
///CommonJS
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @see https://drafts.csswg.org/cssom/#the-cssgroupingrule-interface
|
||||
*/
|
||||
CSSOM.CSSGroupingRule = function CSSGroupingRule() {
|
||||
CSSOM.CSSRule.call(this);
|
||||
this.cssRules = [];
|
||||
};
|
||||
|
||||
CSSOM.CSSGroupingRule.prototype = new CSSOM.CSSRule();
|
||||
CSSOM.CSSGroupingRule.prototype.constructor = CSSOM.CSSGroupingRule;
|
||||
|
||||
|
||||
/**
|
||||
* Used to insert a new CSS rule to a list of CSS rules.
|
||||
*
|
||||
* @example
|
||||
* cssGroupingRule.cssText
|
||||
* -> "body{margin:0;}"
|
||||
* cssGroupingRule.insertRule("img{border:none;}", 1)
|
||||
* -> 1
|
||||
* cssGroupingRule.cssText
|
||||
* -> "body{margin:0;}img{border:none;}"
|
||||
*
|
||||
* @param {string} rule
|
||||
* @param {number} [index]
|
||||
* @see https://www.w3.org/TR/cssom-1/#dom-cssgroupingrule-insertrule
|
||||
* @return {number} The index within the grouping rule's collection of the newly inserted rule.
|
||||
*/
|
||||
CSSOM.CSSGroupingRule.prototype.insertRule = function insertRule(rule, index) {
|
||||
if (index < 0 || index > this.cssRules.length) {
|
||||
throw new RangeError("INDEX_SIZE_ERR");
|
||||
}
|
||||
var cssRule = CSSOM.parse(rule).cssRules[0];
|
||||
cssRule.parentRule = this;
|
||||
this.cssRules.splice(index, 0, cssRule);
|
||||
return index;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to delete a rule from the grouping rule.
|
||||
*
|
||||
* cssGroupingRule.cssText
|
||||
* -> "img{border:none;}body{margin:0;}"
|
||||
* cssGroupingRule.deleteRule(0)
|
||||
* cssGroupingRule.cssText
|
||||
* -> "body{margin:0;}"
|
||||
*
|
||||
* @param {number} index within the grouping rule's rule list of the rule to remove.
|
||||
* @see https://www.w3.org/TR/cssom-1/#dom-cssgroupingrule-deleterule
|
||||
*/
|
||||
CSSOM.CSSGroupingRule.prototype.deleteRule = function deleteRule(index) {
|
||||
if (index < 0 || index >= this.cssRules.length) {
|
||||
throw new RangeError("INDEX_SIZE_ERR");
|
||||
}
|
||||
this.cssRules.splice(index, 1)[0].parentRule = null;
|
||||
};
|
||||
|
||||
//.CommonJS
|
||||
exports.CSSGroupingRule = CSSOM.CSSGroupingRule;
|
||||
///CommonJS
|
40
node_modules/cssom/lib/CSSMediaRule.js
generated
vendored
40
node_modules/cssom/lib/CSSMediaRule.js
generated
vendored
@@ -1,6 +1,8 @@
|
||||
//.CommonJS
|
||||
var CSSOM = {
|
||||
CSSRule: require("./CSSRule").CSSRule,
|
||||
CSSGroupingRule: require("./CSSGroupingRule").CSSGroupingRule,
|
||||
CSSConditionRule: require("./CSSConditionRule").CSSConditionRule,
|
||||
MediaList: require("./MediaList").MediaList
|
||||
};
|
||||
///CommonJS
|
||||
@@ -12,26 +14,36 @@ var CSSOM = {
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule
|
||||
*/
|
||||
CSSOM.CSSMediaRule = function CSSMediaRule() {
|
||||
CSSOM.CSSRule.call(this);
|
||||
CSSOM.CSSConditionRule.call(this);
|
||||
this.media = new CSSOM.MediaList();
|
||||
this.cssRules = [];
|
||||
};
|
||||
|
||||
CSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule();
|
||||
CSSOM.CSSMediaRule.prototype = new CSSOM.CSSConditionRule();
|
||||
CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;
|
||||
CSSOM.CSSMediaRule.prototype.type = 4;
|
||||
//FIXME
|
||||
//CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;
|
||||
//CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;
|
||||
|
||||
// http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp
|
||||
Object.defineProperty(CSSOM.CSSMediaRule.prototype, "cssText", {
|
||||
get: function() {
|
||||
var cssTexts = [];
|
||||
for (var i=0, length=this.cssRules.length; i < length; i++) {
|
||||
cssTexts.push(this.cssRules[i].cssText);
|
||||
}
|
||||
return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}";
|
||||
// https://opensource.apple.com/source/WebCore/WebCore-7611.1.21.161.3/css/CSSMediaRule.cpp
|
||||
Object.defineProperties(CSSOM.CSSMediaRule.prototype, {
|
||||
"conditionText": {
|
||||
get: function() {
|
||||
return this.media.mediaText;
|
||||
},
|
||||
set: function(value) {
|
||||
this.media.mediaText = value;
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
},
|
||||
"cssText": {
|
||||
get: function() {
|
||||
var cssTexts = [];
|
||||
for (var i=0, length=this.cssRules.length; i < length; i++) {
|
||||
cssTexts.push(this.cssRules[i].cssText);
|
||||
}
|
||||
return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}";
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
8
node_modules/cssom/lib/CSSSupportsRule.js
generated
vendored
8
node_modules/cssom/lib/CSSSupportsRule.js
generated
vendored
@@ -1,6 +1,8 @@
|
||||
//.CommonJS
|
||||
var CSSOM = {
|
||||
CSSRule: require("./CSSRule").CSSRule,
|
||||
CSSGroupingRule: require("./CSSGroupingRule").CSSGroupingRule,
|
||||
CSSConditionRule: require("./CSSConditionRule").CSSConditionRule
|
||||
};
|
||||
///CommonJS
|
||||
|
||||
@@ -10,12 +12,10 @@ var CSSOM = {
|
||||
* @see https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface
|
||||
*/
|
||||
CSSOM.CSSSupportsRule = function CSSSupportsRule() {
|
||||
CSSOM.CSSRule.call(this);
|
||||
this.conditionText = '';
|
||||
this.cssRules = [];
|
||||
CSSOM.CSSConditionRule.call(this);
|
||||
};
|
||||
|
||||
CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSRule();
|
||||
CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSConditionRule();
|
||||
CSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule;
|
||||
CSSOM.CSSSupportsRule.prototype.type = 12;
|
||||
|
||||
|
3
node_modules/cssom/lib/clone.js
generated
vendored
3
node_modules/cssom/lib/clone.js
generated
vendored
@@ -1,7 +1,10 @@
|
||||
//.CommonJS
|
||||
var CSSOM = {
|
||||
CSSStyleSheet: require("./CSSStyleSheet").CSSStyleSheet,
|
||||
CSSRule: require("./CSSRule").CSSRule,
|
||||
CSSStyleRule: require("./CSSStyleRule").CSSStyleRule,
|
||||
CSSGroupingRule: require("./CSSGroupingRule").CSSGroupingRule,
|
||||
CSSConditionRule: require("./CSSConditionRule").CSSConditionRule,
|
||||
CSSMediaRule: require("./CSSMediaRule").CSSMediaRule,
|
||||
CSSSupportsRule: require("./CSSSupportsRule").CSSSupportsRule,
|
||||
CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration,
|
||||
|
2
node_modules/cssom/lib/index.js
generated
vendored
2
node_modules/cssom/lib/index.js
generated
vendored
@@ -2,6 +2,8 @@
|
||||
|
||||
exports.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration;
|
||||
exports.CSSRule = require('./CSSRule').CSSRule;
|
||||
exports.CSSGroupingRule = require('./CSSGroupingRule').CSSGroupingRule;
|
||||
exports.CSSConditionRule = require('./CSSConditionRule').CSSConditionRule;
|
||||
exports.CSSStyleRule = require('./CSSStyleRule').CSSStyleRule;
|
||||
exports.MediaList = require('./MediaList').MediaList;
|
||||
exports.CSSMediaRule = require('./CSSMediaRule').CSSMediaRule;
|
||||
|
2
node_modules/cssom/lib/parse.js
generated
vendored
2
node_modules/cssom/lib/parse.js
generated
vendored
@@ -451,7 +451,9 @@ exports.parse = CSSOM.parse;
|
||||
CSSOM.CSSStyleSheet = require("./CSSStyleSheet").CSSStyleSheet;
|
||||
CSSOM.CSSStyleRule = require("./CSSStyleRule").CSSStyleRule;
|
||||
CSSOM.CSSImportRule = require("./CSSImportRule").CSSImportRule;
|
||||
CSSOM.CSSGroupingRule = require("./CSSGroupingRule").CSSGroupingRule;
|
||||
CSSOM.CSSMediaRule = require("./CSSMediaRule").CSSMediaRule;
|
||||
CSSOM.CSSConditionRule = require("./CSSConditionRule").CSSConditionRule;
|
||||
CSSOM.CSSSupportsRule = require("./CSSSupportsRule").CSSSupportsRule;
|
||||
CSSOM.CSSFontFaceRule = require("./CSSFontFaceRule").CSSFontFaceRule;
|
||||
CSSOM.CSSHostRule = require("./CSSHostRule").CSSHostRule;
|
||||
|
20
node_modules/cssom/package.json
generated
vendored
20
node_modules/cssom/package.json
generated
vendored
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"_from": "cssom@^0.4.4",
|
||||
"_id": "cssom@0.4.4",
|
||||
"_from": "cssom@^0.5.0",
|
||||
"_id": "cssom@0.5.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==",
|
||||
"_integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==",
|
||||
"_location": "/cssom",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "cssom@^0.4.4",
|
||||
"raw": "cssom@^0.5.0",
|
||||
"name": "cssom",
|
||||
"escapedName": "cssom",
|
||||
"rawSpec": "^0.4.4",
|
||||
"rawSpec": "^0.5.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.4.4"
|
||||
"fetchSpec": "^0.5.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/jsdom"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz",
|
||||
"_shasum": "5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10",
|
||||
"_spec": "cssom@^0.4.4",
|
||||
"_resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz",
|
||||
"_shasum": "d254fa92cd8b6fbd83811b9fbaed34663cc17c36",
|
||||
"_spec": "cssom@^0.5.0",
|
||||
"_where": "D:\\Projects\\minifyfromhtml\\node_modules\\jsdom",
|
||||
"author": {
|
||||
"name": "Nikita Vasilyev",
|
||||
@@ -49,5 +49,5 @@
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/NV/CSSOM.git"
|
||||
},
|
||||
"version": "0.4.4"
|
||||
"version": "0.5.0"
|
||||
}
|
||||
|
Reference in New Issue
Block a user