Skip to content
Permalink
Browse files
BATCHEE-104 BATCHEE-105 few tweaks on the documentation generation
  • Loading branch information
rmannibucau committed Aug 3, 2016
1 parent 93adf7c commit 340ebc22be576feb92bdd54c1a73330ef9b83811
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
@@ -110,15 +110,15 @@
def generatedFolder = new File(project.parent.parent.basedir, 'src/site/markdown/batchee-site-generated')
if (!generatedFolder.isDirectory()) throw new IllegalStateException('no generated doc, extensions pre-ste should have been executed')
new File(generatedFolder, 'index.md').withWriter { w ->
w.println('= Generated Extensions Documentation\n')
w.println('# Generated Extensions Documentation\n')
generatedFolder.listFiles(new FilenameFilter() {
boolean accept(File dir, String name) {
return name.endsWith('md')
}
}).sort(true) { f1, f2 -> f1.name.compareTo(f2.name) }.each {
if (it.name == 'index.md') return
w.println('* [' + it.name + '](./' + it.name.replace('.md', '.html') + ')')
w.println('* [' + it.name.replace('.md', '').replace('batchee-', '').capitalize() + '](./' + it.name.replace('.md', '.html') + ')')
}
}
]]>
@@ -197,7 +197,7 @@ public void beginClass(final Writer writer, final String className, final String

@Override
public void add(final Writer writer, final FieldDoc doc) throws IOException {
writer.append("* ").append(doc.getName()).append(doc.getDoc() == null ? "" : ": " + doc.getDoc()).append("\n");
writer.append("* `").append(doc.getName()).append('`').append(doc.getDoc() == null ? "" : ": " + doc.getDoc()).append("\n");
}

@Override
@@ -85,19 +85,19 @@ public void documentMd() throws MojoFailureException, MojoExecutionException, IO
"\n" +
"a child comp\n" +
"\n" +
"* config2: 2\n" +
"* configByDefault: this is an important config\n" +
"* expl: this one is less important\n" +
"* `config2`: 2\n" +
"* `configByDefault`: this is an important config\n" +
"* `expl`: this one is less important\n" +
"\n" +
"# myComponent\n" +
"\n" +
"* configByDefault: this is an important config\n" +
"* expl: this one is less important\n" +
"* `configByDefault`: this is an important config\n" +
"* `expl`: this one is less important\n" +
"\n" +
"# org.apache.batchee.tools.maven.batchlet.SimpleBatchlet\n" +
"\n" +
"* fail\n" +
"* sleep\n" +
"* `fail`\n" +
"* `sleep`\n" +
"\n", IOUtil.toString(fis));
fis.close();
}

0 comments on commit 340ebc2

Please sign in to comment.