aboutsummaryrefs
aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-31 16:41:04 +0800
committerGitHub <noreply@github.com>2017-03-31 16:41:04 +0800
commita0c3836ba0e3baca8d758d9855144ac15ec0ac8d (patch)
treee72814d10668a4d771728fd4f817bc6b76f4c903 /lib
parentf8a71b56fd6979028d047ce2822878e9796fcec6 (diff)
downloadtracifyjs-a0c3836ba0e3baca8d758d9855144ac15ec0ac8d.tar.gz
tracifyjs-a0c3836ba0e3baca8d758d9855144ac15ec0ac8d.zip
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js50
-rw-r--r--lib/output.js28
-rw-r--r--lib/parse.js10
-rw-r--r--lib/propmangle.js12
-rw-r--r--lib/scope.js14
5 files changed, 57 insertions, 57 deletions
diff --git a/lib/compress.js b/lib/compress.js
index ac7ea357..55f6d793 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -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") {
diff --git a/lib/output.js b/lib/output.js
index ac9e0654..d5c7304a 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -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);
diff --git a/lib/parse.js b/lib/parse.js
index 1ccde26a..c34e13db 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -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 = {
diff --git a/lib/propmangle.js b/lib/propmangle.js
index 3c75cac9..cfa035d2 100644
--- a/lib/propmangle.js
+++ b/lib/propmangle.js
@@ -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;
diff --git a/lib/scope.js b/lib/scope.js
index df0a7e00..74760e4f 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -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
@@ -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
});
});
@@ -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