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

24
node_modules/terser/lib/cli.js generated vendored
View File

@@ -224,7 +224,7 @@ export async function run_cli({ program, packageJson, fs, path }) {
let result;
try {
result = await minify(files, options);
result = await minify(files, options, fs);
} catch (ex) {
if (ex.name == "SyntaxError") {
print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
@@ -264,7 +264,6 @@ export async function run_cli({ program, packageJson, fs, path }) {
case "enclosed":
return value.length ? value.map(symdef) : undefined;
case "variables":
case "functions":
case "globals":
return value.size ? collect_from_map(value, symdef) : undefined;
}
@@ -277,7 +276,6 @@ export async function run_cli({ program, packageJson, fs, path }) {
};
if (value.block_scope) {
result.variables = value.block_scope.variables;
result.functions = value.block_scope.functions;
result.enclosed = value.block_scope.enclosed;
}
value.CTOR.PROPS.forEach(function(prop) {
@@ -289,14 +287,18 @@ export async function run_cli({ program, packageJson, fs, path }) {
}, 2));
} else if (program.output == "spidermonkey") {
try {
const minified = await minify(result.code, {
compress: false,
mangle: false,
format: {
ast: true,
code: false
}
});
const minified = await minify(
result.code,
{
compress: false,
mangle: false,
format: {
ast: true,
code: false
}
},
fs
);
console.log(JSON.stringify(minified.ast.to_mozilla_ast(), null, 2));
} catch (ex) {
fatal(ex);