gciatto / npm-publish

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

Home Page:https://npm-publish.petuska.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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!

About

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

https://npm-publish.petuska.dev

License:Apache License 2.0


Languages

Language:Kotlin 98.5%Language:HTML 1.0%Language:TypeScript 0.4%Language:Dockerfile 0.2%