Skip to content

Commit 18d0cf7

Browse files
committed
added Script
1 parent 9ac49ea commit 18d0cf7

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

Diff for: scripts/jsdoc_to_docusaurus.js

+25-26
Original file line numberDiff line numberDiff line change
@@ -76,35 +76,34 @@ if (codeboltChild && codeboltChild.children) {
7676
const categoryFilePath = `${dir}/_category_.json`;
7777
createCategoryFile(categoryFilePath, CbProperties.name);
7878

79-
let frontMatterVars = {
80-
"data": {
81-
"name": " ",
82-
"category": " ",
83-
},
84-
"cbbaseinfo": {
85-
"description": " ",
86-
},
87-
"cbparameters": {
88-
"parameters": [],
89-
"returns": {
90-
"signatureTypeName": " ",
91-
"description": " "
92-
}
93-
}
94-
}
95-
96-
let parameterObj = {
97-
"name": " ",
98-
"typeName": " ",
99-
"description": " "
100-
}
101-
102-
103-
104-
79+
10580
if (CbProperties.type && CbProperties.type.declaration && CbProperties.type.declaration.children) {
10681
CbProperties.type.declaration.children.forEach(CbFunctions => {
10782

83+
84+
let frontMatterVars = {
85+
"data": {
86+
"name": " ",
87+
"category": " ",
88+
},
89+
"cbbaseinfo": {
90+
"description": " ",
91+
},
92+
"cbparameters": {
93+
"parameters": [],
94+
"returns": {
95+
"signatureTypeName": " ",
96+
"description": " "
97+
}
98+
}
99+
}
100+
101+
let parameterObj = {
102+
"name": " ",
103+
"typeName": " ",
104+
"description": " "
105+
}
106+
108107
frontMatterVars.data.category = CbProperties.name;
109108
frontMatterVars.data.name = CbFunctions.name;
110109
frontMatterVars.cbbaseinfo.description = CbFunctions.comment && CbFunctions.comment.summary && CbFunctions.comment.summary.length > 0 ? CbFunctions.comment.summary[0].text : ' ';

0 commit comments

Comments
 (0)