Skip to content

[K/JS] Add npm-publish tutorial#641

Open
JSMonk wants to merge 5 commits intomasterfrom
rr/kobzar/npm-publish-tutorial
Open

[K/JS] Add npm-publish tutorial#641
JSMonk wants to merge 5 commits intomasterfrom
rr/kobzar/npm-publish-tutorial

Conversation

@JSMonk
Copy link
Copy Markdown
Member

@JSMonk JSMonk commented Feb 26, 2026

A guide on publish Kotlin web library to NPM

@JSMonk JSMonk requested a review from a team as a code owner February 26, 2026 19:12
@zamulla zamulla self-assigned this Mar 3, 2026

> To configure this, you can also use [Gradle properties](https://docs.gradle.org/current/userguide/build_environment.html).
>
{style="tip"}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this important to note? Is it more common knowledge that we should remind people of, or rather a counterintuitive thing that people are generally not aware of?

Also I'm not entirely sure what this tip refers to — the entire npmPublish {} block?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could skip it (I also don't understand what I referred here)

* The `registries`, which specify to which registry the library is going to be published.
* The `organization`, `packageName` (by default, the name of the module is taken), and `version` (by default, the version specified in the module is taken) of your library.
* The `license`, under which your library is published.
* The `author`, which specifies the author of the library (you can also add `contributors`).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's obvious how to map the contributors array to the Gradle script. Should we add an example for this?

@@ -0,0 +1,246 @@
[//]: # (title: Publish your library to NPM – tutorial)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a hard time with library / package here: can we settle on "library" when referring to the actual KMP project and "package" when it's about the npm package being described and published? I think people mapping npm docs onto our tutorial will have an easier time.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe project would be easier in this case? package word has also a clash in terminology in Kotlin/Java world

@zamulla zamulla assigned aepanchi and unassigned zamulla Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants