File tree Expand file tree Collapse file tree 8 files changed +3049
-1
lines changed
kotlin/com/saveourtool/template/frontend
plugins/src/main/kotlin/com/saveourtool/template/build Expand file tree Collapse file tree 8 files changed +3049
-1
lines changed Original file line number Diff line number Diff line change 1+ import com.saveourtool.template.build.kotlinw
2+
3+ plugins {
4+ kotlin(" multiplatform" )
5+ }
6+
7+ kotlin {
8+ js {
9+ browser {
10+ commonWebpackConfig {
11+ cssSupport {
12+ enabled = true
13+ }
14+ }
15+ }
16+ binaries.executable()
17+ }
18+
19+ sourceSets {
20+ jsMain {
21+ dependencies {
22+ implementation(project.dependencies.enforcedPlatform(libs.kotlin.wrappers.bom))
23+ implementation(kotlinw(" react" ))
24+ implementation(kotlinw(" react-dom" ))
25+ }
26+ }
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ package com.saveourtool.template.frontend
2+
3+ import react.FC
4+ import react.Props
5+ import react.create
6+ import react.dom.client.createRoot
7+ import react.dom.html.ReactHTML.button
8+ import react.dom.html.ReactHTML.div
9+ import react.dom.html.ReactHTML.h1
10+ import web.dom.document
11+
12+ val App : FC <Props > = FC {
13+ h1 {
14+ + " Authentication page"
15+ }
16+ div {
17+ button {
18+ + " GitHub"
19+ }
20+ button {
21+ + " Google"
22+ }
23+ }
24+ }
25+
26+ fun main () {
27+ val container = document.getElementById(" root" ) ? : error(" Couldn't find root container!" )
28+ createRoot(container).render(App .create())
29+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < title > App Cloud template</ title >
6+ </ head >
7+ < body >
8+ < div id ="root "> </ div >
9+ < script src ="frontend.js "> </ script >
10+ </ body >
11+ </ html >
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ org.gradle.vfs.watch=true
66# # there will be a replacement `org.gradle.unsafe.isolated-project`: https://github.com/gradle/gradle/pull/16930
77# org.gradle.configureondemand=true
88kotlin.native.cacheKind.linuxX64 =static
9+ kotlin.js.compiler =ir
910
1011# See <https://docs.gradle.com/enterprise/gradle-plugin/>
1112#
Original file line number Diff line number Diff line change 11[versions ]
22kotlin = " 1.9.22"
3+ kotlin-wrappers = " 1.0.0-pre.715"
34kotlin-serialization = " 1.6.3"
45spring-boot = " 3.2.3"
56springdoc = " 2.3.0"
@@ -18,4 +19,5 @@ springdoc-openapi-starter-common = { module = "org.springdoc:springdoc-openapi-s
1819springdoc-openapi-starter-webflux-ui = { module = " org.springdoc:springdoc-openapi-starter-webflux-ui" , version.ref = " springdoc" }
1920springdoc-openapi-starter-webmvc-ui = { module = " org.springdoc:springdoc-openapi-starter-webmvc-ui" , version.ref = " springdoc" }
2021
21- kotlinx-serialization-core = { module = " org.jetbrains.kotlinx:kotlinx-serialization-core" , version.ref = " kotlin-serialization" }
22+ kotlin-wrappers-bom = { module = " org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom" , version.ref = " kotlin-wrappers" }
23+ kotlinx-serialization-core = { module = " org.jetbrains.kotlinx:kotlinx-serialization-core" , version.ref = " kotlin-serialization" }
Original file line number Diff line number Diff line change 1+ package com.saveourtool.template.build
2+
3+ fun kotlinw (target : String ): String = " org.jetbrains.kotlin-wrappers:kotlin-$target "
You can’t perform that action at this time.
0 commit comments