[ADF-3040] Replaced doc template engine to fix whitespace issues (#3356)

This commit is contained in:
Andy Stark
2018-05-21 15:54:22 +01:00
committed by Eugenio Romano
parent c63dee50f1
commit 0e64efc4e2
17 changed files with 96 additions and 94 deletions

View File

@@ -1,23 +0,0 @@
{% if hasInputs %}
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
{% each properties as prop %}
{% if prop.isInput %}
| {{{prop.name}}} | `{{{prop.type}}}` | {{{prop.defaultValue}}} | {{{prop.docText}}} |
{% endif %}
{% endeach %}
{% endif %}
{% if hasOutputs%}
### Events
| Name | Type | Description |
| -- | -- | -- |
{% each properties as prop %}
{% if prop.isOutput %}
| {{prop.name}} | `{{{prop.type}}}` | {{{prop.docText}}} |
{% endif %}
{% endeach %}
{% endif %}

23
tools/doc/templates/component.ejs vendored Normal file
View File

@@ -0,0 +1,23 @@
<% if (hasInputs) { %>
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
<% properties.forEach(function(prop) { -%>
<% if (prop.isInput) { -%>
| <%= prop.name %> | `<%- prop.type %>` | <%= prop.defaultValue %> | <%= prop.docText %> |
<% } -%>
<% }) -%>
<% } %>
<% if (hasOutputs) { %>
### Events
| Name | Type | Description |
| -- | -- | -- |
<% properties.forEach(function(prop) { %>
<% if (prop.isOutput) { %>
| <%= prop.name %> | `<%- prop.type %>` | <%= prop.docText %> |
<% } %>
<% }) %>
<% } %>

View File

@@ -1,23 +0,0 @@
{% if hasInputs %}
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
{% each properties as prop %}
{% if prop.isInput %}
| {{{prop.name}}} | `{{{prop.type}}}` | {{{prop.defaultValue}}} | {{{prop.docText}}} |
{% endif %}
{% endeach %}
{% endif %}
{% if hasOutputs%}
### Events
| Name | Type | Description |
| -- | -- | -- |
{% each properties as prop %}
{% if prop.isOutput %}
| {{prop.name}} | `{{{prop.type}}}` | {{{prop.docText}}} |
{% endif %}
{% endeach %}
{% endif %}

23
tools/doc/templates/directive.ejs vendored Normal file
View File

@@ -0,0 +1,23 @@
<% if (hasInputs) { %>
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
<% properties.forEach(function(prop) { -%>
<% if (prop.isInput) { -%>
| <%= prop.name %> | `<%- prop.type %>` | <%= prop.defaultValue %> | <%= prop.docText %> |
<% } -%>
<% }) -%>
<% } %>
<% if (hasOutputs) { %>
### Events
| Name | Type | Description |
| -- | -- | -- |
<% properties.forEach(function(prop) { %>
<% if (prop.isOutput) { %>
| <%= prop.name %> | `<%- prop.type %>` | <%= prop.docText %> |
<% } %>
<% }) %>
<% } %>

View File

@@ -1,14 +0,0 @@
{% if hasMethods %}
### Methods
{% each methods as meth %}- **{{meth.name}}**{{{meth.signature}}}{% if meth.returnsSomething %}: `{{{meth.returnType}}}`{% endif %}<br/>
{{meth.docText}}
{% each meth.params as param %}
- *{{{param.name}}}:* `{{{param.type}}}` - {% if param.isOptional %}(Optional){% endif %}{{{param.docText}}}
{% endeach %}
{% if meth.returnsSomething %}
- **Returns** `{{{meth.returnType}}}` - {{{meth.returnDocText}}}
{% endif %}
{% endeach %}
{% endif %}

15
tools/doc/templates/service.ejs vendored Normal file
View File

@@ -0,0 +1,15 @@
<% if (hasMethods) { %>
### Methods
<% methods.forEach(function(meth) { -%>
- **<%= meth.name %>**<%= meth.signature %><% if (meth.returnsSomething) { %>: `<%- meth.returnType %>`<% } %><br/>
<%= meth.docText %>
<% meth.params.forEach(function(param) { -%>
- *<%= param.name%>:* `<%- param.type %>` - <% if (param.isOptional) { %>(Optional)<% } %><%= param.docText %>
<% }) -%>
<% if (meth.returnsSomething) { -%>
- **Returns** `<%- meth.returnType %>` - <%= meth.returnDocText %>
<% } -%>
<% }) -%>
<% } %>

View File

@@ -1,5 +0,0 @@
| Name | Level | Abstract |
| -- | -- | -- |
{% each tuts as tut %}
| [**{{tut.title}}**]({{tut.link}}) | {{tut.level}} | {{tut.briefDesc}} |
{% endeach %}

5
tools/doc/templates/tutIndex.ejs vendored Normal file
View File

@@ -0,0 +1,5 @@
| Name | Level | Abstract |
| -- | -- | -- |
<% tuts.forEach(function(tut) { -%>
| [**<%= tut.title %>**](<%= tut.link %>) | <%= tut.level %> | <%= tut.briefDesc %> |
<% }) %>

View File

@@ -1,3 +0,0 @@
{% each items as item %}
- [{{item.title}}]({{item.link}})
{% endeach %}

3
tools/doc/templates/versIndex.ejs vendored Normal file
View File

@@ -0,0 +1,3 @@
<% items.forEach(function(item) { -%>
- [<%= item.title %>](<%= item.link %>)
<% }) %>