https://kotlinlang.org logo
a

Ashish Kumar Joy

03/09/2021, 1:15 PM
Hello all, We were trying to create a multiplatform library in our project, the idea is to create a npm package which can be publish and use from nodejs project and jar which can be used from Kotlin jvm project. What we observe that in js generated package we are getting dependency of "kotlin-test-js-runner" and "kotlin-test" as result when we are using the publish package we are getting "kotlin-test" and "kotlin-test-js-runner" as dependency which I think we dont require. Is there configuration I can do in multiplatform library so that generated js dont have these two dependencies. A sample code on github https://github.com/ashishkujoy/kotlin-js-jvm-library Thanks.
b

Big Chungus

03/09/2021, 1:21 PM
Also consider using js ir backend
a

Ashish Kumar Joy

03/09/2021, 3:04 PM
@Big Chungus thanks for the suggestion
b

Big Chungus

03/10/2021, 8:50 AM
Let me know how it worked out for you
a

Ashish Kumar Joy

03/11/2021, 1:47 PM
Hi @Big Chungus Using IR backend solve the problem of having "kotlin-test-js-runner" and "kotlin-test" package dependency. But now it is not running jsTest. without IR backend there was a task jsNodeTest which was running jsTest but now jsTest are not running. Is there any specific configuration needed for running js test?
Regarding the npm publish, currently with reduced package size and absence of any unwanted dependency we might not require the plugin.
b

Big Chungus

03/11/2021, 1:56 PM
If you;re using IR, the only thing npm-publish would help you with is package.json customisation and actual publishing to npm registry
As for the tests not running, I'm not sure. Try asking in #javascript. Might be IR bug
a

Ashish Kumar Joy

03/11/2021, 2:04 PM
Thanks @Big Chungus i will post this question in javascript
2 Views