bug
This commit is contained in:
parent
da1caf6bb7
commit
fa82161a4c
|
|
@ -63,10 +63,7 @@ exports.minify = function(files, options) {
|
||||||
});
|
});
|
||||||
if (typeof files == "string") {
|
if (typeof files == "string") {
|
||||||
files = [ files ];
|
files = [ files ];
|
||||||
|
options.fromFile = options.fromFile ? [options.fromFile] : ["?"]
|
||||||
if (options.fromFile !== null) {
|
|
||||||
option.fromFile = [options.fromFile];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UglifyJS.base54.reset();
|
UglifyJS.base54.reset();
|
||||||
|
|
@ -78,7 +75,7 @@ exports.minify = function(files, options) {
|
||||||
? file
|
? file
|
||||||
: fs.readFileSync(file, "utf8");
|
: fs.readFileSync(file, "utf8");
|
||||||
toplevel = UglifyJS.parse(code, {
|
toplevel = UglifyJS.parse(code, {
|
||||||
filename: options.fromString ? options.fromFile[index] || "?" : file,
|
filename: options.fromString ? options.fromFile[index] : file,
|
||||||
toplevel: toplevel
|
toplevel: toplevel
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user