clean-jsdoc-theme 4.2.1 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/publish.js +18 -16
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# clean-jsdoc-theme
|
|
2
2
|
|
|
3
|
-
[](https://github.com/ankitskvmdam/clean-jsdoc-theme) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/fork) ](https://github.com/ankitskvmdam/clean-jsdoc-theme) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/fork)  [](https://github.com/ankitskvmdam/clean-jsdoc-theme/issues) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/graphs/contributors) [](https://travis-ci.org/ankitskvmdam/clean-jsdoc-theme) [](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/master/LICENSE)
|
|
4
4
|
<br>
|
|
5
5
|
|
|
6
6
|
`clean-jsdoc-theme` is a beautifully crafted theme for JSDoc 3/JSDoc 4. It is a clean and fully responsive theme with loads of
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clean-jsdoc-theme",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "A beautifully crafted theme/template for JSDoc 3. This theme/template looks and feels like a premium theme/template. This is a fully mobile responsive theme and also fully customizable theme.",
|
|
5
5
|
"main": "publish.js",
|
|
6
6
|
"scripts": {
|
package/publish.js
CHANGED
|
@@ -101,7 +101,7 @@ function needsSignature({ kind, type, meta }) {
|
|
|
101
101
|
|
|
102
102
|
// typedefs that contain functions get a signature, too
|
|
103
103
|
else if (kind === 'typedef' && type && type.names && type.names.length) {
|
|
104
|
-
for (
|
|
104
|
+
for (let i = 0, l = type.names.length; i < l; i++) {
|
|
105
105
|
if (type.names[i].toLowerCase() === 'function') {
|
|
106
106
|
needsSig = true;
|
|
107
107
|
break;
|
|
@@ -179,7 +179,7 @@ function buildAttribsString(attribs) {
|
|
|
179
179
|
let attribsString = '';
|
|
180
180
|
|
|
181
181
|
if (attribs && attribs.length) {
|
|
182
|
-
htmlsafe(`(${attribs.join(', ')}) `);
|
|
182
|
+
attribsString = htmlsafe(`(${attribs.join(', ')}) `);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
return attribsString;
|
|
@@ -232,7 +232,8 @@ function addSignatureReturns(f) {
|
|
|
232
232
|
)}}`;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
|
|
236
|
+
let signatureOutput = '';
|
|
236
237
|
|
|
237
238
|
if (f.signature) {
|
|
238
239
|
signatureOutput =
|
|
@@ -244,6 +245,7 @@ function addSignatureReturns(f) {
|
|
|
244
245
|
}
|
|
245
246
|
|
|
246
247
|
f.signature = signatureOutput;
|
|
248
|
+
|
|
247
249
|
}
|
|
248
250
|
|
|
249
251
|
function addSignatureTypes(f) {
|
|
@@ -409,7 +411,7 @@ function buildSidebarMembers({
|
|
|
409
411
|
children: [],
|
|
410
412
|
};
|
|
411
413
|
|
|
412
|
-
|
|
414
|
+
const methods =
|
|
413
415
|
sectionName === SECTION_TYPE.Tutorials ||
|
|
414
416
|
sectionName === SECTION_TYPE.Global
|
|
415
417
|
? []
|
|
@@ -444,11 +446,11 @@ function buildSidebarMembers({
|
|
|
444
446
|
|
|
445
447
|
currentItem.children.push(itemChild);
|
|
446
448
|
|
|
447
|
-
|
|
449
|
+
let name = method.longname.split(
|
|
448
450
|
method.scope === 'static' ? '.' : '#'
|
|
449
451
|
);
|
|
450
|
-
|
|
451
|
-
|
|
452
|
+
const first = name[0];
|
|
453
|
+
const last = name[1];
|
|
452
454
|
|
|
453
455
|
name = first + ' ▸ ' + last;
|
|
454
456
|
|
|
@@ -510,11 +512,11 @@ function buildNavbar() {
|
|
|
510
512
|
* @return {string} The HTML for the navigation sidebar.
|
|
511
513
|
*/
|
|
512
514
|
function buildSidebar(members) {
|
|
513
|
-
|
|
515
|
+
const title = themeOpts.title || 'Home';
|
|
514
516
|
|
|
515
|
-
|
|
517
|
+
const isHTML = RegExp.prototype.test.bind(/(<([^>]+)>)/i);
|
|
516
518
|
|
|
517
|
-
|
|
519
|
+
const nav = {
|
|
518
520
|
sections: [],
|
|
519
521
|
};
|
|
520
522
|
|
|
@@ -530,13 +532,13 @@ function buildSidebar(members) {
|
|
|
530
532
|
};
|
|
531
533
|
}
|
|
532
534
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
535
|
+
const seen = {};
|
|
536
|
+
const seenTutorials = {};
|
|
537
|
+
const seenGlobal = {};
|
|
536
538
|
|
|
537
|
-
|
|
539
|
+
const sectionsOrder = themeOpts.sections || defaultSections;
|
|
538
540
|
|
|
539
|
-
|
|
541
|
+
const sections = {
|
|
540
542
|
[SECTION_TYPE.Modules]: buildSidebarMembers({
|
|
541
543
|
itemHeading: 'Modules',
|
|
542
544
|
items: members.modules,
|
|
@@ -614,7 +616,7 @@ function buildSidebar(members) {
|
|
|
614
616
|
if (SECTION_TYPE[section] !== undefined) {
|
|
615
617
|
nav.sections.push(sections[section]);
|
|
616
618
|
} else {
|
|
617
|
-
|
|
619
|
+
const errorMsg = `While building nav. Section name: ${section} is not recognized.
|
|
618
620
|
Accepted sections are: ${defaultSections.join(', ')}
|
|
619
621
|
`;
|
|
620
622
|
|