From f03083d7534209ad94dc3c4d7afd17f58e58127d Mon Sep 17 00:00:00 2001 From: vmishenev Date: Wed, 28 Jul 2021 14:57:38 +0300 Subject: Migrate Dokka examples to Dokka repo (KT-47798) (#2030) * Migrate Dokka examples to Dokka repo (KT-47798) * Configure workflow of examples checking * Add workflow to deploy examples --- .../jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt | 8 ++++++++ .../src/jsMain/kotlin/org/kotlintestmpp/main.kt | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt create mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt (limited to 'examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org') diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt new file mode 100644 index 00000000..7b5fe652 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt @@ -0,0 +1,8 @@ +package org.kotlintestmpp + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Deferred + +actual fun CoroutineScope.asyncWithDealy(delay: Long, block: suspend () -> T): Deferred { + TODO("Not yet implemented") +} diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt new file mode 100644 index 00000000..8cb66e6d --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt @@ -0,0 +1,17 @@ +package org.kotlintestmpp + +fun main(args : Array) { + console.log("Hello, world!") +} + +fun js(){} +fun shared(){} + +/** + * Actual function for js + */ +actual fun getCurrentDate(): String { + return "test" +} + +fun String.myExtension() = println("test") \ No newline at end of file -- cgit