From 1a23c304de43a0afb6b0aaf226709485c2965ac0 Mon Sep 17 00:00:00 2001 From: David BRETIN Date: Wed, 8 Feb 2017 09:50:06 +0100 Subject: [PATCH] Add "mangle-prefix" arguments Pass the value || "" to method mangle_properties via option --- bin/uglifyjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/uglifyjs b/bin/uglifyjs index 8cb2f0df..7ed51b7a 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -74,6 +74,7 @@ You need to pass an argument to this option to specify the name that your module .describe("reserve-domprops", "Make (most?) DOM properties reserved for --mangle-props") .describe("mangle-props", "Mangle property names (0 - disabled, 1 - mangle all properties, 2 - mangle unquoted properies)") .describe("mangle-regex", "Only mangle property names matching the regex") + .describe("mangle-prefix", "Prefix of the mangle properties") .describe("name-cache", "File to hold mangled names mappings") .describe("pure-funcs", "List of functions that can be safely removed if their return value is not used") .describe("dump-spidermonkey-ast", "Dump SpiderMonkey AST to stdout.") @@ -110,6 +111,7 @@ You need to pass an argument to this option to specify the name that your module .string("p") .string("prefix") .string("name-cache") + .string("mangle-prefix") .array("reserved-file") .array("pure-funcs") @@ -421,6 +423,7 @@ async.eachLimit(files, 1, function (file, cb) { only_cache : !ARGS.mangle_props, regex : regex, ignore_quoted : ARGS.mangle_props == 2, + prefix : ARGS.mangle_prefix || "", debug : typeof ARGS.mangle_props_debug === "undefined" ? false : ARGS.mangle_props_debug }); writeNameCache("props", cache);