How to publish typescript package to npm registry

Updated: 2024-03-12
1 min read
[javascript]

On This Page

  1. Open template: https://github.com/romankurnovskii/npm-typescript-package-template
  2. Click Use this template
  3. Create repo from this template.
  4. git clone new repo
  5. update code src/index.ts, src/bin.ts

How to check if bin script works from terminal:

npm link && npm link mypackage
mypackage

Publish:

npm run prepublishOnly
npm publish