docs: add services, utilities

This commit is contained in:
Andy Joslin
2014-03-11 13:02:36 -06:00
parent a8e1524ce8
commit e9625ded9d
25 changed files with 629 additions and 158 deletions

View File

@@ -18,5 +18,8 @@ module.exports = [
},
{
name: 'codepen'
},
{
name: 'alias'
}
];

View File

@@ -3,22 +3,23 @@
<@ block content @>
<@ block header @>
<@ if doc.docType == "directive" @>
<h2><$ doc.name | dashCase $>
<@ if doc.parent @>
<small>
(child of <$ doc.parent $>)
</small>
<@ endif @>
<@ if doc.controller @>
<small>
(controller: <$ doc.controller $>)
</small>
<@ endif @>
<h2>
<@ if doc.docType == "directive" @>
<$ doc.name | dashCase $>
<@ else @>
<$ doc.name $>
<@ endif @>
<@ if doc.parent @>
<small>
(child of <$ doc.parent $>)
</small>
<@ endif @>
<@ if doc.controller @>
<small>
(controller: <$ doc.controller $>)
</small>
<@ endif @>
</h2>
<@ else @>
## <$ doc.name $>
<@ endif @>
<@ if doc.codepen @>
{% include codepen.html id="<$ doc.codepen $>" %}

View File

@@ -46,12 +46,10 @@
<@- endif @>
<@ endblock -@>
<h2 id="api" style="clear:both;">API</h2>
<@ if doc.params @>
<h2 id="api" style="clear:both;">API</h2>
<$ paramTable(doc.params, true) $>
<@ else @>
No options available.
<@ endif @>
<@ include "lib/events.template.html" @>

View File

@@ -0,0 +1,9 @@
<@ extends "api/object.template.html" @>
<@ block related_components @>
<@ if doc.providerDoc -@>
<li>
<a href="<$ doc.providerDoc.path $>">- <$ doc.providerDoc.name $></a>
</li>
<@- endif @>
<@ endblock @>

View File

@@ -4,7 +4,7 @@
<@- endmacro -@>
<@ macro paramTable(params, isDirective) @>
<table class="table">
<table class="table" style="margin:0;">
<thead>
<tr>
<th><@ if isDirective @>Attr<@ else @>Param<@ endif @></th>
@@ -42,11 +42,11 @@
<@- macro functionSyntax(fn) @>
<@- set sep = joiner(', ') -@>
`<$ fn.name $>(<@- for param in fn.params @><$ sep() $>
<@- if param.type.optional @>[<@ endif -@>
<$ param.name $>
<@- if param.type.optional @>]<@ endif -@>
<@ endfor @>)`
<code><$ fn.name $>(<@- for param in fn.params @><$ sep() $>
<@- if param.type.optional @>[<@ endif -@>
<$ param.name $>
<@- if param.type.optional @>]<@ endif -@>
<@ endfor @>)</code><@ if fn.alias @><small>(alias: <$ fn.alias $>)</small><@ endif @>
<@ endmacro -@>
<@- macro typeInfo(fn) -@>

View File

@@ -3,7 +3,9 @@
<@- for method in doc.methods @>
<div id="<$ method.name $>"></div>
### <$ functionSyntax(method) $>
<h2>
<$ functionSyntax(method) $>
</h2>
<$ method.description $>