ankushg
11/17/2021, 8:23 PMNpmTask
and NpxTask
• seems to be better-documented than the almost-secret tasks bundled with Kotlin/JS
At the same time, the Kotlin/JS compiler also downloads node/yarn as needed too.
Does anyone have a setup where they have them configured to play well together?
Maybe just
• turning off downloads for one of the two plugins
• setting them both to run yarn from the same directory
• making sure that the setup task for the plugin with the disabled download dependsOn the setup task for the other plugin ?mbonnin
11/17/2021, 9:00 PMankushg
11/18/2021, 12:33 AMephemient
11/18/2021, 1:28 AMval myScript by tasks.registering(Exec::class) {
doFirst {
val kotlinNodeJs = rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>()
executable(kotlinNodeJs.requireConfigured().nodeExecutable)
}
args(file("myScript.js"), "arg1", "arg2")
}
and for fetching NPM dependencies, just add them to some Kotlin/JS projectankushg
11/18/2021, 4:47 PMephemient
11/19/2021, 6:08 AM