Merge branch 'master' of github.com:mishoo/UglifyJS2

This commit is contained in:
Mihai Bazon
2012-10-20 11:14:25 +03:00
2 changed files with 11 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ for (var i in UglifyJS) {
exports.minify = function(files, options) {
options = UglifyJS.defaults(options, {
outSourceMap : null,
sourceRoot : null,
inSourceMap : null,
fromString : false,
warnings : false,
@@ -102,7 +103,8 @@ exports.minify = function(files, options) {
}
if (options.outSourceMap) map = UglifyJS.SourceMap({
file: options.outSourceMap,
orig: inMap
orig: inMap,
root: options.sourceRoot
});
var stream = UglifyJS.OutputStream({ source_map: map });
toplevel.print(stream);