https://kotlinlang.org logo
#feed
Title
# feed
b

Big Chungus

03/01/2021, 6:25 PM
npm-publish@1.1.2 is out! This is a gradle plugin aiming to do what maven-publish does for java, but for npm. It has same integrations with kotlin.js plugin to autogenerate publications for you and do actual publishing to any npm registry. This new version brings improved IR support, which makes it even easier to manage kotlin-only dependencies in your project when assembling the publication (since those are now bundled within the final js output file via webpack). Also note that starting from this release the plugin will no longer be published to jcenter.
👍 3
🎉 1
a

andylamax

03/06/2021, 10:33 PM
Hello there, Using IR Question I had about this was, I see a bunch of kotlin code in my library. If I post more than two libs, won't there be duplicate code among the two libs? lib-a
Copy code
// . . .
function joinToString(_this_, separator, prefix, postfix, limit, truncated, transform) {
    return joinTo(_this_, StringBuilder_init_$Create$(), separator, prefix, postfix, limit, truncated, transform).toString();
  }
// . . .
lib-b
Copy code
// . . .
function joinToString(_this_, separator, prefix, postfix, limit, truncated, transform) {
    return joinTo(_this_, StringBuilder_init_$Create$(), separator, prefix, postfix, limit, truncated, transform).toString();
  }
// . . .
wont this be duplicated in the final executable?
b

Big Chungus

03/06/2021, 11:34 PM
Not sure, webpack might still tree shake them. In any case, until kotlin es6 support comes, I don't recommend building npm libs with kotlin at all!
a

andylamax

03/07/2021, 4:07 AM
hehehe, gotcha
5 Views