handle source-map operations internally (#3754)

This commit is contained in:
Alex Lam S.L
2020-03-28 14:18:56 +00:00
committed by GitHub
parent d105ab9722
commit 827bcec186
11 changed files with 173 additions and 89 deletions

View File

@@ -15,13 +15,13 @@ exports.FILES = [
require.resolve("./exports.js"),
];
new Function("MOZ_SourceMap", "exports", function() {
new Function("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");
}())(require("source-map"), exports);
}())(exports);
function describe_ast() {
var out = OutputStream({ beautify: true });