Skip to content

Commit

Permalink
Build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
okuryu committed Aug 15, 2015
1 parent ba699fb commit f7f117a
Show file tree
Hide file tree
Showing 35 changed files with 912 additions and 195 deletions.
2 changes: 1 addition & 1 deletion docs/args/partials/help.mustache
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

YUI Doc generates API documentation from a modified JavaDoc syntax.

Current version (0.8.1)
Current version (0.9.0)

Usage: yuidoc <options> <input path>

Expand Down
3 changes: 2 additions & 1 deletion output/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ YUI.add("yuidoc-meta", function(Y) {
"name": "yuidoc",
"description": "This is the __module__ description for the `YUIDoc` module.\n\n var options = {\n paths: [ './lib' ],\n outdir: './out'\n };\n\n var Y = require('yuidocjs');\n var json = (new Y.YUIDoc(options)).run();"
}
]
],
"elements": []
} };
});
6 changes: 5 additions & 1 deletion output/api/assets/js/api-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Y.APIFilter = Y.Base.create('apiFilter', Y.Base, [Y.AutoCompleteBase], {
}
});

if (this.get('queryType') === 'elements') {
name = '&lt;' + name + '&gt;';
}

return name;
}

Expand All @@ -24,7 +28,7 @@ Y.APIFilter = Y.Base.create('apiFilter', Y.Base, [Y.AutoCompleteBase], {
value: 'phraseMatch'
},

// May be set to "classes" or "modules".
// May be set to "classes", "elements" or "modules".
queryType: {
value: 'classes'
},
Expand Down
8 changes: 6 additions & 2 deletions output/api/assets/js/api-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var Lang = Y.Lang,
APIList = Y.namespace('APIList'),

classesNode = Y.one('#api-classes'),
elementsNode = Y.one('#api-elements'),
inputNode = Y.one('#api-filter'),
modulesNode = Y.one('#api-modules'),
tabviewNode = Y.one('#api-tabview'),
Expand Down Expand Up @@ -97,15 +98,17 @@ tabview.get('panelNode').all('a').each(function (link) {

// -- Private Functions --------------------------------------------------------
function getFilterResultNode() {
return filter.get('queryType') === 'classes' ? classesNode : modulesNode;
var queryType = filter.get('queryType');
return queryType === 'classes' ? classesNode
: queryType === 'elements' ? elementsNode : modulesNode;
}

// -- Event Handlers -----------------------------------------------------------
function onFilterResults(e) {
var frag = Y.one(Y.config.doc.createDocumentFragment()),
resultNode = getFilterResultNode(),
typePlural = filter.get('queryType'),
typeSingular = typePlural === 'classes' ? 'class' : 'module';
typeSingular = typePlural === 'classes' ? 'class' : typePlural === 'elements' ? 'element' : 'module';

if (e.results.length) {
YArray.each(e.results, function (result) {
Expand Down Expand Up @@ -181,6 +184,7 @@ function onTabSelectionChange(e) {
};

switch (name) {
case 'elements':// fallthru
case 'classes': // fallthru
case 'modules':
filter.setAttrs({
Expand Down
8 changes: 7 additions & 1 deletion output/api/assets/js/apidocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ pjax = new Y.Pjax({
callbacks: defaultRoute
},

// -- /elements/* -------------------------------------------------------
{
path : '/elements/:element.html*',
callbacks: defaultRoute
},

// -- /classes/* -------------------------------------------------------
{
path : '/classes/:class.html*',
Expand Down Expand Up @@ -167,7 +173,7 @@ pjax.initLineNumbers = function () {
};

pjax.initRoot = function () {
var terminators = /^(?:classes|files|modules)$/,
var terminators = /^(?:classes|files|elements|modules)$/,
parts = pjax._getPathRoot().split('/'),
root = [],
i, len, part;
Expand Down
3 changes: 2 additions & 1 deletion output/api/classes/CLI.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1><img src="../assets/css/logo.png" title="yuidoc-root" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 0.8.1</em>
<em>API Docs for: 0.9.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
Expand Down Expand Up @@ -51,6 +51,7 @@ <h2 class="off-left">APIs</h2>
<li><a href="../classes/YUIDoc.html">YUIDoc</a></li>
</ul>


<ul id="api-modules" class="apis modules">
<li><a href="../modules/yuidoc.html">yuidoc</a></li>
</ul>
Expand Down
Loading

0 comments on commit f7f117a

Please sign in to comment.