diff options
Diffstat (limited to 'src/main.kt')
-rw-r--r-- | src/main.kt | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/main.kt b/src/main.kt index e385da3f..79a8bfcb 100644 --- a/src/main.kt +++ b/src/main.kt @@ -3,15 +3,23 @@ package org.jetbrains.dokka import com.sampullara.cli.* import com.intellij.openapi.util.* import org.jetbrains.jet.cli.common.messages.* -import org.jetbrains.jet.utils.* -import org.jetbrains.jet.lang.resolve.BindingContext -import org.jetbrains.jet.lang.psi.JetFile -import org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments +import org.jetbrains.jet.cli.common.arguments.* + +class DokkaArguments { + Argument(value = "src", description = "Source file or directory (allows many paths separated by the system path separator)") + ValueDescription("<path>") + public var src: String? = null + + Argument(value = "output", description = "Output directory path for .md files") + ValueDescription("<path>") + public var outputDir: String? = null +} public fun main(args: Array<String>) { - val compilerArguments = K2JVMCompilerArguments() - val sources: List<String> = Args.parse(compilerArguments, args) ?: listOf() + val arguments = DokkaArguments() + val sourceFiles = Args.parse(arguments, args) + val sources: List<String> = sourceFiles ?: listOf() val environment = AnalysisEnvironment(MessageCollectorPlainTextToStream.PLAIN_TEXT_TO_SYSTEM_ERR) { /* @@ -32,6 +40,7 @@ public fun main(args: Array<String>) { context.createDocumentation(file) }.fold(DocumentationModel()) {(aggregate, item) -> aggregate.merge(item) } - println(model) + ConsoleGenerator().generate(model) + Disposer.dispose(environment) }
\ No newline at end of file |