allow fileName option with fromString

This commit is contained in:
Guy Bedford 2013-09-17 08:58:05 +02:00
parent 83ba338bd0
commit 7378ef6fb7

View File

@ -72,7 +72,7 @@ exports.minify = function(files, options) {
? file
: fs.readFileSync(file, "utf8");
toplevel = UglifyJS.parse(code, {
filename: options.fromString ? "?" : file,
filename: options.fromString ? options.fileName : file,
toplevel: toplevel
});
});