zyd-server-build2 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +22 -22
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -50,32 +50,32 @@ function build ({ src, dst, ignoreDir = [], ignoreFile = [], copyright = "", noB
50
50
  // parse options
51
51
  },
52
52
  compress: {
53
- drop_console: false, // 删除console
54
- dead_code: true, // 移除没被引用的代码
55
- drop_debugger: true, // 移除 debugger;
56
- hoist_funs: true, // 提升函数声明
57
- join_vars: true, // 合并连续 var 声明
58
- booleans: true, // 优化布尔运算,例如 !!a? b : c → a ? b : c
59
- loops: true, // 当do、while 、 for循环的判断条件可以确定是,对其进行优化。
60
- hoist_vars: true, // (默认 false) -- 提升 var 声明 (默认是false,因为那会加大文件的size)
61
- properties: false, // (默认 false) — 传一个对象来自定义指明混淆对象属性的选项。
62
- unsafe_math: true, // (默认 false) -- 优化数字表达式,例如2 * x * 3 变成 6 * x, 可能会导致不精确的浮点数结果。
63
- unused: true, // 干掉没有被引用的函数和变量。(除非设置"keep_assign",否则变量的简单直接赋值也不算被引用。)
64
- pure_getters: true, // 默认是 false. 如果你传入true,UglifyJS会假设对象属性的引用(例如foo.bar 或 foo["bar"])没有函数副作用。
53
+ // drop_console: false, // 删除console
54
+ // dead_code: true, // 移除没被引用的代码
55
+ // drop_debugger: true, // 移除 debugger;
56
+ // hoist_funs: true, // 提升函数声明
57
+ // join_vars: true, // 合并连续 var 声明
58
+ // booleans: true, // 优化布尔运算,例如 !!a? b : c → a ? b : c
59
+ // loops: true, // 当do、while 、 for循环的判断条件可以确定是,对其进行优化。
60
+ // hoist_vars: true, // (默认 false) -- 提升 var 声明 (默认是false,因为那会加大文件的size)
61
+ // properties: false, // (默认 false) — 传一个对象来自定义指明混淆对象属性的选项。
62
+ // unsafe_math: true, // (默认 false) -- 优化数字表达式,例如2 * x * 3 变成 6 * x, 可能会导致不精确的浮点数结果。
63
+ // unused: true, // 干掉没有被引用的函数和变量。(除非设置"keep_assign",否则变量的简单直接赋值也不算被引用。)
64
+ // pure_getters: true, // 默认是 false. 如果你传入true,UglifyJS会假设对象属性的引用(例如foo.bar 或 foo["bar"])没有函数副作用。
65
65
  // keep_fnames: true, // 默认 false。传 true来防止压缩器干掉函数名。对那些依赖
66
- passes: 10, // 默认 1。运行压缩的次数。在某些情况下,用一个大于1的数字参数可以进一步压缩代码大小。注意:数字越大压缩耗时越长。
67
- global_defs: {
68
- DEBUG: false
69
- },
66
+ // passes: 10, // 默认 1。运行压缩的次数。在某些情况下,用一个大于1的数字参数可以进一步压缩代码大小。注意:数字越大压缩耗时越长。
67
+ // global_defs: {
68
+ // DEBUG: false
69
+ // },
70
70
  },
71
71
  mangle: {
72
72
  // mangle options
73
- toplevel: true, // 干掉顶层作用域中没有被引用的函数 ("funcs")和/或变量("vars") (默认是false , true 的话即函数变量都干掉)
74
- keep_fnames: true, // 默认 false。传 true来防止压缩器干掉函数名。对那些依赖
75
- eval: true, // 混淆那些在with或eval中出现的名字(默认禁用)。
76
- properties: {
77
- // mangle property options
78
- }
73
+ // toplevel: true, // 干掉顶层作用域中没有被引用的函数 ("funcs")和/或变量("vars") (默认是false , true 的话即函数变量都干掉)
74
+ // keep_fnames: true, // 默认 false。传 true来防止压缩器干掉函数名。对那些依赖
75
+ // eval: true, // 混淆那些在with或eval中出现的名字(默认禁用)。
76
+ // properties: {
77
+ // // mangle property options
78
+ // }
79
79
  },
80
80
  format: {
81
81
  // format options (can also use `output` for backwards compatibility)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zyd-server-build2",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "基于terser的js混淆build库,通过babel支持es6+",
5
5
  "main": "index.js",
6
6
  "scripts": {