Add sourceRoot option to minify

This commit is contained in:
Sergej Tatarincev
2012-10-19 12:35:19 +03:00
parent 6f45928a73
commit 11dffe950e
2 changed files with 11 additions and 1 deletions

View File

@@ -343,6 +343,14 @@ Note that the source map is not saved in a file, it's just returned in
`result.map`. The value passed for `outSourceMap` is only used to set the
`file` attribute in the source map (see [the spec][sm-spec]).
You can also specify sourceRoot property to be included in source map:
var result = UglifyJS.minify([ "file1.js", "file2.js", "file3.js" ], {
outSourceMap: "out.js.map",
sourceRoot: "http://example.com/src"
});
If you're compressing compiled JavaScript and have a source map for it, you
can use the `inSourceMap` argument: