diff options
author | David Caldwell <david@porkrind.org> | 2015-04-03 17:27:28 -0700 |
---|---|---|
committer | David Caldwell <david@porkrind.org> | 2015-04-03 17:27:28 -0700 |
commit | 2850dc69fd7826817e05b524e3a6f147de537d81 (patch) | |
tree | fac5ee447effc053913c629408610ea8ca8e35b7 | |
parent | 94205c3a370d63a30fe2bd1ec844c86af042c51c (diff) | |
download | tracifyjs-2850dc69fd7826817e05b524e3a6f147de537d81.tar.gz tracifyjs-2850dc69fd7826817e05b524e3a6f147de537d81.zip |
Document passing source maps directly to minify() using inSourceMap
-rw-r--r-- | README.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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). |