Publish delete update custom package on npm

On the premise of successfully owning npm users, I want to publish my own package to npm. Here I use my own method to summarize the operation process, hope it will be helpful.
Click to enter npm official website: https://www.npmjs.com/

  1. First of all, create a new folder and open the control terminal to run the command.
    Insert picture description here
    Next is the following:
    Insert picture description here
    this time day01 becomes a package (package.json is generated):
    Insert picture description here
    Insert picture description here

  2. The second step is to complete the first step. After writing the package, we want to publish it. Before publishing, we must log in and run the command in the terminal:
    Insert picture description here

  3. The third step is to publish. Run the command in the terminal:
    Insert picture description here
    the mailbox filled in during runtime will receive the file:
    Insert picture description here

If the npm mirror address is still Taobao, an error will be reported:
Insert picture description here
modify the npm Taobao address to the original npm official address: click to view the modification method: https://blog.csdn.net/Menqq/article/details/109569342#comments_13766219

Succeed in Npm official website to search published package
Insert picture description here
successfully posted

When we update the package and want to republish it :
a. Go to the json folder and change the version number:
Insert picture description here

b. Publish again and run the command in the terminal:
Insert picture description here
c. Search or refresh again on the npm official website: the
Insert picture description here
update is successful

Next, if you want to delete a package, run the command in the terminal:
Insert picture description here
search or refresh again on the npm official website :
Insert picture description here
successfully deleted

Guess you like

Origin blog.csdn.net/Menqq/article/details/109571524