From 0b21d1a6fcf5fdb719abe28e441289635dacc048 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 23 Oct 2018 18:01:46 +0200 Subject: [PATCH] Document anonymous default exports --- config/jsdoc/api/plugins/api.js | 3 +++ config/jsdoc/api/template/tmpl/members.tmpl | 6 +++--- config/jsdoc/api/template/tmpl/navigation.tmpl | 11 +++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/config/jsdoc/api/plugins/api.js b/config/jsdoc/api/plugins/api.js index eab6a0bf94..0f1788dba8 100644 --- a/config/jsdoc/api/plugins/api.js +++ b/config/jsdoc/api/plugins/api.js @@ -106,6 +106,9 @@ exports.handlers = { if (doclet.kind == 'class') { modules[doclet.longname.split('~').shift()] = true; classes[doclet.longname] = doclet; + if (doclet.name === doclet.longname && !doclet.memberof) { + // Make sure anonymous default exports are documented + doclet.setMemberof(doclet.longname); } }, diff --git a/config/jsdoc/api/template/tmpl/members.tmpl b/config/jsdoc/api/template/tmpl/members.tmpl index 280556e3a5..243e1f22cd 100644 --- a/config/jsdoc/api/template/tmpl/members.tmpl +++ b/config/jsdoc/api/template/tmpl/members.tmpl @@ -14,7 +14,7 @@ if (data.type && data.type.names) {

- +

@@ -28,9 +28,9 @@ if (data.type && data.type.names) { - + - +
Example 1? 's':'' ?>
diff --git a/config/jsdoc/api/template/tmpl/navigation.tmpl b/config/jsdoc/api/template/tmpl/navigation.tmpl index f57d604640..cfa91d196a 100644 --- a/config/jsdoc/api/template/tmpl/navigation.tmpl +++ b/config/jsdoc/api/template/tmpl/navigation.tmpl @@ -1,5 +1,8 @@