aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-11-19 19:29:51 +0800
committerGitHub <noreply@github.com>2017-11-19 19:29:51 +0800
commitf4e2fb9864a8c5dd6fb24870c4c09761b5914f75 (patch)
tree99c3b5be676fa17879db559319b084ce942df58f /bin
parentb80062c490178552f45fe66acfa04e6d9c3a6363 (diff)
downloadtracifyjs-f4e2fb9864a8c5dd6fb24870c4c09761b5914f75.tar.gz
tracifyjs-f4e2fb9864a8c5dd6fb24870c4c09761b5914f75.zip
expand symbol space to improve compression (#2460)
- give globally distinct names to distinct variables - improve ability to compress cross-scoped - introduce `options.rename` to `minify()` - default `true` if both `compress` & `mangle`
Diffstat (limited to 'bin')
-rwxr-xr-xbin/uglifyjs2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs
index 04c402d3..661f7260 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -47,6 +47,7 @@ program.option("-d, --define <expr>[=value]", "Global definitions.", parse_js("d
program.option("--ie8", "Support non-standard Internet Explorer 8.");
program.option("--keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name.");
program.option("--name-cache <file>", "File to hold mangled name mappings.");
+program.option("--no-rename", "Disable symbol expansion.");
program.option("--self", "Build UglifyJS as a library (implies --wrap UglifyJS)");
program.option("--source-map [options]", "Enable source map/specify source map options.", parse_source_map());
program.option("--timings", "Display operations run time on STDERR.")
@@ -65,6 +66,7 @@ if (!program.output && program.sourceMap && program.sourceMap.url != "inline") {
"compress",
"ie8",
"mangle",
+ "rename",
"sourceMap",
"toplevel",
"wrap"