aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2013-01-31 23:50:59 -0800
committerMihai Bazon <mihai.bazon@gmail.com>2013-01-31 23:50:59 -0800
commite9a571b2a1a93e1c5e299ca4c8f846e2e1117994 (patch)
tree47a1b5c7e98fa7b4a9309d66867ad872e2b1f34b
parent8bf83f42eae5855b331932748d5cad60ee373e3a (diff)
parentad071f8017f36c47809cb53c411f8fee14874677 (diff)
downloadtracifyjs-e9a571b2a1a93e1c5e299ca4c8f846e2e1117994.tar.gz
tracifyjs-e9a571b2a1a93e1c5e299ca4c8f846e2e1117994.zip
Merge pull request #94 from paulmillr/patch-1
Add better fromstring docs.
-rw-r--r--README.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0509ae71..de6abe5d 100644
--- a/README.md
+++ b/README.md
@@ -335,9 +335,10 @@ There's a single toplevel function which combines all the steps. If you
don't need additional customization, you might want to go with `minify`.
Example:
- // see "fromString" below if you need to pass code instead of file name
var result = UglifyJS.minify("/path/to/file.js");
console.log(result.code); // minified output
+ // if you need to pass code instead of file name
+ var result = UglifyJS.minify("var b = function () {};", {fromString: true});
You can also compress multiple files: