digital-twin-embedding-api
v2.0.1
Published
API for communicating with a web app and the Digital Twin App in the same browser
Downloads
4
Readme
digital-twin-embedding-api
Publishing your NPM Package One last thing, before publishing your package to the NPM registry it is important to publish it and test it on your local machine to ensure its correctness, functionality, and compatibility with other modules or dependencies. Local testing allows you to catch any issues or bugs early on and make necessary improvements before releasing your package to the public
Publishing your NPM package locally Run the following command at the root of your package npm link Create another test project and link the npm package locally with npm link name-of-package in this case npm link npm-demo-ts Create a main.ts file in your test project and import your package to test it out. You should also type information in your project, one of the many perks of typescript.
Result for linking npm package locally Now you are done testing locally, let’s publish to the registry Publishing your NPM package to the NPM registry Create an account on NPM if you don’t already have one. Login to your NPM account in the command line with npm login Enter your username, password, email and OTP
Successful NPM Login via CLI Publish your package with npm publish