热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Issuewith@nameAnnotationinDocumentationGeneration

Thispostdiscussesanissueencounteredwhileusingthe@nameannotationindocumentationgeneration,specificallyregardingnestedclassprocessingandunexpectedoutput.

If you're reporting a bug, please provide input code, expected output, and actual output. This will help diagnose the problem more effectively.

I've been reviewing the documentation and searching through issues to find a solution to my problem. The issue revolves around nested classes being processed when they shouldn't be.

Consider the following example:

/**
* Emission settings
*/
export default class Emission {
constructor(params) {
_create(params);
}

/**
* Creates panel on the emission
* @param {object|array} emission
*/
_create(params) {
let panel = new Panel();
}
}

I expected the generated Markdown file (emission.md) to look like this:

## Emission

Emission settings

### _create

Creates panel on the emission

**Parameters**

- `emission` **[object](https://developer.mozilla.org/docs/Web/Javascript/Reference/Global_Objects/Object), [array](https://developer.mozilla.org/docs/Web/Javascript/Reference/Global_Objects/Array)**

However, the actual output includes additional sections that I did not anticipate:

## Emission

Emission settings

### _create

Creates panel on the emission

**Parameters**

- `emission` **[object](https://developer.mozilla.org/docs/Web/Javascript/Reference/Global_Objects/Object), [array](https://developer.mozilla.org/docs/Web/Javascript/Reference/Global_Objects/Array)**

## Panel

**Extends PanelCore**

I have spent hours trying to resolve this issue...

Here are my gulp settings:

gulp.task('docs', () => {
return gulp.src('./js/*.js')
.pipe(flatmap((stream, file) => {
console.log(file.path);
return gulp.src(file.path)
.pipe(docs('md',{ecmaVersion: 6, sourceType: 'module', filename: file.path.split('/').pop().split('.')[0] + '.md' }))
.pipe(gulp.dest('WebOs.wiki/ds'));
}));
});
  • documentation.js version: 5.4.0
  • How are you running documentation.js: "gulp-documentation": "^3.2.1"

This issue comes from the open-source project: documentationjs/documentation.

Apologies for any inconvenience caused by this query. Thank you for your assistance!


推荐阅读
author-avatar
mobiledu2502925687
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有