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

12
node_modules/acorn-globals/index.js generated vendored
View File

@@ -1,7 +1,7 @@
'use strict';
var acorn = require('acorn');
var walk = require('acorn/dist/walk');
var walk = require('acorn-walk');
function isScope(node) {
return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program';
@@ -53,7 +53,7 @@ function findGlobals(source, options) {
if (node.id) {
fn.locals[node.id.name] = true;
}
}
};
var declarePattern = function (node, parent) {
switch (node.type) {
case 'Identifier':
@@ -79,11 +79,11 @@ function findGlobals(source, options) {
default:
throw new Error('Unrecognized pattern type: ' + node.type);
}
}
};
var declareModuleSpecifier = function (node, parents) {
ast.locals = ast.locals || {};
ast.locals[node.local.name] = true;
}
};
walk.ancestor(ast, {
'VariableDeclaration': function (node, parents) {
var parent = null;
@@ -139,7 +139,7 @@ function findGlobals(source, options) {
return;
}
}
node.parents = parents;
node.parents = parents.slice();
globals.push(node);
}
walk.ancestor(ast, {
@@ -151,7 +151,7 @@ function findGlobals(source, options) {
return;
}
}
node.parents = parents;
node.parents = parents.slice();
globals.push(node);
}
});