ko 6.0.1 → 6.1.2
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/lib/actions/build.js +0 -1
- package/lib/actions/dev.js +0 -2
- package/lib/actions/lints.js +13 -6
- package/package.json +2 -2
package/lib/actions/build.js
CHANGED
package/lib/actions/dev.js
CHANGED
|
@@ -62,12 +62,10 @@ class Dev extends factory_1.default {
|
|
|
62
62
|
{
|
|
63
63
|
flags: '--hash',
|
|
64
64
|
description: 'output file name with hash',
|
|
65
|
-
defaultValue: true,
|
|
66
65
|
},
|
|
67
66
|
{
|
|
68
67
|
flags: '--analyzer',
|
|
69
68
|
description: 'support building analyzer',
|
|
70
|
-
defaultValue: false,
|
|
71
69
|
},
|
|
72
70
|
],
|
|
73
71
|
});
|
package/lib/actions/lints.js
CHANGED
|
@@ -23,7 +23,7 @@ class LintFactory extends factory_1.ActionFactory {
|
|
|
23
23
|
description: `lint your codes via ${name}`,
|
|
24
24
|
args: [
|
|
25
25
|
{
|
|
26
|
-
flags: '<patterns
|
|
26
|
+
flags: '<patterns...>',
|
|
27
27
|
description: ` Specify ${name} lint patterns(via glob)`,
|
|
28
28
|
},
|
|
29
29
|
],
|
|
@@ -31,12 +31,18 @@ class LintFactory extends factory_1.ActionFactory {
|
|
|
31
31
|
{
|
|
32
32
|
flags: '-w, --write',
|
|
33
33
|
description: 'try to fix problems automatically',
|
|
34
|
-
defaultValue: false,
|
|
35
34
|
},
|
|
36
35
|
{
|
|
37
36
|
flags: '-c, --configPath <configPath>',
|
|
38
37
|
description: `Specify ${name} config path`,
|
|
39
|
-
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
flags: '--concurrency',
|
|
41
|
+
description: 'Enable concurrency mode',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
flags: '--concurrentNumber <number>',
|
|
45
|
+
description: 'Specify max worker count',
|
|
40
46
|
},
|
|
41
47
|
],
|
|
42
48
|
});
|
|
@@ -54,16 +60,17 @@ class LintFactory extends factory_1.ActionFactory {
|
|
|
54
60
|
(0, utils_1.assert)(opts.patterns, `patterns config of ${name} should be specified(via glob)`);
|
|
55
61
|
process.title = finalOpts.name;
|
|
56
62
|
const lintRunner = new ko_lints_1.default(opts);
|
|
57
|
-
const result = await lintRunner.run(name);
|
|
58
|
-
if (
|
|
63
|
+
const result = (await lintRunner.run(name)).filter(Boolean);
|
|
64
|
+
if (result.length === 0) {
|
|
59
65
|
this.successStdout('[success]', `lint via ${name}`);
|
|
60
66
|
process.exit(0);
|
|
61
67
|
}
|
|
62
68
|
else {
|
|
63
69
|
this.warningStdout(`lint via ${name} failed:`);
|
|
64
70
|
result.forEach(str => {
|
|
65
|
-
this.warningStdout('[failed]', str);
|
|
71
|
+
str && this.warningStdout('[failed]', str);
|
|
66
72
|
});
|
|
73
|
+
process.exit(1);
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ko",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"description": "build & lint library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ko",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"postcss": "^8.4.14",
|
|
60
60
|
"postcss-loader": "^7.0.0",
|
|
61
61
|
"postcss-url": "^10.1.3",
|
|
62
|
-
"ko-lints": "^3.
|
|
62
|
+
"ko-lints": "^3.1.0",
|
|
63
63
|
"react-refresh": "^0.13.0",
|
|
64
64
|
"sass": "^1.52.1",
|
|
65
65
|
"sass-loader": "^13.0.0",
|