crabatool 1.0.433 → 1.0.435
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.
- package/index.js +1 -1
- package/lib/config.js +1 -0
- package/package.json +1 -1
- package/tool/checkgspx.js +1 -1
- package/tool/checkjs.js +3 -0
package/index.js
CHANGED
|
@@ -71,7 +71,7 @@ function checkFast(args) {
|
|
|
71
71
|
if (args.includes('-checkjs')) {
|
|
72
72
|
start.bindConfigByArgv('-ignoreFiles', 'array');
|
|
73
73
|
start.bindConfigByArgv('-cssFiles', 'array');
|
|
74
|
-
|
|
74
|
+
start.bindConfigByArgv('-checkCustomControl', 'boolean');
|
|
75
75
|
start.checkAllJs();
|
|
76
76
|
return false;
|
|
77
77
|
}
|
package/lib/config.js
CHANGED
|
@@ -24,6 +24,7 @@ class Config {
|
|
|
24
24
|
this.Debug = false;
|
|
25
25
|
this.version = 'master';
|
|
26
26
|
this.mergeInitAndBiz = false; // 合并最终生成的init.js和biz.js
|
|
27
|
+
this.checkCustomControl = true;
|
|
27
28
|
|
|
28
29
|
this.TempPath = path.join(os.tmpdir(), '_crabatemp');
|
|
29
30
|
this.ImageCache = path.join(this.TempPath, "_img");
|
package/package.json
CHANGED
package/tool/checkgspx.js
CHANGED
|
@@ -66,7 +66,7 @@ function readGspxToJSON(fileName, data) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// 统计customs
|
|
69
|
-
if (name == 'CustomControl') {
|
|
69
|
+
if (name == 'CustomControl' && config.checkCustomControl) {
|
|
70
70
|
if (attrs.Src) {
|
|
71
71
|
// 统计当前页面引用了哪些CustomControl
|
|
72
72
|
var key1 = utils.joinSep(fileName.replaceAll('\\', '/'));
|
package/tool/checkjs.js
CHANGED