-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mordant 2.0 #8
Comments
Hi @ajalt, stumbled over your library, looks pretty promising 🙂 I am wondering if you plan to break all the experimental interfaces until 2.0 or if they are already safe to use. |
@robstoll version 2.0.0-beta1 was just released with JS support. There shouldn't be any more major API changes, so give it a try and let me know if it works out for you, |
Unfortunately I cannot try this, though I'd like to. Maven can't resolve it due to the missing colormath JARs. Will try it out when that's fixed! The functionality looks great. I'm not sure if it's worth limiting the library too much for JS and Native. At least, the JVM version can be compiled to fast native binaries using GraalVM now. And I'm not sure there is much use for this in the JS world, which has similar libraries already. |
Colormath is definitely published; maven central might have had an outage when you tried. The JS target isn't designed to be used as an npm package from pure JS; it's targeted towards projects written in Kotlin/JS. Other node libraries exist, but mordant should be the best to use from Kotlin. |
OK, it works with Maven (the tool) if you specify I think what's happened here is that Gradle/Kotlin MPP is publishing POMs that aren't actually usable by Maven but in such a way that Maven itself doesn't notice there's anything wrong. It then generates a useless/misleading error message. I suspect this is a side-effect of the desire to use Maven Central as a CDN which would normally insist on having a JAR and a POM, but Gradle wants to only publish its own JSON module file, so it ends up making these empty files. Not ideal. I think the fix is to provide separate instructions for Maven users that contains the JVM specific artifact, as Maven cannot read the multi-platform lib metadata anyway. I'll open a quick PR. |
Hello @ajalt |
Mordant 2.0.0-beta2 has been released, which includes macosX64 support (@jmfayard) |
I can confirm it works, thanks a lot @ajalt |
Mordant 2.0 is a complete rewrite that adds support for markdown rendering, animations, and renderable components like lists and tables. Specifying colors and styles can now be done through static members of the
TextColors
andTextStyles
enums. You don't need to pass around aTermColors
instance everywhere; you just need to print the final strings withTerminal.print
if you want the ANSI codes downsampled.There's still a lot I'd like to do before a stable release.
Terminal.colors
. It's the equivalent of Mordant 1'sTermColors
, but isn't necessary if you useTerminal.println
. We could simplify a few things if we got rid of it. If we did, you could still use regularprintln
instead of theTerminal
version, you would just need to pass your stings throughTerminal.render
if you want your ANSI codes downsampled.If anyone can try out the alpha, I'd love to hear your feedback on API, implementation, features, or anything else. You can comment on this issue, start a conversation in the #clikt channel on the kotlinlang slack, or DM me on ASG or kotlinlang slack.
The text was updated successfully, but these errors were encountered: