From 5eeb2bbeb8c71ae813808ee0e8d09293c4abe1c1 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 19 Jan 2023 04:10:57 +0100 Subject: Revise README documentation for examples and plugins (#2736) --- .../kotlin/org/kotlintestmpp/JsCoroutineExtensions.kt | 11 +++++++++++ .../src/jsMain/kotlin/org/kotlintestmpp/JsDateUtils.kt | 8 ++++++++ .../src/jsMain/kotlin/org/kotlintestmpp/JsFunctions.kt | 18 ++++++++++++++++++ .../jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt | 8 -------- .../src/jsMain/kotlin/org/kotlintestmpp/main.kt | 17 ----------------- .../src/jsMain/kotlin/shouldbesuppressed/supp.kt | 11 ----------- 6 files changed, 37 insertions(+), 36 deletions(-) create mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsCoroutineExtensions.kt create mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsDateUtils.kt create mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsFunctions.kt delete mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt delete mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt delete mode 100644 examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/shouldbesuppressed/supp.kt (limited to 'examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin') diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsCoroutineExtensions.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsCoroutineExtensions.kt new file mode 100644 index 00000000..85d6beb0 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsCoroutineExtensions.kt @@ -0,0 +1,11 @@ +package org.kotlintestmpp.coroutines + +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Deferred + +/** + * JS actual implementation for `asyncWithDelay` + */ +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/JsDateUtils.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsDateUtils.kt new file mode 100644 index 00000000..2f4f3c45 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsDateUtils.kt @@ -0,0 +1,8 @@ +package org.kotlintestmpp.date + +/** + * JS actual implementation for `getCurrentDate` + */ +actual fun getCurrentDate(): String { + return "test" +} diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsFunctions.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsFunctions.kt new file mode 100644 index 00000000..76757359 --- /dev/null +++ b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/JsFunctions.kt @@ -0,0 +1,18 @@ +package org.kotlintestmpp + +/** + * Function declares in JS source set + */ +fun js() {} + +/** + * Function declared in JS source set. + * + * Function with the same name exists in another source set as well. + */ +fun shared() {} + +/** + * Extension declared in JS source set + */ +fun String.myExtension() = println("test") 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 deleted file mode 100644 index 7b5fe652..00000000 --- a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/asyncWithDealy.kt +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 8cb66e6d..00000000 --- a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/org/kotlintestmpp/main.kt +++ /dev/null @@ -1,17 +0,0 @@ -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 diff --git a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/shouldbesuppressed/supp.kt b/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/shouldbesuppressed/supp.kt deleted file mode 100644 index 21dca566..00000000 --- a/examples/gradle/dokka-multiplatform-example/src/jsMain/kotlin/shouldbesuppressed/supp.kt +++ /dev/null @@ -1,11 +0,0 @@ -package shouldbesuppressed - -/** - * This function should not be visible - */ -fun thatShouldNotBeVisible(): String = "oops" - -/** - * This class should not be visible - */ -class DontLookAtMe(val stealth: Int = 9001) \ No newline at end of file -- cgit