aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2015-03-18 12:09:09 +0200
committerMihai Bazon <mihai.bazon@gmail.com>2015-03-18 12:10:21 +0200
commit03b61211941955577c82ef98afa423b1ef0f8225 (patch)
treef63b00069dfa4a97c6c45d23c44d7c29dd025f3f /bin
parent3ef092332b1e7c9bf1d17038601a33bd742dd753 (diff)
downloadtracifyjs-03b61211941955577c82ef98afa423b1ef0f8225.tar.gz
tracifyjs-03b61211941955577c82ef98afa423b1ef0f8225.zip
Add --reserve-domprops along with a default exclusion list in tools/domprops.json
Diffstat (limited to 'bin')
-rwxr-xr-xbin/uglifyjs6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs
index 281ac175..2980a67e 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -68,6 +68,7 @@ You need to pass an argument to this option to specify the name that your module
.describe("keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name.")
.describe("quotes", "Quote style (0 - auto, 1 - single, 2 - double, 3 - original)")
.describe("reserved-file", "File containing reserved names")
+ .describe("reserve-domprops", "Make (most?) DOM properties reserved for --mangle-props")
.describe("mangle-props", "Mangle property names")
.describe("name-cache", "File to hold mangled names mappings")
@@ -112,6 +113,7 @@ You need to pass an argument to this option to specify the name that your module
.boolean("bare-returns")
.boolean("keep-fnames")
.boolean("mangle-props")
+ .boolean("reserve-domprops")
.wrap(80)
@@ -156,6 +158,10 @@ if (ARGS.reserved_file) ARGS.reserved_file.forEach(function(filename){
RESERVED = UglifyJS.readReservedFile(filename, RESERVED);
});
+if (ARGS.reserve_domprops) {
+ RESERVED = UglifyJS.readReservedFile(path.join(__dirname, "..", "tools", "domprops.json"), RESERVED);
+}
+
if (ARGS.d) {
if (COMPRESS) COMPRESS.global_defs = getOptions("d");
}