[Pkg-javascript-commits] [uglifyjs] 90/491: more refinement of minify() documentation (#1983)

Jonas Smedegaard dr at jones.dk
Wed Feb 14 19:51:24 UTC 2018


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

js pushed a commit to annotated tag debian/3.3.10-1
in repository uglifyjs.

commit a1dedeb3ceb41b6419f877d34228cf0ba4b040a2
Author: kzc <kzc at users.noreply.github.com>
Date:   Sat May 20 16:55:03 2017 -0400

    more refinement of minify() documentation (#1983)
---
 README.md | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 2c6ee37..b34db7c 100644
--- a/README.md
+++ b/README.md
@@ -301,9 +301,10 @@ like this:
 var UglifyJS = require("uglify-js");
 ```
 
-There is a single high level minification function, `minify(code, options)`, which will
-performs all the steps in a configurable manner.
-Example:
+There is a single high level function, **`minify(code, options)`**,
+which will perform all minification [phases](#minify-options) in a configurable
+manner. By default `minify()` will enable the options [`compress`](#compress-options)
+and [`mangle`](#mangle-options). Example:
 ```javascript
 var code = "function add(first, second) { return first + second; }";
 var result = UglifyJS.minify(code);
@@ -311,7 +312,9 @@ console.log(result.error); // runtime error, or `undefined` if no error
 console.log(result.code);  // minified output: function add(n,d){return n+d}
 ```
 
-You can also compress multiple files:
+You can `minify` more than one JavaScript file at a time by using an object
+for the first argument where the keys are file names and the values are source
+code:
 ```javascript
 var code = {
     "file1.js": "function add(first, second) { return first + second; }",

-- 
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