@next-core/build-config-factory 2.18.45 → 2.18.48
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/CHANGELOG.md +33 -0
- package/package.json +3 -3
- package/src/generateBrickDocs.js +24 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.18.48](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.18.47...@next-core/build-config-factory@2.18.48) (2022-06-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* show inherited method ([779eddb](https://github.com/easyops-cn/next-core/commit/779eddbf7bee66b24566eaf0288a14ae05079f5f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.18.47](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.18.46...@next-core/build-config-factory@2.18.47) (2022-06-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* typo ([7e942d3](https://github.com/easyops-cn/next-core/commit/7e942d363d9af86875b10a167b50a5d0972835e0))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [2.18.46](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.18.45...@next-core/build-config-factory@2.18.46) (2022-06-10)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* support group i18n ([b8b774f](https://github.com/easyops-cn/next-core/commit/b8b774f705b5be23209b3839d0a12780dd5b9550))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [2.18.45](https://github.com/easyops-cn/next-core/compare/@next-core/build-config-factory@2.18.44...@next-core/build-config-factory@2.18.45) (2022-06-06)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package @next-core/build-config-factory
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/build-config-factory",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.48",
|
|
4
4
|
"description": "build config factory",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/build-config-factory",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@next-core/brick-utils": "^2.37.17",
|
|
22
22
|
"@next-core/repo-config": "^0.2.1",
|
|
23
|
-
"@next-core/typedoc-plugin-filter-inherit": "^1.
|
|
23
|
+
"@next-core/typedoc-plugin-filter-inherit": "^1.2.0",
|
|
24
24
|
"@next-core/webpack-config-factory": "^2.16.2",
|
|
25
25
|
"change-case": "^4.1.2",
|
|
26
26
|
"chokidar": "^3.5.3",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"typedoc": "^0.19.2",
|
|
38
38
|
"typedoc-plugin-no-inherit": "^1.2.2"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "fea00f68859e17286116e998c4b52bc287374a91"
|
|
41
41
|
}
|
package/src/generateBrickDocs.js
CHANGED
|
@@ -36,6 +36,7 @@ const baseDocComments = [
|
|
|
36
36
|
"deprecated",
|
|
37
37
|
"editor",
|
|
38
38
|
"editorprops",
|
|
39
|
+
"groupi18n",
|
|
39
40
|
];
|
|
40
41
|
|
|
41
42
|
function generateBrickDoc(doc) {
|
|
@@ -72,13 +73,23 @@ function convertTagsToMapByFields(tags, fields) {
|
|
|
72
73
|
return prev;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
let specialField;
|
|
77
|
+
// typedoc 读取到的 tag 都为小写,不是驼峰的形式,这里特殊处理下最终文档生成驼峰的形式
|
|
78
|
+
if (
|
|
79
|
+
(specialField = ["editorProps", "groupI18N"].find(
|
|
80
|
+
(name) => name.toLowerCase() === curr.tag
|
|
81
|
+
))
|
|
82
|
+
) {
|
|
76
83
|
try {
|
|
77
|
-
prev[
|
|
84
|
+
prev[specialField] = JSON.parse(curr.text);
|
|
78
85
|
return prev;
|
|
79
86
|
} catch {
|
|
80
87
|
const find = tags.find((item) => item.tag === "name");
|
|
81
|
-
throw new Error(
|
|
88
|
+
throw new Error(
|
|
89
|
+
`${specialField} tag of ${
|
|
90
|
+
find && find.text
|
|
91
|
+
} \`JSON.parse()\` parse error`
|
|
92
|
+
);
|
|
82
93
|
}
|
|
83
94
|
}
|
|
84
95
|
|
|
@@ -166,12 +177,18 @@ function extractBrickDocBaseKind(tags) {
|
|
|
166
177
|
|
|
167
178
|
function getRealBrickDocCategory(brick) {
|
|
168
179
|
if (!Object.prototype.hasOwnProperty.call(brick, "decorators")) {
|
|
169
|
-
//当继承的属性来自于
|
|
180
|
+
//当继承的属性来自于 node_module 时,相关的 @property decorators 已经被转成低版本的代码,typedoc 获取不到相关 decorators 信息,
|
|
170
181
|
// 这里通过 comment tag 来标识是否使用了 @property, 以便继承的属性也能生成到文档的 property 类别中显示
|
|
171
182
|
if (
|
|
172
183
|
get(brick, "comment.tags", []).find((item) => item.tag === "property")
|
|
173
184
|
) {
|
|
174
185
|
return "property";
|
|
186
|
+
} else if (
|
|
187
|
+
get(brick, "signatures[0].comment.tags", []).find(
|
|
188
|
+
(item) => item.tag === "method"
|
|
189
|
+
)
|
|
190
|
+
) {
|
|
191
|
+
return "method";
|
|
175
192
|
}
|
|
176
193
|
|
|
177
194
|
return null;
|
|
@@ -237,11 +254,11 @@ function extractBrickDocComplexKind(groups, elementChildren) {
|
|
|
237
254
|
}, {});
|
|
238
255
|
|
|
239
256
|
// `Object literals` 类型也会放在 Properties 列表中, 放进去后再统一进行排序
|
|
240
|
-
const
|
|
241
|
-
return
|
|
257
|
+
const propertiesList = brickConf[brickKindMap.property];
|
|
258
|
+
return propertiesList
|
|
242
259
|
? {
|
|
243
260
|
...brickConf,
|
|
244
|
-
[brickKindMap.property]: sortBy(
|
|
261
|
+
[brickKindMap.property]: sortBy(propertiesList, (item) => {
|
|
245
262
|
const find = elementChildren.find(
|
|
246
263
|
(child) => child.name === item.name
|
|
247
264
|
);
|
|
@@ -614,7 +631,6 @@ module.exports = function generateBrickDocs(packageName) {
|
|
|
614
631
|
// disableSources: true,
|
|
615
632
|
hideGenerator: true,
|
|
616
633
|
categoryOrder: ["property", "event", "method", "Other"],
|
|
617
|
-
allowInheritedDoc: ["FormItemElement", "BaseChartElement", "GraphElement"],
|
|
618
634
|
exclude: [
|
|
619
635
|
"node_modules",
|
|
620
636
|
"**/*.spec.ts?(x)",
|