mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
update node modules
This commit is contained in:
21
node_modules/estraverse/estraverse.js
generated
vendored
21
node_modules/estraverse/estraverse.js
generated
vendored
@@ -84,6 +84,7 @@
|
||||
BreakStatement: 'BreakStatement',
|
||||
CallExpression: 'CallExpression',
|
||||
CatchClause: 'CatchClause',
|
||||
ChainExpression: 'ChainExpression',
|
||||
ClassBody: 'ClassBody',
|
||||
ClassDeclaration: 'ClassDeclaration',
|
||||
ClassExpression: 'ClassExpression',
|
||||
@@ -159,6 +160,7 @@
|
||||
BreakStatement: ['label'],
|
||||
CallExpression: ['callee', 'arguments'],
|
||||
CatchClause: ['param', 'body'],
|
||||
ChainExpression: ['expression'],
|
||||
ClassBody: ['body'],
|
||||
ClassDeclaration: ['id', 'superClass', 'body'],
|
||||
ClassExpression: ['id', 'superClass', 'body'],
|
||||
@@ -388,6 +390,15 @@
|
||||
function isProperty(nodeType, key) {
|
||||
return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
|
||||
}
|
||||
|
||||
function candidateExistsInLeaveList(leavelist, candidate) {
|
||||
for (var i = leavelist.length - 1; i >= 0; --i) {
|
||||
if (leavelist[i].node === candidate) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Controller.prototype.traverse = function traverse(root, visitor) {
|
||||
var worklist,
|
||||
@@ -469,6 +480,11 @@
|
||||
if (!candidate[current2]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (candidateExistsInLeaveList(leavelist, candidate[current2])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isProperty(nodeType, candidates[current])) {
|
||||
element = new Element(candidate[current2], [key, current2], 'Property', null);
|
||||
} else if (isNode(candidate[current2])) {
|
||||
@@ -479,6 +495,10 @@
|
||||
worklist.push(element);
|
||||
}
|
||||
} else if (isNode(candidate)) {
|
||||
if (candidateExistsInLeaveList(leavelist, candidate)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
worklist.push(new Element(candidate, key, null, null));
|
||||
}
|
||||
}
|
||||
@@ -767,7 +787,6 @@
|
||||
return tree;
|
||||
}
|
||||
|
||||
exports.version = require('./package.json').version;
|
||||
exports.Syntax = Syntax;
|
||||
exports.traverse = traverse;
|
||||
exports.replace = replace;
|
||||
|
20
node_modules/estraverse/package.json
generated
vendored
20
node_modules/estraverse/package.json
generated
vendored
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"_from": "estraverse@^4.2.0",
|
||||
"_id": "estraverse@4.3.0",
|
||||
"_from": "estraverse@^5.2.0",
|
||||
"_id": "estraverse@5.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
|
||||
"_integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
|
||||
"_location": "/estraverse",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "estraverse@^4.2.0",
|
||||
"raw": "estraverse@^5.2.0",
|
||||
"name": "estraverse",
|
||||
"escapedName": "estraverse",
|
||||
"rawSpec": "^4.2.0",
|
||||
"rawSpec": "^5.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.2.0"
|
||||
"fetchSpec": "^5.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/escodegen"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
|
||||
"_shasum": "398ad3f3c5a24948be7725e83d11a7de28cdbd1d",
|
||||
"_spec": "estraverse@^4.2.0",
|
||||
"_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
|
||||
"_shasum": "307df42547e6cc7324d3cf03c155d5cdb8c53880",
|
||||
"_spec": "estraverse@^5.2.0",
|
||||
"_where": "D:\\Projects\\minifyfromhtml\\node_modules\\escodegen",
|
||||
"bugs": {
|
||||
"url": "https://github.com/estools/estraverse/issues"
|
||||
@@ -64,5 +64,5 @@
|
||||
"test": "npm run-script lint && npm run-script unit-test",
|
||||
"unit-test": "mocha --compilers js:babel-register"
|
||||
},
|
||||
"version": "4.3.0"
|
||||
"version": "5.2.0"
|
||||
}
|
||||
|
Reference in New Issue
Block a user