From: Paul Miller Date: Sun, 13 Jan 2013 16:45:43 +0000 (+0200) Subject: Add better fromstring docs. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ad071f8017f36c47809cb53c411f8fee14874677;p=UglifyJS.git Add better fromstring docs. --- diff --git a/README.md b/README.md index bb8521b2..4805aa46 100644 --- a/README.md +++ b/README.md @@ -324,9 +324,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: