Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish JS artifacts to npm #13

Open
fullkomnun opened this issue Feb 23, 2021 · 3 comments
Open

Publish JS artifacts to npm #13

fullkomnun opened this issue Feb 23, 2021 · 3 comments

Comments

@fullkomnun
Copy link
Contributor

Publish to npm / GitHub Packages npm registry, possibly using 'npm-pubish' gradle plugin.

Other resources about publication to npm:

With the new IR backend, it is also possible to generate [TypeScript declaration files](TypeScript declaration files)

@ligi
Copy link
Member

ligi commented Feb 23, 2021

Really great to hear! Especially the TypeScript part - cc @pedrouid

@pedrouid
Copy link

pedrouid commented Mar 3, 2021

I'm not familiar with Kotlin to Typescript to Javascript compilation.

However you can use as reference what we do for WalletConnect packages for compiling from Typescript to Javascript.

Essentially you need to take consideration the command used and the tsconfig file.

Command: tsc -p tsconfig.cjs.json

// tsconfig.cjs.json
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./dist/cjs",
    "rootDir": "./src",
    "target": "es6",
    "module": "commonjs",
    "importHelpers": true,
    "noUnusedLocals": false,
    "strict": false
  }
}

You can see this file extends from the root tsconfig file which I will link below:
https://github.com/WalletConnect/walletconnect-monorepo/blob/next/tsconfig.json

@BierDav
Copy link
Contributor

BierDav commented May 17, 2023

Sadly Typescript Declaration generation is currently only experimental: https://kotlinlang.org/docs/js-ir-compiler.html#preview-generation-of-typescript-declaration-files-d-ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants