implement mangle.properties.domprops (#5686)

- support destructuring syntax
- fix corner case with comma operator
This commit is contained in:
Alex Lam S.L
2022-09-29 05:18:04 +01:00
committed by GitHub
parent a570c00251
commit bd5fc4cb1b
15 changed files with 94 additions and 38 deletions

View File

@@ -15,13 +15,13 @@ exports.FILES = [
require.resolve("./exports.js"),
];
new Function("exports", function() {
new Function("domprops", "exports", function() {
var code = exports.FILES.map(function(file) {
return fs.readFileSync(file, "utf8");
});
code.push("exports.describe_ast = " + describe_ast.toString());
return code.join("\n\n");
}())(exports);
}())(require("./domprops.json"), exports);
function to_comment(value) {
if (typeof value != "string") value = JSON.stringify(value, function(key, value) {