How to publish typescript package to npm registry


  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
Published Mar 7, 2023 | Updated May 15, 2023