1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-25 12:07:10 -07:00

Template documentation.

This commit is contained in:
Cedric Beust 2016-02-16 20:31:24 -08:00
parent c4be449ae3
commit c1f32212f2
2 changed files with 99 additions and 16 deletions

View file

@ -109,9 +109,9 @@ class JavaPlugin : ICompilerContributor, IDocContributor {</pre>
With this declaration, we know that the <code>JavaPlugin</code> contributes a compiler and a doc generator.
</p>
<pre class="brush:java">
class JavaBuildGenerator: IInitContributor {</pre>
class JavaBuildGenerator: ITemplateContributor {</pre>
<p>
This class is declaring that it wants to take part in the <code>--init</code> process (i.e. it can generate an archetype), discussed below.
This class is declaring that it wants to take part in the <code>--init</code> process (i.e. it can generate a template), discussed below.
</p>
<h2 class="section" id="actor-list">List of plug-in actors</h2>
<p>
@ -184,16 +184,6 @@ class JavaBuildGenerator: IInitContributor {</pre>
Plug-ins that know how to generate documentation out of source files should implement this interface.
</td>
</tr>
<tr>
<td><code><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/api/IInitContributor.kt">IInitContributor</a></code></td>
<td><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/api/IPluginActor.kt"><code>IContributor</code></a> </td>
<td>When invoked with <code>--init</code> followed by archetype names separated by commas,
Kobalt will invoke each of these contributors so they can generate their files.
Archetypes are useful to create projects from scratch with a minimal number of
files to get started. For example, the "java" archetype will generate a `Build.kt`
file suitable for a brand new Java project.
</td>
</tr>
<tr>
<td><code><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/api/IProjectContributor.kt">IProjectContributor</a></code></td>
<td><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/api/IPluginActor.kt"><code>IContributor</code></a> </td>
@ -236,6 +226,16 @@ class JavaBuildGenerator: IInitContributor {</pre>
Plug-ins that want to add, remove or alter the source directories should implement this interface.
</td>
</tr>
<tr>
<td><code><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/api/ITemplateContributor.kt">ITemplateContributor</a></code></td>
<td><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/api/IPluginActor.kt"><code>IContributor</code></a> </td>
<td>When invoked with <code>--init</code> followed by template names separated by commas,
Kobalt will invoke each of these contributors so they can generate their files.
Templates are useful to create projects from scratch with a minimal number of
files to get started. For example, the "java" template will generate a <code>Build.kt</code>
file suitable for a brand new Java project.
</td>
</tr>
<tr>
<td><code><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/api/ITestRunnerContributor.kt">
ITestRunnerContributor</a></code></td>