removed extra white space and commented function
This commit is contained in:
parent
c85da9ab79
commit
de56a19f5d
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user