first commit
This commit is contained in:
commit
058104b10f
59 changed files with 14719 additions and 0 deletions
10
templates/initi/tmpl/augments.tmpl
Normal file
10
templates/initi/tmpl/augments.tmpl
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
?>
|
||||
|
||||
<?js if (data.augments && data.augments.length) { ?>
|
||||
<ul class="extends"><?js data.augments.forEach(function(a) { ?>
|
||||
<li><?js= self.linkto(a, a) ?></li>
|
||||
<?js }) ?></ul>
|
||||
<?js } ?>
|
195
templates/initi/tmpl/container.tmpl
Normal file
195
templates/initi/tmpl/container.tmpl
Normal file
|
@ -0,0 +1,195 @@
|
|||
<?js
|
||||
var self = this;
|
||||
var isGlobalPage;
|
||||
|
||||
docs.forEach(function(doc, i) {
|
||||
?>
|
||||
|
||||
<?js
|
||||
// we only need to check this once
|
||||
if (typeof isGlobalPage === 'undefined') {
|
||||
isGlobalPage = (doc.kind === 'globalobj');
|
||||
}
|
||||
?>
|
||||
<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
|
||||
<?js= self.partial('mainpage.tmpl', doc) ?>
|
||||
<?js } else if (doc.kind === 'source') { ?>
|
||||
<?js= self.partial('source.tmpl', doc) ?>
|
||||
<?js } else { ?>
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<?js if (!doc.longname || doc.kind !== 'module') { ?>
|
||||
<h2><?js if (doc.attribs) { ?><span class="attribs"><?js= doc.attribs ?></span><?js }
|
||||
if (doc.ancestors && doc.ancestors.length) { ?>
|
||||
<span class="ancestors"><?js= doc.ancestors.join('') ?></span><?js
|
||||
}
|
||||
?><?js= doc.name ?><?js
|
||||
if (doc.variation) { ?>
|
||||
<sup class="variation"><?js= doc.variation ?></sup><?js }
|
||||
if (doc.signature && !doc.hideconstructor) { ?><?js= doc.signature ?><?js } ?></h2>
|
||||
<?js if (doc.classdesc) { ?>
|
||||
<div class="class-description"><?js= doc.classdesc ?></div>
|
||||
<?js } ?>
|
||||
<?js } else if (doc.kind === 'module' && doc.modules) { ?>
|
||||
<?js doc.modules.forEach(function(module) { ?>
|
||||
<?js if (module.classdesc) { ?>
|
||||
<div class="class-description"><?js= module.classdesc ?></div>
|
||||
<?js } ?>
|
||||
<?js }) ?>
|
||||
<?js } ?>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
<?js if (doc.kind === 'module' && doc.modules) { ?>
|
||||
<?js if (doc.description) { ?>
|
||||
<div class="description"><?js= doc.description ?></div>
|
||||
<?js } ?>
|
||||
|
||||
<?js doc.modules.forEach(function(module) { ?>
|
||||
<?js= self.partial('method.tmpl', module) ?>
|
||||
<?js }) ?>
|
||||
<?js } else if (doc.kind === 'class' || (doc.kind === 'namespace' && doc.signature)) { ?>
|
||||
<?js= self.partial('method.tmpl', doc) ?>
|
||||
<?js } else { ?>
|
||||
<?js if (doc.description) { ?>
|
||||
<div class="description"><?js= doc.description ?></div>
|
||||
<?js } ?>
|
||||
|
||||
<?js= self.partial('details.tmpl', doc) ?>
|
||||
|
||||
<?js if (doc.examples && doc.examples.length) { ?>
|
||||
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
|
||||
<?js= self.partial('examples.tmpl', doc.examples) ?>
|
||||
<?js } ?>
|
||||
<?js } ?>
|
||||
</div>
|
||||
|
||||
<?js if (doc.augments && doc.augments.length) { ?>
|
||||
<h3 class="subsection-title">Extends</h3>
|
||||
|
||||
<?js= self.partial('augments.tmpl', doc) ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (doc.requires && doc.requires.length) { ?>
|
||||
<h3 class="subsection-title">Requires</h3>
|
||||
|
||||
<ul><?js doc.requires.forEach(function(r) { ?>
|
||||
<li><?js= self.linkto(r, r) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var classes = self.find({kind: 'class', memberof: doc.longname});
|
||||
if (!isGlobalPage && classes && classes.length) {
|
||||
?>
|
||||
<h3 class="subsection-title">Classes</h3>
|
||||
|
||||
<dl class="article-sub-classes"><?js classes.forEach(function(c) { ?>
|
||||
<dt><?js= self.linkto(c.longname, c.name) ?></dt>
|
||||
<dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd>
|
||||
<?js }); ?></dl>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var interfaces = self.find({kind: 'interface', memberof: doc.longname});
|
||||
if (!isGlobalPage && interfaces && interfaces.length) {
|
||||
?>
|
||||
<h3 class="subsection-title">Interfaces</h3>
|
||||
|
||||
<dl><?js interfaces.forEach(function(i) { ?>
|
||||
<dt><?js= self.linkto(i.longname, i.name) ?></dt>
|
||||
<dd><?js if (i.summary) { ?><?js= i.summary ?><?js } ?></dd>
|
||||
<?js }); ?></dl>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var mixins = self.find({kind: 'mixin', memberof: doc.longname});
|
||||
if (!isGlobalPage && mixins && mixins.length) {
|
||||
?>
|
||||
<h3 class="subsection-title">Mixins</h3>
|
||||
|
||||
<dl><?js mixins.forEach(function(m) { ?>
|
||||
<dt><?js= self.linkto(m.longname, m.name) ?></dt>
|
||||
<dd><?js if (m.summary) { ?><?js= m.summary ?><?js } ?></dd>
|
||||
<?js }); ?></dl>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
|
||||
if (!isGlobalPage && namespaces && namespaces.length) {
|
||||
?>
|
||||
<h3 class="subsection-title">Namespaces</h3>
|
||||
|
||||
<dl><?js namespaces.forEach(function(n) { ?>
|
||||
<dt><?js= self.linkto(n.longname, n.name) ?></dt>
|
||||
<dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd>
|
||||
<?js }); ?></dl>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var members = self.find({kind: 'member', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
|
||||
|
||||
// symbols that are assigned to module.exports are not globals, even though they're not a memberof anything
|
||||
if (isGlobalPage && members && members.length && members.forEach) {
|
||||
members = members.filter(function(m) {
|
||||
return m.longname && m.longname.indexOf('module:') !== 0;
|
||||
});
|
||||
}
|
||||
if (members && members.length && members.forEach) {
|
||||
?>
|
||||
<h3 class="subsection-title">Members</h3>
|
||||
|
||||
<?js members.forEach(function(p) { ?>
|
||||
<?js= self.partial('members.tmpl', p) ?>
|
||||
<?js }); ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
|
||||
if (methods && methods.length && methods.forEach) {
|
||||
?>
|
||||
<h3 class="subsection-title methods">Methods</h3>
|
||||
<?js methods.forEach(function(m) { ?>
|
||||
<?js= self.partial('method.tmpl', m) ?>
|
||||
<?js }); ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
|
||||
if (typedefs && typedefs.length && typedefs.forEach) {
|
||||
?>
|
||||
<h3 class="subsection-title">Type Definitions</h3>
|
||||
|
||||
<?js typedefs.forEach(function(e) {
|
||||
if (e.signature) {
|
||||
?>
|
||||
<?js= self.partial('method.tmpl', e) ?>
|
||||
<?js
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<?js= self.partial('members.tmpl', e) ?>
|
||||
<?js
|
||||
}
|
||||
}); ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
|
||||
if (events && events.length && events.forEach) {
|
||||
?>
|
||||
<h3 class="subsection-title">Events</h3>
|
||||
|
||||
<?js events.forEach(function(e) { ?>
|
||||
<?js= self.partial('method.tmpl', e) ?>
|
||||
<?js }); ?>
|
||||
<?js } ?>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
<?js } ?>
|
||||
|
||||
<?js }); ?>
|
143
templates/initi/tmpl/details.tmpl
Normal file
143
templates/initi/tmpl/details.tmpl
Normal file
|
@ -0,0 +1,143 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
var defaultObjectClass = '';
|
||||
|
||||
// Check if the default value is an object or array; if so, apply code highlighting
|
||||
if (data.defaultvalue && (data.defaultvaluetype === 'object' || data.defaultvaluetype === 'array')) {
|
||||
data.defaultvalue = "<pre class=\"prettyprint\"><code>" + data.defaultvalue + "</code></pre>";
|
||||
defaultObjectClass = ' class="object-value"';
|
||||
}
|
||||
?>
|
||||
<?js
|
||||
var properties = data.properties;
|
||||
if (properties && properties.length && properties.forEach && !data.hideconstructor) {
|
||||
?>
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<?js= this.partial('properties.tmpl', data) ?>
|
||||
|
||||
<?js } ?>
|
||||
|
||||
<dl class="details">
|
||||
|
||||
<?js if (data.version) {?>
|
||||
<dt class="tag-version">Version:</dt>
|
||||
<dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.since) {?>
|
||||
<dt class="tag-since">Since:</dt>
|
||||
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></li></ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.inherited && data.inherits && !data.overrides) { ?>
|
||||
<dt class="inherited-from">Inherited From:</dt>
|
||||
<dd class="inherited-from"><ul class="dummy"><li>
|
||||
<?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?>
|
||||
</li></ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.overrides) { ?>
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<?js= this.linkto(data.overrides, this.htmlsafe(data.overrides)) ?>
|
||||
</li></ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.implementations && data.implementations.length) { ?>
|
||||
<dt class="implementations">Implementations:</dt>
|
||||
<dd class="implementations"><ul>
|
||||
<?js data.implementations.forEach(function(impl) { ?>
|
||||
<li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
|
||||
<?js }); ?>
|
||||
</ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.implements && data.implements.length) { ?>
|
||||
<dt class="implements">Implements:</dt>
|
||||
<dd class="implements"><ul>
|
||||
<?js data.implements.forEach(function(impl) { ?>
|
||||
<li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
|
||||
<?js }); ?>
|
||||
</ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.mixes && data.mixes.length) { ?>
|
||||
<dt class="mixes">Mixes In:</dt>
|
||||
|
||||
<dd class="mixes"><ul>
|
||||
<?js data.mixes.forEach(function(a) { ?>
|
||||
<li><?js= self.linkto(a, a) ?></li>
|
||||
<?js }); ?>
|
||||
</ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.deprecated) { ?>
|
||||
<dt class="important tag-deprecated">Deprecated:</dt><?js
|
||||
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
|
||||
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li></ul></dd><?js }
|
||||
?>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.author && author.length) {?>
|
||||
<dt class="tag-author">Author:</dt>
|
||||
<dd class="tag-author">
|
||||
<ul><?js author.forEach(function(a) { ?>
|
||||
<li><?js= self.resolveAuthorLinks(a) ?></li>
|
||||
<?js }); ?></ul>
|
||||
</dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.copyright) {?>
|
||||
<dt class="tag-copyright">Copyright:</dt>
|
||||
<dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.license) {?>
|
||||
<dt class="tag-license">License:</dt>
|
||||
<dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.defaultvalue) {?>
|
||||
<dt class="tag-default">Default Value:</dt>
|
||||
<dd class="tag-default"><ul class="dummy">
|
||||
<li<?js= defaultObjectClass ?>><?js= data.defaultvalue ?></li>
|
||||
</ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.meta && self.outputSourceFiles) {?>
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<?js= self.linkto(meta.shortpath) ?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'line' + meta.lineno) ?>
|
||||
</li></ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.tutorials && tutorials.length) {?>
|
||||
<dt class="tag-tutorial">Tutorials:</dt>
|
||||
<dd class="tag-tutorial">
|
||||
<ul><?js tutorials.forEach(function(t) { ?>
|
||||
<li><?js= self.tutoriallink(t) ?></li>
|
||||
<?js }); ?></ul>
|
||||
</dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.see && see.length) {?>
|
||||
<dt class="tag-see">See:</dt>
|
||||
<dd class="tag-see">
|
||||
<ul><?js see.forEach(function(s) { ?>
|
||||
<li><?js= self.linkto(s) ?></li>
|
||||
<?js }); ?></ul>
|
||||
</dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.todo && todo.length) {?>
|
||||
<dt class="tag-todo">To Do:</dt>
|
||||
<dd class="tag-todo">
|
||||
<ul><?js todo.forEach(function(t) { ?>
|
||||
<li><?js= t ?></li>
|
||||
<?js }); ?></ul>
|
||||
</dd>
|
||||
<?js } ?>
|
||||
</dl>
|
2
templates/initi/tmpl/example.tmpl
Normal file
2
templates/initi/tmpl/example.tmpl
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?js var data = obj; ?>
|
||||
<pre><code><?js= data ?></code></pre>
|
13
templates/initi/tmpl/examples.tmpl
Normal file
13
templates/initi/tmpl/examples.tmpl
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
|
||||
data.forEach(function(example) {
|
||||
if (example.caption) {
|
||||
?>
|
||||
<p class="code-caption"><?js= example.caption ?></p>
|
||||
<?js } ?>
|
||||
<pre class="prettyprint"><code><?js= self.htmlsafe(example.code) ?></code></pre>
|
||||
<?js
|
||||
});
|
||||
?>
|
32
templates/initi/tmpl/exceptions.tmpl
Normal file
32
templates/initi/tmpl/exceptions.tmpl
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
?>
|
||||
<?js if (data.description && data.type && data.type.names) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<div class="param-desc">
|
||||
<?js= data.description ?>
|
||||
</div>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
<?js= this.partial('type.tmpl', data.type.names) ?>
|
||||
</dd>
|
||||
</dl>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<?js } else { ?>
|
||||
<div class="param-desc">
|
||||
<?js if (data.description) { ?>
|
||||
<?js= data.description ?>
|
||||
<?js } else if (data.type && data.type.names) { ?>
|
||||
<?js= this.partial('type.tmpl', data.type.names) ?>
|
||||
<?js } ?>
|
||||
</div>
|
||||
<?js } ?>
|
38
templates/initi/tmpl/layout.tmpl
Normal file
38
templates/initi/tmpl/layout.tmpl
Normal file
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: <?js= title ?></title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title"><?js= title ?></h1>
|
||||
|
||||
<?js= content ?>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<?js= this.nav ?>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc <?js= env.version.number ?></a><?js if(env.conf.templates && env.conf.templates.default && env.conf.templates.default.includeDate !== false) { ?> on <?js= (new Date()) ?><?js } ?>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
14
templates/initi/tmpl/mainpage.tmpl
Normal file
14
templates/initi/tmpl/mainpage.tmpl
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
?>
|
||||
|
||||
<?js if (data.kind === 'package') { ?>
|
||||
<h3><?js= data.name ?> <?js= data.version ?></h3>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.readme) { ?>
|
||||
<section>
|
||||
<article><?js= data.readme ?></article>
|
||||
</section>
|
||||
<?js } ?>
|
38
templates/initi/tmpl/members.tmpl
Normal file
38
templates/initi/tmpl/members.tmpl
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
?>
|
||||
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + (data.signature ? data.signature : '') ?></h4>
|
||||
|
||||
<?js if (data.summary) { ?>
|
||||
<p class="summary"><?js= summary ?></p>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.description) { ?>
|
||||
<div class="description">
|
||||
<?js= data.description ?>
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.type && data.type.names) {?>
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
<?js= self.partial('type.tmpl', data.type.names) ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js= this.partial('details.tmpl', data) ?>
|
||||
|
||||
<?js if (data.fires && fires.length) { ?>
|
||||
<h5>Fires:</h5>
|
||||
<ul><?js fires.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.examples && examples.length) { ?>
|
||||
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
||||
<?js= this.partial('examples.tmpl', examples) ?>
|
||||
<?js } ?>
|
120
templates/initi/tmpl/method.tmpl
Normal file
120
templates/initi/tmpl/method.tmpl
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
console.log("!!!!!!!!!!!!!!! sdfasdfasdfasdf !!!!!!!!!!!!!!!!!");
|
||||
?>
|
||||
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
||||
<?js if (data.kind === 'class' && data.classdesc) { ?>
|
||||
<h2>Constructor</h2>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.kind !== 'namespace') { ?>
|
||||
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '')
|
||||
+ "<span class='method-name'>" + name + "</span>" + (data.signature || '') ?></h4>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.summary) { ?>
|
||||
<p class="summary"><?js= summary ?></p>
|
||||
<?js } ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.kind !== 'module' && data.description && !data.hideconstructor) { ?>
|
||||
<div class="description">
|
||||
<?js= data.description ?>
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.augments && data.alias && data.alias.indexOf('module:') === 0) { ?>
|
||||
<h5>Extends:</h5>
|
||||
<?js= self.partial('augments.tmpl', data) ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (kind === 'event' && data.type && data.type.names) {?>
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
<?js= self.partial('type.tmpl', data.type.names) ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data['this']) { ?>
|
||||
<h5>This:</h5>
|
||||
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.params && params.length && !data.hideconstructor) { ?>
|
||||
<h5>Parameters:</h5>
|
||||
<?js= this.partial('params.tmpl', params) ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js= this.partial('details.tmpl', data) ?>
|
||||
|
||||
<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
|
||||
<h5>Requires:</h5>
|
||||
<ul><?js data.requires.forEach(function(r) { ?>
|
||||
<li><?js= self.linkto(r) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.fires && fires.length) { ?>
|
||||
<h5>Fires:</h5>
|
||||
<ul><?js fires.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.listens && listens.length) { ?>
|
||||
<h5>Listens to Events:</h5>
|
||||
<ul><?js listens.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.listeners && listeners.length) { ?>
|
||||
<h5>Listeners of This Event:</h5>
|
||||
<ul><?js listeners.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.exceptions && exceptions.length) { ?>
|
||||
<h5>Throws:</h5>
|
||||
<?js if (exceptions.length > 1) { ?><ul><?js
|
||||
exceptions.forEach(function(r) { ?>
|
||||
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
|
||||
<?js });
|
||||
?></ul><?js } else {
|
||||
exceptions.forEach(function(r) { ?>
|
||||
<?js= self.partial('exceptions.tmpl', r) ?>
|
||||
<?js });
|
||||
} } ?>
|
||||
|
||||
<?js if (data.returns && returns.length) { ?>
|
||||
|
||||
<?js if (returns.length > 1) { ?><ul><?js
|
||||
returns.forEach(function(r) { ?>
|
||||
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
||||
<?js });
|
||||
?></ul><?js } else {
|
||||
returns.forEach(function(r) { ?>
|
||||
<?js= self.partial('returns.tmpl', r) ?>
|
||||
<?js });
|
||||
} } ?>
|
||||
|
||||
<?js if (data.yields && yields.length) { ?>
|
||||
<h5>Yields:</h5>
|
||||
<?js if (yields.length > 1) { ?><ul><?js
|
||||
yields.forEach(function(r) { ?>
|
||||
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
||||
<?js });
|
||||
?></ul><?js } else {
|
||||
yields.forEach(function(r) { ?>
|
||||
<?js= self.partial('returns.tmpl', r) ?>
|
||||
<?js });
|
||||
} } ?>
|
||||
|
||||
<?js if (data.examples && examples.length) { ?>
|
||||
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
||||
<?js= this.partial('examples.tmpl', examples) ?>
|
||||
<?js } ?>
|
119
templates/initi/tmpl/method_list.tmpl
Normal file
119
templates/initi/tmpl/method_list.tmpl
Normal file
|
@ -0,0 +1,119 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
?>
|
||||
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
||||
<?js if (data.kind === 'class' && data.classdesc) { ?>
|
||||
<h2>Constructor</h2>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.kind !== 'namespace') { ?>
|
||||
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '')
|
||||
+ "<span class='method-name'>" + name + "</span>" + (data.signature || '') ?></h4>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.summary) { ?>
|
||||
<p class="summary"><?js= summary ?></p>
|
||||
<?js } ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.kind !== 'module' && data.description && !data.hideconstructor) { ?>
|
||||
<div class="description">
|
||||
<?js= data.description ?>
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.augments && data.alias && data.alias.indexOf('module:') === 0) { ?>
|
||||
<h5>Extends:</h5>
|
||||
<?js= self.partial('augments.tmpl', data) ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (kind === 'event' && data.type && data.type.names) {?>
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
<?js= self.partial('type.tmpl', data.type.names) ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data['this']) { ?>
|
||||
<h5>This:</h5>
|
||||
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.params && params.length && !data.hideconstructor) { ?>
|
||||
<h5>Parameters:</h5>
|
||||
<?js= this.partial('params.tmpl', params) ?>
|
||||
<?js } ?>
|
||||
|
||||
<?js= this.partial('details.tmpl', data) ?>
|
||||
|
||||
<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
|
||||
<h5>Requires:</h5>
|
||||
<ul><?js data.requires.forEach(function(r) { ?>
|
||||
<li><?js= self.linkto(r) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.fires && fires.length) { ?>
|
||||
<h5>Fires:</h5>
|
||||
<ul><?js fires.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.listens && listens.length) { ?>
|
||||
<h5>Listens to Events:</h5>
|
||||
<ul><?js listens.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.listeners && listeners.length) { ?>
|
||||
<h5>Listeners of This Event:</h5>
|
||||
<ul><?js listeners.forEach(function(f) { ?>
|
||||
<li><?js= self.linkto(f) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.exceptions && exceptions.length) { ?>
|
||||
<h5>Throws:</h5>
|
||||
<?js if (exceptions.length > 1) { ?><ul><?js
|
||||
exceptions.forEach(function(r) { ?>
|
||||
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
|
||||
<?js });
|
||||
?></ul><?js } else {
|
||||
exceptions.forEach(function(r) { ?>
|
||||
<?js= self.partial('exceptions.tmpl', r) ?>
|
||||
<?js });
|
||||
} } ?>
|
||||
|
||||
<?js if (data.returns && returns.length) { ?>
|
||||
|
||||
<?js if (returns.length > 1) { ?><ul><?js
|
||||
returns.forEach(function(r) { ?>
|
||||
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
||||
<?js });
|
||||
?></ul><?js } else {
|
||||
returns.forEach(function(r) { ?>
|
||||
<?js= self.partial('returns.tmpl', r) ?>
|
||||
<?js });
|
||||
} } ?>
|
||||
|
||||
<?js if (data.yields && yields.length) { ?>
|
||||
<h5>Yields:</h5>
|
||||
<?js if (yields.length > 1) { ?><ul><?js
|
||||
yields.forEach(function(r) { ?>
|
||||
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
||||
<?js });
|
||||
?></ul><?js } else {
|
||||
yields.forEach(function(r) { ?>
|
||||
<?js= self.partial('returns.tmpl', r) ?>
|
||||
<?js });
|
||||
} } ?>
|
||||
|
||||
<?js if (data.examples && examples.length) { ?>
|
||||
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
||||
<?js= this.partial('examples.tmpl', examples) ?>
|
||||
<?js } ?>
|
131
templates/initi/tmpl/params.tmpl
Normal file
131
templates/initi/tmpl/params.tmpl
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?js
|
||||
var params = obj;
|
||||
|
||||
/* sort subparams under their parent params (like opts.classname) */
|
||||
var parentParam = null;
|
||||
params.forEach(function(param, i) {
|
||||
var paramRegExp;
|
||||
|
||||
if (!param) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (parentParam && parentParam.name && param.name) {
|
||||
try {
|
||||
paramRegExp = new RegExp('^(?:' + parentParam.name + '(?:\\[\\])*)\\.(.+)$');
|
||||
}
|
||||
catch (e) {
|
||||
// there's probably a typo in the JSDoc comment that resulted in a weird
|
||||
// parameter name
|
||||
return;
|
||||
}
|
||||
|
||||
if ( paramRegExp.test(param.name) ) {
|
||||
param.name = RegExp.$1;
|
||||
parentParam.subparams = parentParam.subparams || [];
|
||||
parentParam.subparams.push(param);
|
||||
params[i] = null;
|
||||
}
|
||||
else {
|
||||
parentParam = param;
|
||||
}
|
||||
}
|
||||
else {
|
||||
parentParam = param;
|
||||
}
|
||||
});
|
||||
|
||||
/* determine if we need extra columns, "attributes" and "default" */
|
||||
params.hasAttributes = false;
|
||||
params.hasDefault = false;
|
||||
params.hasName = false;
|
||||
|
||||
params.forEach(function(param) {
|
||||
if (!param) { return; }
|
||||
|
||||
if (param.optional || param.nullable || param.variable) {
|
||||
params.hasAttributes = true;
|
||||
}
|
||||
|
||||
if (param.name) {
|
||||
params.hasName = true;
|
||||
}
|
||||
|
||||
if (typeof param.defaultvalue !== 'undefined') {
|
||||
params.hasDefault = true;
|
||||
}
|
||||
});
|
||||
?>
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
<?js if (params.hasName) {?>
|
||||
<th>Name</th>
|
||||
<?js } ?>
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
<?js if (params.hasAttributes) {?>
|
||||
<th>Attributes</th>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (params.hasDefault) {?>
|
||||
<th>Default</th>
|
||||
<?js } ?>
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?js
|
||||
var self = this;
|
||||
params.forEach(function(param) {
|
||||
if (!param) { return; }
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<?js if (params.hasName) {?>
|
||||
<td class="name"><code><?js= param.name ?></code></td>
|
||||
<?js } ?>
|
||||
|
||||
<td class="type">
|
||||
<?js if (param.type && param.type.names) {?>
|
||||
<?js= self.partial('type.tmpl', param.type.names) ?>
|
||||
<?js } ?>
|
||||
</td>
|
||||
|
||||
<?js if (params.hasAttributes) {?>
|
||||
<td class="attributes">
|
||||
<?js if (param.optional) { ?>
|
||||
<optional><br>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (param.nullable) { ?>
|
||||
<nullable><br>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (param.variable) { ?>
|
||||
<repeatable><br>
|
||||
<?js } ?>
|
||||
</td>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (params.hasDefault) {?>
|
||||
<td class="default">
|
||||
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
|
||||
<?js= self.htmlsafe(param.defaultvalue) ?>
|
||||
<?js } ?>
|
||||
</td>
|
||||
<?js } ?>
|
||||
|
||||
<td class="description last"><?js= param.description ?><?js if (param.subparams) { ?>
|
||||
<h6>Properties</h6>
|
||||
<?js= self.partial('params.tmpl', param.subparams) ?>
|
||||
<?js } ?></td>
|
||||
</tr>
|
||||
|
||||
<?js }); ?>
|
||||
</tbody>
|
||||
</table>
|
108
templates/initi/tmpl/properties.tmpl
Normal file
108
templates/initi/tmpl/properties.tmpl
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var props = data.subprops || data.properties;
|
||||
|
||||
/* sort subprops under their parent props (like opts.classname) */
|
||||
var parentProp = null;
|
||||
props.forEach(function(prop, i) {
|
||||
if (!prop) { return; }
|
||||
if ( parentProp && prop.name && prop.name.indexOf(parentProp.name + '.') === 0 ) {
|
||||
prop.name = prop.name.substr(parentProp.name.length+1);
|
||||
parentProp.subprops = parentProp.subprops || [];
|
||||
parentProp.subprops.push(prop);
|
||||
props[i] = null;
|
||||
}
|
||||
else {
|
||||
parentProp = prop;
|
||||
}
|
||||
});
|
||||
|
||||
/* determine if we need extra columns, "attributes" and "default" */
|
||||
props.hasAttributes = false;
|
||||
props.hasDefault = false;
|
||||
props.hasName = false;
|
||||
|
||||
props.forEach(function(prop) {
|
||||
if (!prop) { return; }
|
||||
|
||||
if (prop.optional || prop.nullable) {
|
||||
props.hasAttributes = true;
|
||||
}
|
||||
|
||||
if (prop.name) {
|
||||
props.hasName = true;
|
||||
}
|
||||
|
||||
if (typeof prop.defaultvalue !== 'undefined' && !data.isEnum) {
|
||||
props.hasDefault = true;
|
||||
}
|
||||
});
|
||||
?>
|
||||
|
||||
<table class="props">
|
||||
<thead>
|
||||
<tr>
|
||||
<?js if (props.hasName) {?>
|
||||
<th>Name</th>
|
||||
<?js } ?>
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
<?js if (props.hasAttributes) {?>
|
||||
<th>Attributes</th>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (props.hasDefault) {?>
|
||||
<th>Default</th>
|
||||
<?js } ?>
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?js
|
||||
var self = this;
|
||||
props.forEach(function(prop) {
|
||||
if (!prop) { return; }
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<?js if (props.hasName) {?>
|
||||
<td class="name"><code><?js= prop.name ?></code></td>
|
||||
<?js } ?>
|
||||
|
||||
<td class="type">
|
||||
<?js if (prop.type && prop.type.names) {?>
|
||||
<?js= self.partial('type.tmpl', prop.type.names) ?>
|
||||
<?js } ?>
|
||||
</td>
|
||||
|
||||
<?js if (props.hasAttributes) {?>
|
||||
<td class="attributes">
|
||||
<?js if (prop.optional) { ?>
|
||||
<optional><br>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (prop.nullable) { ?>
|
||||
<nullable><br>
|
||||
<?js } ?>
|
||||
</td>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (props.hasDefault) {?>
|
||||
<td class="default">
|
||||
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
|
||||
<?js= self.htmlsafe(prop.defaultvalue) ?>
|
||||
<?js } ?>
|
||||
</td>
|
||||
<?js } ?>
|
||||
|
||||
<td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
|
||||
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop) ?>
|
||||
<?js } ?></td>
|
||||
</tr>
|
||||
|
||||
<?js }); ?>
|
||||
</tbody>
|
||||
</table>
|
8
templates/initi/tmpl/returns.tmpl
Normal file
8
templates/initi/tmpl/returns.tmpl
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?js
|
||||
var data = obj || {};
|
||||
if (data.description) {
|
||||
?>
|
||||
<div class="param-desc">
|
||||
<?js= description ?>
|
||||
</div>
|
||||
<?js } ?>
|
8
templates/initi/tmpl/source.tmpl
Normal file
8
templates/initi/tmpl/source.tmpl
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
?>
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code><?js= data.code ?></code></pre>
|
||||
</article>
|
||||
</section>
|
19
templates/initi/tmpl/tutorial.tmpl
Normal file
19
templates/initi/tmpl/tutorial.tmpl
Normal file
|
@ -0,0 +1,19 @@
|
|||
<section>
|
||||
|
||||
<header>
|
||||
<?js if (children.length > 0) { ?>
|
||||
<ul><?js
|
||||
var self = this;
|
||||
children.forEach(function(t) { ?>
|
||||
<li><?js= self.tutoriallink(t.name) ?></li>
|
||||
<?js }); ?></ul>
|
||||
<?js } ?>
|
||||
|
||||
<h2><?js= header ?></h2>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<?js= content ?>
|
||||
</article>
|
||||
|
||||
</section>
|
7
templates/initi/tmpl/type.tmpl
Normal file
7
templates/initi/tmpl/type.tmpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?js
|
||||
var data = obj;
|
||||
var self = this;
|
||||
data.forEach(function(name, i) { ?>
|
||||
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span>
|
||||
<?js if (i < data.length-1) { ?>|<?js } ?>
|
||||
<?js }); ?>
|
Loading…
Add table
Add a link
Reference in a new issue