ko 6.0.0 → 6.1.1

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/README.md CHANGED
@@ -1,3 +1,38 @@
1
1
  # ko
2
2
 
3
- build & lint library
3
+ ## Simple, yet powerful, tool for managing your react applications.
4
+
5
+ <a href="https://www.npmjs.com/package/ko"><img alt="NPM Status" src="https://img.shields.io/npm/v/ko.svg?style=flat"></a>
6
+
7
+ ## Features
8
+
9
+ * Support building applications on top of **webpack v5** and **esbuild**
10
+ * Customize ko to work exactly the way you need it for your applications
11
+ * Built-in popular linting tools to lint your source code
12
+ * Built-in support typescript
13
+
14
+ ## Installation
15
+
16
+ You can install ko using npm, yarn or pnpm:
17
+ ``` bash
18
+ npm install ko --save-dev
19
+ # or
20
+ yarn add ko --dev
21
+ # or
22
+ pnpm add ko --save-dev
23
+ ```
24
+
25
+ ## Documents
26
+ * [Introduction](https://dtstack.github.io/ko/docs/introduction)
27
+ * [Getting Started](https://dtstack.github.io/ko/docs/getting-started)
28
+ * [FAQ](https://dtstack.github.io/ko/docs/FAQ)
29
+
30
+ ## Contributing
31
+
32
+ We'd love to have your helping hand on `ko`! See [CONTRIBUTING](https://dtstack.github.io/ko/docs/contributing/) for more information on how to get started.
33
+
34
+ ## License
35
+
36
+ Copyright © DTStack. All rights reserved.
37
+
38
+ Licensed under the MIT license.
@@ -44,7 +44,6 @@ class Build extends factory_1.ActionFactory {
44
44
  {
45
45
  flags: '--hash',
46
46
  description: 'output file name with hash',
47
- defaultValue: true,
48
47
  },
49
48
  ],
50
49
  });
@@ -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
  });
@@ -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
- defaultValue: '',
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,17 +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 (typeof result === 'boolean' && result) {
63
+ const result = (await lintRunner.run(name)).filter(Boolean);
64
+ if (result.length === 0) {
59
65
  this.successStdout('[success]', `lint via ${name}`);
60
- process.exit(0);
61
66
  }
62
67
  else {
63
68
  this.warningStdout(`lint via ${name} failed:`);
64
69
  result.forEach(str => {
65
- this.warningStdout('[failed]', str);
70
+ str && this.warningStdout('[failed]', str);
66
71
  });
67
72
  }
73
+ process.exit(0);
68
74
  }
69
75
  }
70
76
  exports.default = LintFactory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ko",
3
- "version": "6.0.0",
3
+ "version": "6.1.1",
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": "^2.0.0",
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",
@@ -91,5 +91,5 @@
91
91
  "test": "jest",
92
92
  "build": "tsc"
93
93
  },
94
- "readme": "# ko\n\nbuild & lint library\n"
94
+ "readme": "# ko\n\n## Simple, yet powerful, tool for managing your react applications. \n\n<a href=\"https://www.npmjs.com/package/ko\"><img alt=\"NPM Status\" src=\"https://img.shields.io/npm/v/ko.svg?style=flat\"></a>\n\n## Features\n\n* Support building applications on top of **webpack v5** and **esbuild**\n* Customize ko to work exactly the way you need it for your applications \n* Built-in popular linting tools to lint your source code\n* Built-in support typescript\n\n## Installation\n\nYou can install ko using npm, yarn or pnpm:\n``` bash\nnpm install ko --save-dev\n# or\nyarn add ko --dev\n# or \npnpm add ko --save-dev\n```\n\n## Documents\n* [Introduction](https://dtstack.github.io/ko/docs/introduction)\n* [Getting Started](https://dtstack.github.io/ko/docs/getting-started)\n* [FAQ](https://dtstack.github.io/ko/docs/FAQ)\n\n## Contributing\n\nWe'd love to have your helping hand on `ko`! See [CONTRIBUTING](https://dtstack.github.io/ko/docs/contributing/) for more information on how to get started.\n\n## License\n\nCopyright © DTStack. All rights reserved.\n\nLicensed under the MIT license.\n"
95
95
  }