From 9ea429920e07c77e1241c4beb172bb36735af783 Mon Sep 17 00:00:00 2001 From: aleksZubakov Date: Tue, 10 Jul 2018 19:27:16 +0300 Subject: Add js platform support --- .../kotlin/org/jetbrains/dokka/configuration.kt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'integration/src/main/kotlin') diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt index 90e5b5fc..b18e5daf 100644 --- a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt +++ b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt @@ -17,6 +17,27 @@ class UrlSerializer : ValueSerializer { override fun toJsonValue(value: URL?): Any? = value?.toExternalForm() } +enum class Platform(val key: String) { + jvm("jvm"), + js("js"); +// common("common"); + + + companion object { + val DEFAULT = jvm + + fun fromString(key: String): Platform { + return when (key.toLowerCase()) { + jvm.key -> jvm + js.key -> js +// common.key -> common + else -> TODO("write normal exception") + } + } + } + +} + interface DokkaConfiguration { val moduleName: String val classpath: List @@ -45,6 +66,7 @@ interface DokkaConfiguration { interface SourceRoot { val path: String val platforms: List + val analysisPlatform: Platform } interface SourceLinkDefinition { -- cgit