Skip to content

Commit

Permalink
sort options in alphabetical order (#1743)
Browse files Browse the repository at this point in the history
They started off as functional groups I guess, but given the sheer number of options this is becoming too difficult to read.
  • Loading branch information
alexlamsl authored Mar 31, 2017
1 parent f8a71b5 commit a0c3836
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 67 deletions.
50 changes: 25 additions & 25 deletions lib/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,42 @@ function Compressor(options, false_by_default) {
return new Compressor(options, false_by_default);
TreeTransformer.call(this, this.before, this.after);
this.options = defaults(options, {
sequences : !false_by_default,
properties : !false_by_default,
angular : false,
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,
drop_console : false,
drop_debugger : !false_by_default,
unsafe : false,
unsafe_comps : false,
unsafe_math : 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,
toplevel : !!(options && options["top_retain"]),
top_retain : null,
expression : false,
global_defs : {},
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,
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,
negate_iife : !false_by_default,
reduce_vars : !false_by_default,
screw_ie8 : true,
drop_console : false,
angular : false,
expression : false,
sequences : !false_by_default,
side_effects : !false_by_default,
top_retain : null,
toplevel : !!(options && options["top_retain"]),
unsafe : false,
unsafe_comps : false,
unsafe_math : false,
unsafe_proto : false,
unused : !false_by_default,
warnings : true,
global_defs : {},
passes : 1,
}, true);
var pure_funcs = this.options["pure_funcs"];
if (typeof pure_funcs == "function") {
Expand Down
28 changes: 14 additions & 14 deletions lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,26 @@ function is_some_comments(comment) {
function OutputStream(options) {

options = defaults(options, {
indent_start : 0,
indent_level : 4,
quote_keys : false,
space_colon : true,
ascii_only : false,
unescape_regexps : false,
inline_script : false,
width : 80,
max_line_len : false,
beautify : false,
source_map : null,
bracketize : false,
semicolons : true,
comments : false,
shebang : true,
preserve_line : false,
screw_ie8 : true,
indent_level : 4,
indent_start : 0,
inline_script : false,
keep_quoted_props: false,
max_line_len : false,
preamble : null,
preserve_line : false,
quote_keys : false,
quote_style : 0,
keep_quoted_props: false,
screw_ie8 : true,
semicolons : true,
shebang : true,
source_map : null,
space_colon : true,
unescape_regexps : false,
width : 80,
wrap_iife : false,
}, true);

Expand Down
10 changes: 5 additions & 5 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,14 +688,14 @@ var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "nam
function parse($TEXT, options) {

options = defaults(options, {
strict : false,
filename : null,
toplevel : null,
bare_returns : false,
cli : false,
expression : false,
filename : null,
html5_comments : true,
bare_returns : false,
shebang : true,
cli : false,
strict : false,
toplevel : null,
});

var S = {
Expand Down
12 changes: 6 additions & 6 deletions lib/propmangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ function find_builtins() {

function mangle_properties(ast, options) {
options = defaults(options, {
reserved : null,
cache : null,
only_cache : false,
regex : null,
ignore_quoted : false,
debug : false
cache: null,
debug: false,
ignore_quoted: false,
only_cache: false,
regex: null,
reserved: null,
});

var reserved = options.reserved;
Expand Down
14 changes: 7 additions & 7 deletions lib/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ SymbolDef.prototype = {

AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
options = defaults(options, {
cache: null,
screw_ie8: true,
cache: null
});

// pass 1: setup scope chaining and handle definitions
Expand Down Expand Up @@ -398,12 +398,12 @@ AST_Symbol.DEFMETHOD("global", function(){

AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){
return defaults(options, {
except : [],
eval : false,
except : [],
keep_fnames : false,
screw_ie8 : true,
sort : false, // Ignored. Flag retained for backwards compatibility.
toplevel : false,
screw_ie8 : true,
keep_fnames : false
});
});

Expand Down Expand Up @@ -576,12 +576,12 @@ var base54 = (function() {

AST_Toplevel.DEFMETHOD("scope_warnings", function(options){
options = defaults(options, {
undeclared : false, // this makes a lot of noise
unreferenced : true,
assign_to_global : true,
eval : true,
func_arguments : true,
nested_defuns : true,
eval : true
undeclared : false, // this makes a lot of noise
unreferenced : true,
});
var tw = new TreeWalker(function(node){
if (options.undeclared
Expand Down
20 changes: 10 additions & 10 deletions tools/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ function read_source_map(code) {

UglifyJS.minify = function(files, options) {
options = UglifyJS.defaults(options, {
spidermonkey : false,
outSourceMap : null,
outFileName : null,
sourceRoot : null,
inSourceMap : null,
sourceMapUrl : null,
sourceMapInline : false,
compress : {},
fromString : false,
warnings : false,
inSourceMap : null,
mangle : {},
mangleProperties : false,
nameCache : null,
outFileName : null,
output : null,
compress : {},
parse : {}
outSourceMap : null,
parse : {},
sourceMapInline : false,
sourceMapUrl : null,
sourceRoot : null,
spidermonkey : false,
warnings : false,
});
UglifyJS.base54.reset();

Expand Down

0 comments on commit a0c3836

Please sign in to comment.