aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2015-04-04 15:29:03 +0300
committerMihai Bazon <mihai.bazon@gmail.com>2015-04-04 15:29:03 +0300
commit3c846e6f7bdc1e0de536ada9b4f221a6223775e4 (patch)
treefac5ee447effc053913c629408610ea8ca8e35b7
parent94205c3a370d63a30fe2bd1ec844c86af042c51c (diff)
parent2850dc69fd7826817e05b524e3a6f147de537d81 (diff)
downloadtracifyjs-3c846e6f7bdc1e0de536ada9b4f221a6223775e4.tar.gz
tracifyjs-3c846e6f7bdc1e0de536ada9b4f221a6223775e4.zip
Merge pull request #669 from galvanix/documentation-inSourceMap
Document passing source maps directly to minify() using inSourceMap
-rw-r--r--README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7116e45b..f3eb5f71 100644
--- 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).