Publish npm packages from the command line
TFS 2017
Follow this quick tutorial to learn how to connect your npm client to your feed and publish your packages using the command line. If you don't have a feed yet, you can follow the steps in the quickstart to Create your own feed.
Project setup
From within your project, select Artifacts and then select Connect to feed.
Select npm and then follow the instructions under Project setup to configure your .npmrc file.
Publish npm packages
Open a command prompt window and navigate to the directory that contains your package.json. If you don't have a package.json file, run the following command:
npm init
Run the following command in your project directory to publish your npm packages:
npm publish
Restore npm packages
Run the following command in your project directory to restore your npm packages:
npm install