fix(scripts): ignore declarations without a description (#122)
This commit is contained in:
@@ -10,11 +10,13 @@ function main() {
|
||||
const isTool = path.dirname(scriptfile) == "tools";
|
||||
const contents = fs.readFileSync(process.argv[2], "utf8");
|
||||
const functions = extractFunctions(contents, isTool);
|
||||
let declarations = functions.map(({ funcName, jsdoc }) => {
|
||||
let declarations = [];
|
||||
for (const { funcName, jsdoc } of functions) {
|
||||
const { description, params } = parseJsDoc(jsdoc, funcName);
|
||||
if (!description) continue;
|
||||
const declaration = buildDeclaration(funcName, description, params);
|
||||
return declaration;
|
||||
});
|
||||
declarations.push(declaration);
|
||||
}
|
||||
if (isTool) {
|
||||
const name = getBasename(scriptfile);
|
||||
if (declarations.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user