#877 Ignore mangle sort option
This commit is contained in:
@@ -192,11 +192,6 @@ input files from the command line.
|
|||||||
To enable the mangler you need to pass `--mangle` (`-m`). The following
|
To enable the mangler you need to pass `--mangle` (`-m`). The following
|
||||||
(comma-separated) options are supported:
|
(comma-separated) options are supported:
|
||||||
|
|
||||||
- `sort` — to assign shorter names to most frequently used variables. This
|
|
||||||
saves a few hundred bytes on jQuery before gzip, but the output is
|
|
||||||
_bigger_ after gzip (and seems to happen for other libraries I tried it
|
|
||||||
on) therefore it's not enabled by default.
|
|
||||||
|
|
||||||
- `toplevel` — mangle names declared in the toplevel scope (disabled by
|
- `toplevel` — mangle names declared in the toplevel scope (disabled by
|
||||||
default).
|
default).
|
||||||
|
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){
|
|||||||
return defaults(options, {
|
return defaults(options, {
|
||||||
except : [],
|
except : [],
|
||||||
eval : false,
|
eval : false,
|
||||||
sort : false,
|
sort : false, // Ignored. Flag retained for backwards compatibility.
|
||||||
toplevel : false,
|
toplevel : false,
|
||||||
screw_ie8 : false,
|
screw_ie8 : false,
|
||||||
keep_fnames : false
|
keep_fnames : false
|
||||||
@@ -415,9 +415,6 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options){
|
|||||||
a.push(symbol);
|
a.push(symbol);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (options.sort) a.sort(function(a, b){
|
|
||||||
return b.references.length - a.references.length;
|
|
||||||
});
|
|
||||||
to_mangle.push.apply(to_mangle, a);
|
to_mangle.push.apply(to_mangle, a);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user