public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94205c3
)
Document passing source maps directly to minify() using inSourceMap
author
David Caldwell
<david@porkrind.org>
Sat, 4 Apr 2015 00:27:28 +0000
(17:27 -0700)
committer
David Caldwell
<david@porkrind.org>
Sat, 4 Apr 2015 00:27:28 +0000
(17:27 -0700)
README.md
patch
|
blob
|
history
diff --git
a/README.md
b/README.md
index
7116e45
..
f3eb5f7
100644
(file)
--- a/
README.md
+++ b/
README.md
@@
-591,6
+591,16
@@
var result = UglifyJS.minify("compiled.js", {
// same as before, it returns `code` and `map`
```
+If your input source map is not in a file, you can pass it in as an object
+using the `inSourceMap` argument:
+
+```javascript
+var result = UglifyJS.minify("compiled.js", {
+ inSourceMap: JSON.parse(my_source_map_string),
+ outSourceMap: "minified.js.map"
+});
+```
+
The `inSourceMap` is only used if you also request `outSourceMap` (it makes
no sense otherwise).