node package to upload npm Public Library

They want to do plug-ins to share out, npm upload your plug-in package is the best choice, ado, directly open dry:

1, we first build a folder, just the first to write a js file, just write the name, naming hello.js:

2, then the command generator package.json npm init file, as follows:

 

3, registration packet warehouse account

  Address: https: //www.npmjs.com/ ( after successful registration will be sent to the mailbox you registered, must go first view, the links point to open the mailbox )

4, at the command line login account npm

  Enter npm adduser command will let you enter the account number, password, email ( password is invisible, so you have entered the correct password Enter on the line )

5, upload package

  Package.json where the file in the current folder open cmd, enter the command npm publish. 

 

  No error will be successful, which can be considered truly successful upload, you can log in npm official website to view their uploaded package, you put the package name to others, others can use npm install the package name to download your uploaded package it!

 

Guess you like

Origin www.cnblogs.com/fqlife/p/11354149.html