From de56a19f5dcef064530f14a26805d182be0bc84c Mon Sep 17 00:00:00 2001 From: kounelios13 Date: Mon, 8 Feb 2016 12:31:08 +0200 Subject: [PATCH] removed extra white space and commented function --- tools/node.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/node.js b/tools/node.js index dcbaa7ec..dd02d651 100644 --- a/tools/node.js +++ b/tools/node.js @@ -1,6 +1,5 @@ var path = require("path"); var fs = require("fs"); - var FILES = exports.FILES = [ "../lib/utils.js", "../lib/ast.js", @@ -16,20 +15,16 @@ var FILES = exports.FILES = [ ].map(function(file){ return fs.realpathSync(path.join(path.dirname(__filename), file)); }); - var UglifyJS = exports; - new Function("MOZ_SourceMap", "exports", FILES.map(function(file){ return fs.readFileSync(file, "utf8"); }).join("\n\n"))( require("source-map"), UglifyJS ); - UglifyJS.AST_Node.warn_function = function(txt) { console.error("WARN: %s", txt); }; - exports.minify = function(files, options) { options = UglifyJS.defaults(options, { spidermonkey : false, @@ -71,7 +66,6 @@ exports.minify = function(files, options) { if (options.wrap) { toplevel = toplevel.wrap_commonjs(options.wrap, options.exportAll); } - // 2. compress if (options.compress) { var compress = { warnings: options.warnings }; @@ -87,7 +81,6 @@ exports.minify = function(files, options) { toplevel = UglifyJS.mangle_properties(toplevel, options.mangleProperties); UglifyJS.writeNameCache(options.nameCache, "props", options.mangleProperties.cache); } - // 4. mangle if (options.mangle) { toplevel.figure_out_scope(options.mangle); @@ -136,8 +129,6 @@ exports.minify = function(files, options) { map : source_map }; }; - - exports.describe_ast = function() { var out = UglifyJS.OutputStream({ beautify: true }); function doitem(ctor) { @@ -172,7 +163,6 @@ exports.describe_ast = function() { doitem(UglifyJS.AST_Node); return out + ""; }; - function readReservedFile(filename, reserved) { if (!reserved) { reserved = { vars: [], props: [] }; @@ -215,7 +205,6 @@ exports.readNameCache = function(filename, key) { } return cache; }; - exports.writeNameCache = function(filename, key, cache) { if (filename) { var data;