tui-jsdoc-template
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -12,4 +12,3 @@ /** | ||
* Create Base Class | ||
* @class | ||
* @alias tui.component.Base | ||
* @class tui.component.Base | ||
* @param {object} data - data | ||
@@ -82,5 +81,4 @@ * @param {object} data.foo - foo | ||
* BaseChild Class | ||
* @augments tui.component.Base | ||
* @constructs BaseChild | ||
* @memberOf tui.component | ||
* @extends tui.component.Base | ||
* @class tui.component.BaseChild | ||
*/ | ||
@@ -146,1 +144,41 @@ var BaseChild = function() { | ||
})(tui.component || (tui.component = {})); | ||
/** | ||
* @classdesc Toaster singleton. | ||
* @class | ||
* @hideconstructor | ||
*/ | ||
var Toaster = (function() { | ||
var instance = null; | ||
function Toaster() {} | ||
/** | ||
* Toast an item. | ||
* | ||
* @alias toast | ||
* @memberof Toaster | ||
* @instance | ||
* @param {BreadyThing} item - The item to toast. | ||
* @return {Toast} A toasted bready thing. | ||
*/ | ||
Toaster.prototype.toast = function(item) {}; | ||
return { | ||
/** | ||
* Get the Toaster instance. | ||
* | ||
* @alias Toaster.getInstance | ||
* @returns {Toaster} The Toaster instance. | ||
*/ | ||
getInstance: function() { | ||
if (instance === null) { | ||
instance = new Toaster(); | ||
delete instance.constructor; | ||
} | ||
return instance; | ||
} | ||
}; | ||
})(); |
@@ -25,2 +25,10 @@ /** | ||
/** | ||
* Typedef on MyNamespace | ||
* @typedef {object}myTypeDef | ||
* @prop {string} a - Typedef prop "a" | ||
* @prop {string} b - Typedef prop "b" | ||
* @memberof MyNamespace | ||
*/ | ||
/** | ||
@@ -27,0 +35,0 @@ * Tui namespace |
{ | ||
"name": "tui-jsdoc-template", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Toast UI JSDoc Template", | ||
@@ -31,4 +31,5 @@ "main": "publish.js", | ||
"gulp-connect": "^5.0.0", | ||
"gulp-jsdoc3": "^1.0.1" | ||
"gulp-jsdoc3": "^1.0.1", | ||
"jsdoc": "^3.5.3" | ||
} | ||
} |
@@ -28,3 +28,2 @@ 'use strict'; | ||
env.conf.templates = _.extend({ | ||
@@ -49,3 +48,7 @@ useCollapsibles: true | ||
function tutoriallink(tutorial) { | ||
return helper.toTutorial(tutorial, null, { tag: 'em', classname: 'disabled', prefix: 'Tutorial: ' }); | ||
return helper.toTutorial(tutorial, null, { | ||
tag: 'em', | ||
classname: 'disabled', | ||
prefix: 'Tutorial: ' | ||
}); | ||
} | ||
@@ -58,7 +61,11 @@ | ||
function hashToLink(doclet, hash) { | ||
if ( !/^(#.+)/.test(hash) ) { return hash; } | ||
var url; | ||
var url = helper.createLink(doclet); | ||
if ( !/^(#.+)/.test(hash) ) { | ||
return hash; | ||
} | ||
url = helper.createLink(doclet); | ||
url = url.replace(/(#.+|$)/, hash); | ||
return '<a href="' + url + '">' + hash + '</a>'; | ||
@@ -173,2 +180,3 @@ } | ||
var returnTypesString = ''; | ||
var source = f.yields || f.returns; | ||
@@ -178,4 +186,4 @@ // jam all the return-type attributes into an array. this could create odd results (for example, | ||
// who use multiple @return tags aren't using Closure Compiler type annotations, and vice-versa. | ||
if (f.returns) { | ||
f.returns.forEach(function(item) { | ||
if (source) { | ||
source.forEach(function(item) { | ||
helper.getAttribs(item).forEach(function(attrib) { | ||
@@ -191,3 +199,3 @@ if (attribs.indexOf(attrib) === -1) { | ||
if (f.returns) { | ||
if (source) { | ||
returnTypes = addNonParamAttributes(f.returns); | ||
@@ -238,5 +246,9 @@ } | ||
function generate(title, docs, filename, resolveLinks) { | ||
var docData; | ||
var html; | ||
var outpath; | ||
resolveLinks = resolveLinks === false ? false : true; | ||
var docData = { | ||
docData = { | ||
env: env, | ||
@@ -249,4 +261,4 @@ isTutorial: false, | ||
var outpath = path.join(outdir, filename), | ||
html = view.render('container.tmpl', docData); | ||
outpath = path.join(outdir, filename); | ||
html = view.render('container.tmpl', docData); | ||
@@ -399,2 +411,4 @@ if (resolveLinks) { | ||
} | ||
itemsSeen[item.longname] = true; | ||
}); | ||
@@ -453,2 +467,5 @@ | ||
var seenTutorials = {}; | ||
var classesToShow = members.classes.filter(function(classItem) { // To support "@hideconstructor" | ||
return !classItem.hideconstructor; | ||
}); | ||
@@ -458,3 +475,3 @@ nav += buildMemberNav(members.tutorials, tutorialsName, seenTutorials, linktoTutorial, true); | ||
nav += buildMemberNav(members.externals, 'Externals', seen, linktoExternal); | ||
nav += buildMemberNav(members.classes, 'Classes', seen, linkto); | ||
nav += buildMemberNav(classesToShow, 'Classes', seen, linkto); | ||
nav += buildMemberNav(members.namespaces, 'Namespaces', seen, linkto); | ||
@@ -691,2 +708,3 @@ nav += buildMemberNav(members.mixins, 'Mixins', seen, linkto); | ||
var members = helper.getMembers(data); | ||
members.tutorials = tutorials.children; | ||
@@ -774,3 +792,3 @@ | ||
var tutorialData = { | ||
docs: null, // Erros in layout.tmpl if docs property does not exist. (For left-nav member listing control) | ||
docs: null, // If there is no "docs" prop, Erros in layout.tmpl. (For left-nav member listing control) | ||
isTutorial: true, | ||
@@ -777,0 +795,0 @@ env: env, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
609264
2910
5