Add --mangle-props-debug and fix --mangle-props=unquoted collision

Patch by @AshleyScirra

Based on: PR #1316

Renamed the CLI debug option to --mangle-props-debug

Fixes: #1321 name collision in --mangle-props=unquoted
This commit is contained in:
Ashley (Scirra)
2016-10-27 11:23:04 -04:00
committed by Richard van Velzen
parent 79b98a9fe8
commit 2a9989dd18
5 changed files with 195 additions and 5 deletions

View File

@@ -98,6 +98,7 @@ You need to pass an argument to this option to specify the name that your module
.string("beautify")
.string("m")
.string("mangle")
.string("mangle-props-debug")
.string("c")
.string("compress")
.string("d")
@@ -419,7 +420,8 @@ async.eachLimit(files, 1, function (file, cb) {
cache : cache,
only_cache : !ARGS.mangle_props,
regex : regex,
ignore_quoted : ARGS.mangle_props == 2
ignore_quoted : ARGS.mangle_props == 2,
debug : typeof ARGS.mangle_props_debug === "undefined" ? false : ARGS.mangle_props_debug
});
writeNameCache("props", cache);
})();