diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/uglify-js/tools/node.js | |
parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) |
remove node_modules
Diffstat (limited to 'node_modules/uglify-js/tools/node.js')
-rw-r--r-- | node_modules/uglify-js/tools/node.js | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/node_modules/uglify-js/tools/node.js b/node_modules/uglify-js/tools/node.js deleted file mode 100644 index 3e37092cb..000000000 --- a/node_modules/uglify-js/tools/node.js +++ /dev/null @@ -1,78 +0,0 @@ -var fs = require("fs"); - -exports.FILES = [ - "../lib/utils.js", - "../lib/ast.js", - "../lib/parse.js", - "../lib/transform.js", - "../lib/scope.js", - "../lib/output.js", - "../lib/compress.js", - "../lib/sourcemap.js", - "../lib/mozilla-ast.js", - "../lib/propmangle.js", - "../lib/minify.js", - "./exports.js", -].map(function(file) { - return require.resolve(file); -}); - -new Function("MOZ_SourceMap", "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); - -function describe_ast() { - var out = OutputStream({ beautify: true }); - function doitem(ctor) { - out.print("AST_" + ctor.TYPE); - var props = ctor.SELF_PROPS.filter(function(prop) { - return !/^\$/.test(prop); - }); - if (props.length > 0) { - out.space(); - out.with_parens(function() { - props.forEach(function(prop, i) { - if (i) out.space(); - out.print(prop); - }); - }); - } - if (ctor.documentation) { - out.space(); - out.print_string(ctor.documentation); - } - if (ctor.SUBCLASSES.length > 0) { - out.space(); - out.with_block(function() { - ctor.SUBCLASSES.forEach(function(ctor, i) { - out.indent(); - doitem(ctor); - out.newline(); - }); - }); - } - }; - doitem(AST_Node); - return out + "\n"; -} - -function infer_options(options) { - var result = exports.minify("", options); - return result.error && result.error.defs; -} - -exports.default_options = function() { - var defs = {}; - Object.keys(infer_options({ 0: 0 })).forEach(function(component) { - var options = {}; - options[component] = { 0: 0 }; - if (options = infer_options(options)) { - defs[component] = options; - } - }); - return defs; -}; |