Update plugin chain to support JSDoc import types

This commit is contained in:
ahocevar
2018-10-23 18:02:55 +02:00
parent 0b21d1a6fc
commit deb6c093a8
7 changed files with 280 additions and 202 deletions

View File

@@ -0,0 +1,21 @@
/**
* @filedesc
* Normalize module path to make no distinction between static and member at
* the module level.
*/
exports.handlers = {
/**
* Adds default export to module path types without name
* @param {Object} e Event object.
*/
newDoclet: function(e) {
const doclet = e.doclet;
const module = doclet.longname.split('#').shift();
if (module.indexOf('module:') == 0 && module.indexOf('.') !== -1) {
doclet.longname = doclet.longname.replace(module, module.replace('.', '~'));
}
}
};