@next-core/build-config-factory 2.18.45 → 2.18.46
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 +11 -0
- package/package.json +2 -2
- package/src/generateBrickDocs.js +17 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* support group i18n ([b8b774f](https://github.com/easyops-cn/next-core/commit/b8b774f705b5be23209b3839d0a12780dd5b9550))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [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
18
|
|
|
8
19
|
**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.46",
|
|
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",
|
|
@@ -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": "9ae0cc76cd7b13dd781b0209f1b92dc1c8b317eb"
|
|
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
|
|
|
@@ -237,11 +248,11 @@ function extractBrickDocComplexKind(groups, elementChildren) {
|
|
|
237
248
|
}, {});
|
|
238
249
|
|
|
239
250
|
// `Object literals` 类型也会放在 Properties 列表中, 放进去后再统一进行排序
|
|
240
|
-
const
|
|
241
|
-
return
|
|
251
|
+
const propertiesList = brickConf[brickKindMap.property];
|
|
252
|
+
return propertiesList
|
|
242
253
|
? {
|
|
243
254
|
...brickConf,
|
|
244
|
-
[brickKindMap.property]: sortBy(
|
|
255
|
+
[brickKindMap.property]: sortBy(propertiesList, (item) => {
|
|
245
256
|
const find = elementChildren.find(
|
|
246
257
|
(child) => child.name === item.name
|
|
247
258
|
);
|