remove redundant global variable
This commit is contained in:
parent
9df55f56ad
commit
93a9b4941b
|
|
@ -12,9 +12,6 @@ var program = require("commander");
|
||||||
var UglifyJS = require("../tools/node");
|
var UglifyJS = require("../tools/node");
|
||||||
|
|
||||||
var skip_keys = [ "cname", "inlined", "parent_scope", "scope", "uses_eval", "uses_with" ];
|
var skip_keys = [ "cname", "inlined", "parent_scope", "scope", "uses_eval", "uses_with" ];
|
||||||
var source_map_stub = {
|
|
||||||
path: null,
|
|
||||||
};
|
|
||||||
var files = {};
|
var files = {};
|
||||||
var options = {
|
var options = {
|
||||||
compress: false,
|
compress: false,
|
||||||
|
|
@ -176,8 +173,8 @@ function convert_ast(fn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
if (program.sourceMap && program.sourceMap.content === source_map_stub) {
|
if (program.sourceMap && program.sourceMap.content) {
|
||||||
program.sourceMap.content = read_file(source_map_stub.path, source_map_stub.path);
|
program.sourceMap.content = read_file(program.sourceMap.content, program.sourceMap.content);
|
||||||
}
|
}
|
||||||
|
|
||||||
UglifyJS.AST_Node.warn_function = function(msg) {
|
UglifyJS.AST_Node.warn_function = function(msg) {
|
||||||
|
|
@ -391,8 +388,6 @@ function parse_source_map() {
|
||||||
var settings = parse(value, options);
|
var settings = parse(value, options);
|
||||||
if (!hasContent && settings.content && settings.content != "inline") {
|
if (!hasContent && settings.content && settings.content != "inline") {
|
||||||
print_error("INFO: Using input source map: " + settings.content);
|
print_error("INFO: Using input source map: " + settings.content);
|
||||||
source_map_stub.path = settings.content;
|
|
||||||
settings.content = source_map_stub;
|
|
||||||
}
|
}
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user