mirror of
https://github.com/GayPizzaSpecifications/dough.git
synced 2025-08-05 14:31:32 +00:00
Fix nodejs support.
This commit is contained in:
13
samples/cat-text/build.gradle.kts
Normal file
13
samples/cat-text/build.gradle.kts
Normal file
@ -0,0 +1,13 @@
|
||||
plugins {
|
||||
dough_sample
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation(project(":dough-fs"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
samples/cat-text/hello.txt
Normal file
1
samples/cat-text/hello.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello World
|
9
samples/cat-text/src/commonMain/kotlin/main.kt
Normal file
9
samples/cat-text/src/commonMain/kotlin/main.kt
Normal file
@ -0,0 +1,9 @@
|
||||
import gay.pizza.dough.fs.PlatformFsProvider
|
||||
import gay.pizza.dough.fs.readString
|
||||
|
||||
fun main() {
|
||||
val currentWorkingDirectory = PlatformFsProvider.currentWorkingDirectory
|
||||
val helloTextPath = currentWorkingDirectory.resolve("hello.txt")
|
||||
val content = helloTextPath.readString()
|
||||
println(content)
|
||||
}
|
Reference in New Issue
Block a user