aboutsummaryrefslogtreecommitdiff
path: root/integration/src/main/kotlin
diff options
context:
space:
mode:
authoraleksZubakov <aleks.zubakov@gmail.com>2018-07-10 19:27:16 +0300
committeraleksZubakov <aleks.zubakov@gmail.com>2018-07-10 19:38:36 +0300
commit9ea429920e07c77e1241c4beb172bb36735af783 (patch)
tree2f4139dc014ac86d5577c9c3a96faf90e408d42e /integration/src/main/kotlin
parentdcd84d619665864b275591c93248f4637f6ee636 (diff)
downloaddokka-9ea429920e07c77e1241c4beb172bb36735af783.tar.gz
dokka-9ea429920e07c77e1241c4beb172bb36735af783.tar.bz2
dokka-9ea429920e07c77e1241c4beb172bb36735af783.zip
Add js platform support
Diffstat (limited to 'integration/src/main/kotlin')
-rw-r--r--integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt22
1 files changed, 22 insertions, 0 deletions
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<URL?> {
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<String>
@@ -45,6 +66,7 @@ interface DokkaConfiguration {
interface SourceRoot {
val path: String
val platforms: List<String>
+ val analysisPlatform: Platform
}
interface SourceLinkDefinition {