diff options
author | Mihai Bazon <mihai.bazon@gmail.com> | 2015-04-22 17:34:49 +0300 |
---|---|---|
committer | Mihai Bazon <mihai.bazon@gmail.com> | 2015-04-22 17:34:49 +0300 |
commit | 7b22f2031fdbb778dac1968449b950290f6d9216 (patch) | |
tree | 9348e48912b5905bb7dba239307d073e8afd21a7 /bin | |
parent | 3b14582d6b8a93e6f459d71f630a67b489e47dd0 (diff) | |
download | tracifyjs-7b22f2031fdbb778dac1968449b950290f6d9216.tar.gz tracifyjs-7b22f2031fdbb778dac1968449b950290f6d9216.zip |
If name_cache is specified, do rename cached properties
(even if --mangle-props is not there)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/uglifyjs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs index df7b7832..67db2979 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -372,12 +372,13 @@ async.eachLimit(files, 1, function (file, cb) { TOPLEVEL = TOPLEVEL.wrap_enclose(arg_parameter_list); } - if (ARGS.mangle_props) (function(){ + if (ARGS.mangle_props || ARGS.name_cache) (function(){ var reserved = RESERVED ? RESERVED.props : null; var cache = readNameCache("props"); TOPLEVEL = UglifyJS.mangle_properties(TOPLEVEL, { - reserved: reserved, - cache: cache + reserved : reserved, + cache : cache, + only_cache : !ARGS.mangle_props }); writeNameCache("props", cache); })(); |