• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Gradle plugin for NPM package publishing. Allows for arbitrary publishing as well as seamless integration with Kotlin JS/MPP plugins.

Slack chat Mkdocs docs Version gradle-plugin-portal Version maven-central

NPM-PUBLISH GRADLE PLUGIN

DISCLAIMER: If you still depend on the old LEGACY Kotlin/JS compiler, please stick with npm-publish:2.1.x version. LEGACY backend support was dropped since npm-publish:3.0.0.

Gradle plugin enabling NPM publishing (essentially maven-publish for NPM packages). Integrates seamlessly with Kotlin/JS/MPP plugin if applied, providing auto configurations.

Check the latest release for verified JVM, Kotlin and Gradle tooling versions

Setup

Here's a bare minimum setup when using together with one of the kotlin plugins. This setup would produce the following tasks:

  • assembleJsPackage
  • packJsPackage
  • publishJsPackageToNpmjsRegistry
plugins {
  id("dev.petuska.npm.publish") version "<VERSION>"
  kotlin("multiplatform") version "<VERSION>>" // Optional, also supports "js"
}

kotlin {
  js(IR) {
    binaries.library()
    browser() // or nodejs()
  }
}

npmPublish {
  registries {
    register("npmjs") {
      uri.set("https://registry.npmjs.org")
      authToken.set("obfuscated")
    }
  }
}

Full documentation can be found on npm-publish.petuska.dev

Contributing

See CONTRIBUTING

Thanks to all the people who contributed to npm-publish!

More Repositories

1

kmdc

Kompose wrappers for material-components-web
Kotlin
120
star
2

template-kmp-library

Kotlin multiplatform library template.
Kotlin
65
star
3

kamp

Package discovery website and scanner for Kotlin multiplatform.
Kotlin
57
star
4

kon

Kotlin Object Notation - Lightweight DSL to build fluid JSON trees
Kotlin
46
star
5

ktx

npx for kotlin and the JVM! Install and execute jars or kotlin scripts just like any other command line utility.
Kotlin
42
star
6

klip

Kotlin Multiplatform snapshot ((c|k)lip) manager for tests.
Kotlin
26
star
7

monko

Kotlin MPP bindings for mongodb driver.
Kotlin
10
star
8

gradle-kotlin-delegates

Various kotlin delegates to manage lazy gradle properties
Kotlin
8
star
9

khakra

Kotlin React bindings for ChakraUI
Kotlin
5
star
10

dekorator

Kotlin multiplatform decorators support
Kotlin
3
star
11

kommander

Kotlin MPP bindings for various clis
Kotlin
3
star
12

hazelcast-explorer

A webapp for direct access to Hazelcast data clusters.
Kotlin
3
star
13

aoc-2021-kmp

Advent of Code 2021 in Kotlin Multiplatform!
Kotlin
2
star
14

container-tasks-gradle

Gradlee plugin for managing jekyll workflows
Kotlin
2
star
15

transaction-api

Kotlin
2
star
16

kvdom

Kotlin Virtual DOM MPP implementation for WASM & JS
Kotlin
2
star
17

kwasm

A sample repo for new Kotlin/WASM setup
Kotlin
2
star
18

build-conventions

Common gradle's build conventions that I use.
Kotlin
2
star
19

kotlin-sandbox

A clean and minimal setup for kotlin experiments.
Kotlin
1
star
20

MyMiniMap

An addon for Elder Scrolls Online to provide a minimap functionality.
Lua
1
star
21

kursor

Kotlin Multiplatform implementation of JSON Path spec
Kotlin
1
star
22

template-azure-functions-kotlin-js

Sample project for NodeJS based azure functions with kotlin.
Kotlin
1
star
23

application.env

.env file loader for node and browser
TypeScript
1
star