Skip to content

Instantly share code, notes, and snippets.

@tsabunkar
Last active February 11, 2021 05:26
Show Gist options
  • Save tsabunkar/22286f6a76f03d773910e69146012ca4 to your computer and use it in GitHub Desktop.
Save tsabunkar/22286f6a76f03d773910e69146012ca4 to your computer and use it in GitHub Desktop.
Step to Deploy Typescript Project in your own npm registry
# Step to Deploy Typescript Project in npm registry
- add .npmignore file
- $ tsc (on root project, Also npm i -g typescript)
- $ npm login
- $ npm publish (If error as code E404 Not Found - /$ npm config set registry http://registry.npmjs.org)
- Now everytime you want to publish your libraries new changes to NPM registry
- In package.json, should update the "ersion"
- $ tsc (Always transpile src/**/*.ts file in js, as ony dist folder would be published in NPM Repo)
- $ $ npm publish
- To unblish a entier package - $ npm unpublish unit-of-work-library -f
- Reference:
- https://www.tsmean.com/articles/how-to-write-a-typescript-library/
- https://docs.npmjs.com/unpublishing-packages-from-the-registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment