tylerwilson
10/01/2020, 2:59 PM@JsModule("date-fns/parse")
external fun parse(date: String, format: String, reference: Date): Date
spierce7
10/01/2020, 7:53 PMtylerwilson
10/02/2020, 12:38 PMtext-encoding@0.7.0: no longer maintained
Nico
10/03/2020, 10:40 AM@JsExport
? My use case is sharing code between TS frontend and Kotlin/JVM backend, without having to rewrite my frontend in K/JS - right now I am just publishing the .d.ts
and .js
fat files and downloading them manually, which is a hackBig Chungus
10/06/2020, 7:26 PMBig Chungus
10/06/2020, 9:54 PMiroyo
10/07/2020, 2:53 PMnpm
and generateExternals
set to true which "exposes" this APIs and I can use them from kotlin, but then fails to build the output. I've also tried with devNpm
but then I cannot access them.Big Chungus
10/07/2020, 8:57 PMmaven-publish
does for maven repsitories. It also setups your publications automatically from your JS compilations, yet allows for custom publications too. Give it a goo and let me know what you think!
https://gitlab.com/lt.petuska/kpm-publish/-/releases/v0.0.2Robert Jaros
10/08/2020, 5:48 PMhallvard
10/09/2020, 2:16 PMredbassett
10/10/2020, 4:50 AMNullPointerException
error constantly, but the error message just refers to a line number in the compiled JS, which is useless (as far as I have been able to determine) in tracing back to where the exception comes from. Is there a tool or method to trace this sort of exception back to the Kotlin source at all?Josh Feinberg
10/11/2020, 5:41 AMRasmus Plaubor
10/13/2020, 11:35 AMExecute either of these tasks to obtain the respective artifacts for development or production.But is there a way to set up build types via gradle, such that one can run
browserDevelopmentWebpack
when running locally and browserProductionWebpack
when running for production somehow? In Android you have build variants https://developer.android.com/studio/build/build-variants.
Using raw webpack you can do i.e.
webpack --mode=development
But is there a way to do something like this for KotlinJS via gradle?Franco
10/14/2020, 2:51 AMcss-loader
and style-loader
dependencies?
kotlin.js {
browser {
webpackTask {
cssSupport.enabled = true
}
runTask {
cssSupport.enabled = true
}
testTask {
useKarma {
webpackConfig.cssSupport.enabled = true
}
}
}
Rasmus Plaubor
10/14/2020, 7:14 AMBig Chungus
10/14/2020, 3:39 PMankushg
10/14/2020, 6:43 PM@JsExport
also prevent name mangling? Or do you need to use both @JsExport
and @JsName
for that?Christian Dräger
10/15/2020, 9:13 PMdiesieben07
10/16/2020, 10:21 AMjava.lang.IllegalStateException: Concrete fake override IrBasedFunctionHandle(function=org.jetbrains.kotlin.ir.declarations.impl.IrFakeOverrideFunctionImpl@53225f3c) should have exactly one concrete super-declaration: []
(full output in thread)?
There is zero indication as to which file causes this problem, the -verbose
parameter seems to not change anything in the compiler output.Sourabh Rawat
10/17/2020, 4:18 PMFoso
10/17/2020, 6:30 PMMarc Knaup
10/19/2020, 12:02 AMkotlinx-html
. Seems quite dated.
It’s also surprisingly easy to deploy a Kotlin React project on Cloudflare Worker Sites.
https://workers.cloudflare.com/sites
Maybe that could be a Gradle plugin for automatic deployment. It’s easy & cheap for getting started 🙂Sourabh Rawat
10/19/2020, 3:35 PMbackground: inear-gradient(325deg,rgba(39,107,130,1) 0,rgba(49,84,129,1) 100%)
in kotlin.css ?Sourabh Rawat
10/19/2020, 4:10 PMfunctionalComponent
in react-router-dom. It is asking for ReactElement
. How do you convert b/w them?Slackbot
10/19/2020, 7:58 PMChristian Dräger
10/19/2020, 9:29 PMMarc Knaup
10/20/2020, 12:53 AMRProps
.
Easy to miss and causes an error at runtime 😅Franco
10/20/2020, 1:58 AM&& { }
notation to override the default styles in the MaterialUI library using the kotlin-styled
library but I can't find how to do that. I assume there must be a method inside CssBuilder
that does this but I can't find it. Does anyone know what is the same of the method?Patrick Doering
10/20/2020, 9:25 AMkotlinx-nodejs
dependency
2. Run task nodeJsGenerateExternals
3. Copy from externals
to sources
4. Add to index.module_kafkajs.kt
on top @file:JsModule("kafkajs")
5. Move all typealiases (non external) to other file (in my case index.module_kafkajs2.kt
In plain JS I have to call it that way:
await Consumer.run({
eachMessage: async ({ topic, partition, message }) => {
console.log({
value: message.value.toString(),
})
},
});
In the created index.module_kafkajs.kt file I found that:
external interface Consumer {
fun connect(): Promise<Unit>
fun disconnect(): Promise<Unit>
fun subscribe(topic: ConsumerSubscribeTopic): Promise<Unit>
fun stop(): Promise<Unit>
fun run(config: ConsumerRunConfig = definedExternally): Promise<Unit>
fun commitOffsets(topicPartitions: Array<TopicPartitionOffsetAndMedata>): Promise<Unit>
fun seek(topicPartition: `T$28`)
fun describeGroup(): Promise<GroupDescription>
fun pause(topics: Array<`T$29`>)
fun paused(): Array<TopicPartitions>
fun resume(topics: Array<`T$29`>)
fun on(eventName: ValueOf<ConsumerEvents>, listener: (args: Any) -> Unit): RemoveInstrumentationEventListener<Any>
fun logger(): Logger
var events: ConsumerEvents
}
and that:
external interface ConsumerRunConfig {
var autoCommit: Boolean?
get() = definedExternally
set(value) = definedExternally
var autoCommitInterval: Number?
get() = definedExternally
set(value) = definedExternally
var autoCommitThreshold: Number?
get() = definedExternally
set(value) = definedExternally
var eachBatchAutoResolve: Boolean?
get() = definedExternally
set(value) = definedExternally
var partitionsConsumedConcurrently: Number?
get() = definedExternally
set(value) = definedExternally
var eachBatch: ((payload: EachBatchPayload) -> Promise<Unit>)?
get() = definedExternally
set(value) = definedExternally
var eachMessage: ((payload: EachMessagePayload) -> Promise<Unit>)?
get() = definedExternally
set(value) = definedExternally
}
Actual I don` understand how to use that from Kotlin with eachMessage. I hope somebody can help me.Alan B
10/20/2020, 12:48 PM