diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-10-07 13:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 13:58:46 +0200 |
commit | e9f5da45c0fcfec5f7c150229301904d7915e090 (patch) | |
tree | c094b57b37fec4c901bbfaa508268d354a4dc4c8 /runners/cli/src | |
parent | de6019337ae0e97e73db7fa9394e88ec2de4aeed (diff) | |
download | dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.gz dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.bz2 dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.zip |
Make logo replaceable #1339 (#1488)
Diffstat (limited to 'runners/cli/src')
-rw-r--r-- | runners/cli/src/main/kotlin/cli/main.kt | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index a1139e65..681ebfa6 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -46,7 +46,7 @@ class GlobalArguments(args: Array<String>) : DokkaConfiguration { override val pluginsConfiguration by parser.option( ArgTypePlugin, description = "Configuration for plugins in format fqPluginName=json^^fqPluginName=json..." - ).default(emptyMap()) + ).delimiter("^^") override val pluginsClasspath by parser.option( ArgTypeFile, @@ -254,16 +254,22 @@ object ArgTypeFile : ArgType<File>(true) { object ArgTypePlatform : ArgType<Platform>(true) { override fun convert(value: kotlin.String, name: kotlin.String): Platform = Platform.fromString(value) override val description: kotlin.String - get() = "{ String thar represents paltform }" + get() = "{ String that represents platform }" } -object ArgTypePlugin : ArgType<Map<String, String>>(true) { - override fun convert(value: kotlin.String, name: kotlin.String): Map<kotlin.String, kotlin.String> = - value.split("^^").map { - it.split("=").let { - it[0] to it[1] - } - }.toMap() +object ArgTypePlugin : ArgType<DokkaConfiguration.PluginConfiguration>(true) { + override fun convert( + value: kotlin.String, + name: kotlin.String + ): DokkaConfiguration.PluginConfiguration { + return value.split("=").let { + PluginConfigurationImpl( + fqPluginName = it[0], + serializationFormat = DokkaConfiguration.SerializationFormat.JSON, + values = it[1] + ) + } + } override val description: kotlin.String get() = "{ String fqName=json, remember to escape `\"` inside json }" |