sort options in alphabetical order (#1743)
They started off as functional groups I guess, but given the sheer number of options this is becoming too difficult to read.
This commit is contained in:
@@ -48,42 +48,42 @@ function Compressor(options, false_by_default) {
|
|||||||
return new Compressor(options, false_by_default);
|
return new Compressor(options, false_by_default);
|
||||||
TreeTransformer.call(this, this.before, this.after);
|
TreeTransformer.call(this, this.before, this.after);
|
||||||
this.options = defaults(options, {
|
this.options = defaults(options, {
|
||||||
sequences : !false_by_default,
|
angular : false,
|
||||||
properties : !false_by_default,
|
booleans : !false_by_default,
|
||||||
|
cascade : !false_by_default,
|
||||||
|
collapse_vars : !false_by_default,
|
||||||
|
comparisons : !false_by_default,
|
||||||
|
conditionals : !false_by_default,
|
||||||
dead_code : !false_by_default,
|
dead_code : !false_by_default,
|
||||||
|
drop_console : false,
|
||||||
drop_debugger : !false_by_default,
|
drop_debugger : !false_by_default,
|
||||||
|
evaluate : !false_by_default,
|
||||||
|
expression : false,
|
||||||
|
global_defs : {},
|
||||||
|
hoist_funs : !false_by_default,
|
||||||
|
hoist_vars : false,
|
||||||
|
if_return : !false_by_default,
|
||||||
|
join_vars : !false_by_default,
|
||||||
|
keep_fargs : true,
|
||||||
|
keep_fnames : false,
|
||||||
|
loops : !false_by_default,
|
||||||
|
negate_iife : !false_by_default,
|
||||||
|
passes : 1,
|
||||||
|
properties : !false_by_default,
|
||||||
|
pure_getters : false,
|
||||||
|
pure_funcs : null,
|
||||||
|
reduce_vars : !false_by_default,
|
||||||
|
screw_ie8 : true,
|
||||||
|
sequences : !false_by_default,
|
||||||
|
side_effects : !false_by_default,
|
||||||
|
top_retain : null,
|
||||||
|
toplevel : !!(options && options["top_retain"]),
|
||||||
unsafe : false,
|
unsafe : false,
|
||||||
unsafe_comps : false,
|
unsafe_comps : false,
|
||||||
unsafe_math : false,
|
unsafe_math : false,
|
||||||
unsafe_proto : false,
|
unsafe_proto : false,
|
||||||
conditionals : !false_by_default,
|
|
||||||
comparisons : !false_by_default,
|
|
||||||
evaluate : !false_by_default,
|
|
||||||
booleans : !false_by_default,
|
|
||||||
loops : !false_by_default,
|
|
||||||
unused : !false_by_default,
|
unused : !false_by_default,
|
||||||
toplevel : !!(options && options["top_retain"]),
|
|
||||||
top_retain : null,
|
|
||||||
hoist_funs : !false_by_default,
|
|
||||||
keep_fargs : true,
|
|
||||||
keep_fnames : false,
|
|
||||||
hoist_vars : false,
|
|
||||||
if_return : !false_by_default,
|
|
||||||
join_vars : !false_by_default,
|
|
||||||
collapse_vars : !false_by_default,
|
|
||||||
reduce_vars : !false_by_default,
|
|
||||||
cascade : !false_by_default,
|
|
||||||
side_effects : !false_by_default,
|
|
||||||
pure_getters : false,
|
|
||||||
pure_funcs : null,
|
|
||||||
negate_iife : !false_by_default,
|
|
||||||
screw_ie8 : true,
|
|
||||||
drop_console : false,
|
|
||||||
angular : false,
|
|
||||||
expression : false,
|
|
||||||
warnings : true,
|
warnings : true,
|
||||||
global_defs : {},
|
|
||||||
passes : 1,
|
|
||||||
}, true);
|
}, true);
|
||||||
var pure_funcs = this.options["pure_funcs"];
|
var pure_funcs = this.options["pure_funcs"];
|
||||||
if (typeof pure_funcs == "function") {
|
if (typeof pure_funcs == "function") {
|
||||||
|
|||||||
@@ -53,26 +53,26 @@ function is_some_comments(comment) {
|
|||||||
function OutputStream(options) {
|
function OutputStream(options) {
|
||||||
|
|
||||||
options = defaults(options, {
|
options = defaults(options, {
|
||||||
indent_start : 0,
|
|
||||||
indent_level : 4,
|
|
||||||
quote_keys : false,
|
|
||||||
space_colon : true,
|
|
||||||
ascii_only : false,
|
ascii_only : false,
|
||||||
unescape_regexps : false,
|
|
||||||
inline_script : false,
|
|
||||||
width : 80,
|
|
||||||
max_line_len : false,
|
|
||||||
beautify : false,
|
beautify : false,
|
||||||
source_map : null,
|
|
||||||
bracketize : false,
|
bracketize : false,
|
||||||
semicolons : true,
|
|
||||||
comments : false,
|
comments : false,
|
||||||
shebang : true,
|
indent_level : 4,
|
||||||
preserve_line : false,
|
indent_start : 0,
|
||||||
screw_ie8 : true,
|
inline_script : false,
|
||||||
preamble : null,
|
|
||||||
quote_style : 0,
|
|
||||||
keep_quoted_props: false,
|
keep_quoted_props: false,
|
||||||
|
max_line_len : false,
|
||||||
|
preamble : null,
|
||||||
|
preserve_line : false,
|
||||||
|
quote_keys : false,
|
||||||
|
quote_style : 0,
|
||||||
|
screw_ie8 : true,
|
||||||
|
semicolons : true,
|
||||||
|
shebang : true,
|
||||||
|
source_map : null,
|
||||||
|
space_colon : true,
|
||||||
|
unescape_regexps : false,
|
||||||
|
width : 80,
|
||||||
wrap_iife : false,
|
wrap_iife : false,
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
|||||||
12
lib/parse.js
12
lib/parse.js
@@ -688,14 +688,14 @@ var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "nam
|
|||||||
function parse($TEXT, options) {
|
function parse($TEXT, options) {
|
||||||
|
|
||||||
options = defaults(options, {
|
options = defaults(options, {
|
||||||
strict : false,
|
|
||||||
filename : null,
|
|
||||||
toplevel : null,
|
|
||||||
expression : false,
|
|
||||||
html5_comments : true,
|
|
||||||
bare_returns : false,
|
bare_returns : false,
|
||||||
shebang : true,
|
|
||||||
cli : false,
|
cli : false,
|
||||||
|
expression : false,
|
||||||
|
filename : null,
|
||||||
|
html5_comments : true,
|
||||||
|
shebang : true,
|
||||||
|
strict : false,
|
||||||
|
toplevel : null,
|
||||||
});
|
});
|
||||||
|
|
||||||
var S = {
|
var S = {
|
||||||
|
|||||||
@@ -62,12 +62,12 @@ function find_builtins() {
|
|||||||
|
|
||||||
function mangle_properties(ast, options) {
|
function mangle_properties(ast, options) {
|
||||||
options = defaults(options, {
|
options = defaults(options, {
|
||||||
reserved : null,
|
cache: null,
|
||||||
cache : null,
|
debug: false,
|
||||||
only_cache : false,
|
ignore_quoted: false,
|
||||||
regex : null,
|
only_cache: false,
|
||||||
ignore_quoted : false,
|
regex: null,
|
||||||
debug : false
|
reserved: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
var reserved = options.reserved;
|
var reserved = options.reserved;
|
||||||
|
|||||||
14
lib/scope.js
14
lib/scope.js
@@ -92,8 +92,8 @@ SymbolDef.prototype = {
|
|||||||
|
|
||||||
AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
|
AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
|
||||||
options = defaults(options, {
|
options = defaults(options, {
|
||||||
|
cache: null,
|
||||||
screw_ie8: true,
|
screw_ie8: true,
|
||||||
cache: null
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// pass 1: setup scope chaining and handle definitions
|
// pass 1: setup scope chaining and handle definitions
|
||||||
@@ -398,12 +398,12 @@ AST_Symbol.DEFMETHOD("global", function(){
|
|||||||
|
|
||||||
AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){
|
AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){
|
||||||
return defaults(options, {
|
return defaults(options, {
|
||||||
except : [],
|
|
||||||
eval : false,
|
eval : false,
|
||||||
|
except : [],
|
||||||
|
keep_fnames : false,
|
||||||
|
screw_ie8 : true,
|
||||||
sort : false, // Ignored. Flag retained for backwards compatibility.
|
sort : false, // Ignored. Flag retained for backwards compatibility.
|
||||||
toplevel : false,
|
toplevel : false,
|
||||||
screw_ie8 : true,
|
|
||||||
keep_fnames : false
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -576,12 +576,12 @@ var base54 = (function() {
|
|||||||
|
|
||||||
AST_Toplevel.DEFMETHOD("scope_warnings", function(options){
|
AST_Toplevel.DEFMETHOD("scope_warnings", function(options){
|
||||||
options = defaults(options, {
|
options = defaults(options, {
|
||||||
undeclared : false, // this makes a lot of noise
|
|
||||||
unreferenced : true,
|
|
||||||
assign_to_global : true,
|
assign_to_global : true,
|
||||||
|
eval : true,
|
||||||
func_arguments : true,
|
func_arguments : true,
|
||||||
nested_defuns : true,
|
nested_defuns : true,
|
||||||
eval : true
|
undeclared : false, // this makes a lot of noise
|
||||||
|
unreferenced : true,
|
||||||
});
|
});
|
||||||
var tw = new TreeWalker(function(node){
|
var tw = new TreeWalker(function(node){
|
||||||
if (options.undeclared
|
if (options.undeclared
|
||||||
|
|||||||
@@ -46,21 +46,21 @@ function read_source_map(code) {
|
|||||||
|
|
||||||
UglifyJS.minify = function(files, options) {
|
UglifyJS.minify = function(files, options) {
|
||||||
options = UglifyJS.defaults(options, {
|
options = UglifyJS.defaults(options, {
|
||||||
spidermonkey : false,
|
compress : {},
|
||||||
outSourceMap : null,
|
|
||||||
outFileName : null,
|
|
||||||
sourceRoot : null,
|
|
||||||
inSourceMap : null,
|
|
||||||
sourceMapUrl : null,
|
|
||||||
sourceMapInline : false,
|
|
||||||
fromString : false,
|
fromString : false,
|
||||||
warnings : false,
|
inSourceMap : null,
|
||||||
mangle : {},
|
mangle : {},
|
||||||
mangleProperties : false,
|
mangleProperties : false,
|
||||||
nameCache : null,
|
nameCache : null,
|
||||||
|
outFileName : null,
|
||||||
output : null,
|
output : null,
|
||||||
compress : {},
|
outSourceMap : null,
|
||||||
parse : {}
|
parse : {},
|
||||||
|
sourceMapInline : false,
|
||||||
|
sourceMapUrl : null,
|
||||||
|
sourceRoot : null,
|
||||||
|
spidermonkey : false,
|
||||||
|
warnings : false,
|
||||||
});
|
});
|
||||||
UglifyJS.base54.reset();
|
UglifyJS.base54.reset();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user