Merge 938df1b024 into b5a7197ae5
This commit is contained in:
commit
1f88ea0cc8
|
|
@ -54,12 +54,15 @@ exports.minify = function(files, options) {
|
|||
if (typeof files == "string")
|
||||
files = [ files ];
|
||||
files.forEach(function(file, i){
|
||||
var filename = options.fromString
|
||||
? (typeof file === 'object' ? file.filename : i)
|
||||
: file;
|
||||
var code = options.fromString
|
||||
? file
|
||||
: fs.readFileSync(file, "utf8");
|
||||
sourcesContent[file] = code;
|
||||
? (typeof file === 'object' ? file.content : file)
|
||||
: fs.readFileSync(filename, "utf8");
|
||||
sourcesContent[filename] = code;
|
||||
toplevel = UglifyJS.parse(code, {
|
||||
filename: options.fromString ? i : file,
|
||||
filename: filename,
|
||||
toplevel: toplevel
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user