ajalt / mordant

Multiplatform text styling for Kotlin command-line applications
https://ajalt.github.io/mordant/
Apache License 2.0
935 stars 33 forks source link

Add linuxArm64 and wasmJs targets #166

Closed ajalt closed 3 months ago

ajalt commented 3 months ago

Kotest added support for wasm a whiel ago, but hasn't made a release since then. Rather than waiting any longer, we use a snapshot build of kotest for now. It's only a test dependency, so it doesn't affect the published mordant artifacts.

Wasm was a bit of a pain: you can't share much code between it and JS, because wasm introduces a JsAny, while js uses dynamic. The js() function also works differently between the two targets. Finally, wasm seems to translate \r to \r\n when printing, so I had to work around that for animations.

Fixes #155