Just released <v0.1.1> of npm-publish plugin. Have...
# javascript
b
Just released v0.1.1 of npm-publish plugin. Have a look! πŸŽ‰ Posted in #gradle
t
Just want to say: thanks for writing this plugin and sharing! We're working to integrate it into our projects. So far, so good. πŸ™‚ https://github.com/JuulLabs/koap/pull/31
b
Glad to hear it. If you find any issues or missing features, please raise an issue on the repo.
Btw the plugin is now on gradlePluginPortal
πŸŽ‰ 1
Also, why are you publishing webpack output? Isn't it better to publish K/JS output? That's essentially JS sources that will be much easier to read for lib consumers and the plugin sets that up automatically for kotlin projects
t
Interesting. The JS side of things is outside my expertise. Thanks for pointing that out. I'll bring it up with the engineer working on it. See below. πŸ™‚
d
Hi @Big Chungus, thanks for your work! The reason for publishing the npm using webpack artifacts is that the non-webpack output does not include the dependencies, e.g. okio. The compiler outputs it to
build/js/packages_imported/okio
but the
package.json
refers to it via an absolute
file://
url in the
dependencies
which is no good. Perhaps the project structure or configuration is wrong for the js target, but we have been unable to figure it out thus far. Webpack is not ideal but works around the issue for now.
b
Ah, but that's what my next update handles :) can you checkout develop branch and try it out after publishToMavenLocal?
πŸ‘€ 1
It adds all kotlin file deps as bundled dependencies :)
If you could try it out with publishToMaven local and let me know if it works fine for you, i can release it today
Also if something's missng let me know and I'll add it too
v1.0.0 is out!
πŸ’― 2
πŸ‘ 1
d
Have updated with v1.0.0 and now the bundled dependencies are working properly. Have managed to manually publish an npm package and load it into a js app! 😁
πŸŽ‰ 2
b
Splendid! I think yours is the first app published with this plugin (there are couple more pending that I'm aware of)
Can you send me an npm link?
d
I can send you a tarball - it's not published to a repo yet
b
Sure