From the course: Angular: Workflows

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Publishing library to NPM

Publishing library to NPM - Angular Tutorial

From the course: Angular: Workflows

Start my 1-month free trial

Publishing library to NPM

- [Instructor] Our library is now developed, built, and tested, and is now ready to published to NPM. Head over to npmjs.com and make sure to create an account with NPM if you don't already have one. Once you create an account, in your terminal, you will login using NPM login. Type in your username and your password, and then your email. Looks like we are logged in. You can verify this with npm whoami. And we have been logged in successfully. Let me go to my terminal here. Let's now configure a few NPM scripts. Head over to the main applications package.json. We will add an NPM script to build our library. Let's call this build:lib and this will call ng build ng-components-vmejia and use the --prod flag. And we will also specify an NPM script for publishing our library. This will use the npm publish command and our files will be in dist/ng-components-vmejia. A quick note about publishing. You should follow semantic versioning for your packages. Major versions means there is a break in…

Contents