[Pkg-javascript-commits] [uglifyjs] 01/06: Document passing source maps directly to minify() using inSourceMap

Jonas Smedegaard dr at jones.dk
Tue May 19 00:02:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v2.4.20
in repository uglifyjs.

commit 2850dc69fd7826817e05b524e3a6f147de537d81
Author: David Caldwell <david at porkrind.org>
Date:   Fri Apr 3 17:27:28 2015 -0700

    Document passing source maps directly to minify() using inSourceMap
---
 README.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/README.md b/README.md
index 7116e45..f3eb5f7 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).
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list