作者:mobiledu2502925687 | 来源:互联网 | 2024-12-21 13:50
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!