crabatool 1.0.184 → 1.0.186
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/package.json +1 -1
- package/tool/checkjs.js +6 -0
- package/tool/compress.js +8 -8
- package/tool/start.js +1 -0
package/package.json
CHANGED
package/tool/checkjs.js
CHANGED
|
@@ -379,6 +379,12 @@ module.exports.start = async function() {
|
|
|
379
379
|
if (status != '无异常') { // 检查结果检查就不发到钉钉了; ps:健康也发到钉钉,鼓励开发继续保持;
|
|
380
380
|
postWebhooks(id, reportUrl, webhookList);
|
|
381
381
|
}
|
|
382
|
+
|
|
383
|
+
if (errCount > 0 && config.errorAbort) {
|
|
384
|
+
var tips = '警告!!!代码检测发现异常,已终止当前构建任务。请修复代码后重新构建。';
|
|
385
|
+
utils.postWeebhooks(tips);
|
|
386
|
+
throw new Error(tips);
|
|
387
|
+
}
|
|
382
388
|
}
|
|
383
389
|
|
|
384
390
|
async function eslintCheck(content) {
|
package/tool/compress.js
CHANGED
|
@@ -4,18 +4,19 @@ var path = require('path');
|
|
|
4
4
|
var fs = require('fs');
|
|
5
5
|
var utils = require('../lib/utils.js');
|
|
6
6
|
var mergeTool = require('./merge/mergeTool.js');
|
|
7
|
-
|
|
8
|
-
var _jsPath = path.join(config.targetPath, 'src/Carpa.Web/js');
|
|
9
|
-
var _tempPath = path.join(config.targetPath, '__build');
|
|
10
|
-
var _zipName = path.join(config.targetPath, 'craba.zip');
|
|
11
|
-
var _tempJsPath = path.join(_tempPath, 'js');
|
|
12
|
-
var _tempSkinPath = path.join(_tempPath, 'skins');
|
|
13
|
-
var _pkgPath = utils.getCrabaPackgePath(path.join(_jsPath, 'package.json'));
|
|
14
7
|
var _blackFilePath = path.join(__dirname, 'merge/black_fun_list.txt');
|
|
8
|
+
var _jsPath, _tempPath, _zipName, _tempJsPath, _tempSkinPath, _pkgPath;
|
|
15
9
|
|
|
16
10
|
module.exports.run = function() {
|
|
17
11
|
console.log('环境变量:', process.env.REMOTE_BUILD);
|
|
18
12
|
|
|
13
|
+
_jsPath = path.join(config.targetPath, 'src/Carpa.Web/js');
|
|
14
|
+
_tempPath = path.join(config.targetPath, '__build');
|
|
15
|
+
_zipName = path.join(config.targetPath, 'craba.zip');
|
|
16
|
+
_tempJsPath = path.join(_tempPath, 'js');
|
|
17
|
+
_tempSkinPath = path.join(_tempPath, 'skins');
|
|
18
|
+
_pkgPath = utils.getCrabaPackgePath(path.join(_jsPath, 'package.json'));
|
|
19
|
+
|
|
19
20
|
if (fs.existsSync(_zipName)) {
|
|
20
21
|
fs.unlinkSync(_zipName);
|
|
21
22
|
}
|
|
@@ -94,7 +95,6 @@ function doCompress() {
|
|
|
94
95
|
compressAndMergeCss(inNames, skinPath, 'craba.min.css');
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
|
|
98
98
|
function compressCrabaJs(inNames, outName, onEnd) {
|
|
99
99
|
inNames = inNames.map((s) => {
|
|
100
100
|
return path.join(_jsPath, s);
|
package/tool/start.js
CHANGED
|
@@ -88,6 +88,7 @@ class Start {
|
|
|
88
88
|
{ name: '-globals', type: 'array' },
|
|
89
89
|
|
|
90
90
|
{ name: '-ignoreCompress', type: 'boolean' },
|
|
91
|
+
{ name: '-errorAbort', type: 'boolean' },
|
|
91
92
|
{ name: '-hidejspath', type: 'boolean' },
|
|
92
93
|
{ name: '-Debug', type: 'boolean' },
|
|
93
94
|
{ name: '-checkgspx', type: 'boolean' },
|