Shannon Lloyd
05/26/2020, 6:30 AM/* ErrorDeclaration: Class my.fully.qualified.enum.class.Name with kind: ENUM_CLASS */
I'm new to TS, but I thought it had enums.spand
05/26/2020, 7:55 AMchristophsturm
05/26/2020, 9:18 AMNicholas Bilyk
05/26/2020, 7:00 PMmaven-publish
plugin, however for JS only projects this isn't the case.
It's easy enough to add -
val kotlinSourcesJar by tasks.named("kotlinSourcesJar")
publishing {
publications {
create<MavenPublication>("default") {
from(components["kotlin"])
artifact(kotlinSourcesJar)
}
}
}
However, this isn't really documented and feels inconsistent. This is with 1.4-M1 EAP.Tristan
05/27/2020, 10:15 PMMranders
05/28/2020, 2:36 PM> Task :kotlinNpmInstall
error /var/jenkins_home/Build_pluginupgrades/build/js/node_modules/jss: Command failed.
Exit code: 126
Command: node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34m<https://opencollective.com/jss/donate>\u001b[0m')"
Arguments:
Directory: /var/jenkins_home/Build_pluginupgrades/build/js/node_modules/jss
Output:
/bin/sh: 1: node: Permission denied
> Task :kotlinNpmInstall FAILED
When using the plugin, where is node/yarn installed?fkrauthan
05/28/2020, 4:59 PMspierce7
05/29/2020, 7:09 PMGrantas33
05/29/2020, 11:10 PMgabin
05/30/2020, 6:01 PMfrank
05/30/2020, 11:36 PMval backend by creating{}
val webapp by creating{}
dazza5000
06/02/2020, 1:15 AMTristan
06/02/2020, 11:47 PMbrowserDevelopmentRun
?napperley
06/03/2020, 4:58 AMhttps://youtu.be/s_C3uhThzgk▾
implementation("io.fritz2:fritz2-core-js:0.4")
):
Error: ENOENT: no such file or directory, open '/home/napperley/idea_projects/kotlinjs-test/build/js/packages/kotlinjs-test/kotlin/kotlinjs-test.js'
A bit annoying since it means the web page has to be manually refreshed in a web browser (eg Brave) every time code changes are made. Wondering if the continuous deployment feature can't handle pure Kotlin JS libraries/frameworks which don't rely on NPM ( https://github.com/jwstegemann/fritz2 ) 😆 .napperley
06/03/2020, 5:01 AMMananpoddarm
06/03/2020, 5:14 AMfrank
06/03/2020, 12:57 PMasync
and await
from middleware of koa.
Koa router:
const router = require('koa-router')()
router.get('/', async (ctx, next) => {
await ctx.render('index', {
title: 'Hello Koa 2!'
})
})
I tried with js() function and coroutines but cant make it work.
Any hint or confirm if avaible in kotlin/JS?spierce7
06/03/2020, 4:30 PM_
prefixes), aren’t properly serialized by kotlinx.serialization. @sandwwraith ^^spierce7
06/03/2020, 9:49 PMproduceExecutable()
is required to get the .d.ts
files to generate, but I can’t find how to call produceExecutable()
from the multiplatform plugin. Am I missing it? How would I get this to work?Tristan
06/04/2020, 1:28 PMankushg
06/04/2020, 3:48 PMtype MyEnum = "a" | "b" | "c"
).
Having inline enum class
support (especially with generates TS definitions) would help greatly with calling Kotlin/JS code from Typescript.
EDIT: it looks like there are a few other ways to represent Enums in TS:
• enum (enum MyEnum2 { A = "a", B = "b", C = "c")
)
• const enum (const enum MyEnum2 { A = "a", B = "b", C = "c")
)
I want proper mapping between Kotlin/TS enums -- inline classes and/or union types are just one way I see to get thatfrank
06/04/2020, 7:45 PMKotlin 1.4-M2
and cant call to ':compileKotlinJs' tasks directly, Gradle module have tasks but not found in build.gradle.
//Fail Call :compileKotlinJs tasks
tasks.compileKotlinJs{
kotlinOptions.outputFile = "${projectDir}/routes/node/index2.js"
kotlinOptions.metaInfo = false
kotlinOptions.moduleKind = "commonjs"
}
//Work call to :compileKotlinJs
tasks {
"compileKotlinJs"(org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile::class) {
kotlinOptions.outputFile = "${projectDir}/routes/node/index2.js"
kotlinOptions.metaInfo = false
kotlinOptions.moduleKind = "commonjs"
}
}
Any idea because dont work tasks.compileKotlinJs
If exists in Gradle module?spierce7
06/05/2020, 3:25 AMVladislav Khikhlov
06/05/2020, 1:30 PMnapperley
06/07/2020, 5:54 AMnpm("chart.js")
). How do I get chart.js installed as a library? Is there a separate Gradle task that needs to be executed?Hanno
06/07/2020, 7:23 AMnapperley
06/08/2020, 12:39 AMfrank
06/10/2020, 8:43 AMcreate
variable in stdlib-js
lib.
import kotlin.browser.document
document.create.div(classes = "chatWindow") {}
Any equivalent in 1.4-M2 ?christophsturm
06/10/2020, 9:22 AMLuis Mirabal
06/10/2020, 1:40 PMError: Target container is not a DOM element.
I found a possible solution in SO: https://stackoverflow.com/questions/61839800/unit-testing-in-kotlin-js
But it's not ideal. Any ideas how to fix this?Luis Mirabal
06/10/2020, 1:40 PMError: Target container is not a DOM element.
I found a possible solution in SO: https://stackoverflow.com/questions/61839800/unit-testing-in-kotlin-js
But it's not ideal. Any ideas how to fix this?[JB] Shagen
06/10/2020, 6:08 PMLuis Mirabal
06/10/2020, 7:22 PM