开发者

开发者指南

描述

因此,您决定使用 npm 来开发(并且可能发布/部署)您的项目。

极好的!

在用户安装程序的简单步骤之外,您需要做一些事情。

关于这些文件

这些是手册页。如果您安装了 npm,您应该能够执行 man npm-thing 来获取有关特定主题的文档,或者执行 npm help thing 来查看相同的信息。

什么是包

5dAydDppZrsnKYzPQhf8Qg==

    i4yXLsZ4EkiiF59YA8fqr4AH47h5qplp2Ud73qVn6cEAJ76MbfMQ0pWKnWAS/+5wVq6Z5qEPT+2Wbq72s4Uy510bmrjKGyJi+VaGvycZR/uBF6vZpqUFn2FeXK3xBNHD3rE4e7mn7TBPGh340b5hVdJFC9f6IlDBXCZCtZ1oTISyOoYp/DpyH7YLJbF3NNbLy7juZRre2k46JIMwUJwDlSPPmRaL9KwMU9G78c4VcMnh9gbq7adPlIxow8WoBs5k2vD3y78aTNDfidjX5zpr0C29YzpljGCV5/CKpOzQgN34WoiG16Ie9n+jH5uwKB9VlXUjnfwuw0cEErrC4bJbXrjiG0OaUH1Pd3CFVNXj58OMkn0Y+afMN4gX88B3KUvW+TXKMmt0GjPRUFPCrwDLKZC1FUpMb1dCno6ETogW0JgrKbzmX0p1sJ6zwiXHRBG3zPFGodLaKEwxXOxvUNCyj0Gyxod5jbBsulXdv9krNZDPqcSdjvL0c08QoWXHQJgGYjclTvPq1YbC6QYHj4mwlqDR+N7Pg++w8yBlqo7zVzCUevohsPfMy3PB2Jwy+EHTwjq84I7ve2BWZLyJY0ASTtiOIefE0fKVJTQgJkEnBrM=

TlkWij0uOJ6K8br0xCueZi2q7c/kPOFnoPECHT2MEnIm7P6DCjCzzpqCjaLmqDOYyyq8Td8MzwdyraPUcNRUIiNwoG2Y3o7mNos5eEeCAGKPgimRN9b97RUZadhk1/jvbmihxNBzY1B5CTDBjN4/PNL01CNXz0G7TMb7Ns3LFqCMqxFl0lz+jYKoeGPRwLfislGhzRRBv92OYtH09diArwK3fO9gTBiM9MW8bG62JdgqOX3ARRiJYTKJka8WWgKOKacq0t2G++kazHYg75Kwwg==

ZgKqc5Az+UYrBHFgUsJT9fKBZ5MaUfb9Q3+JKCci1qy0VxW0h+qAafgtz13Cfwcv

git://github.com/user/project.git#commit-ish
git+ssh://user@hostname:project.git#commit-ish
git+http://user@hostname/project/blah.git#commit-ish
git+https://user@hostname/project/blah.git#commit-ish

cODU7RE8QzeJ22gJGIeDxvOrf4Dp9kNHFMsNHi4d55vJXJfNUrsFUsGRTN6jbPbQ9i+qxlXryTSIgXzaKAlAHmgfKPxcdROarQzVeIAuCJSG2o1p6OgFgRF3fLBrX10l3sEEgZo0zvmBDbs4QZd2/PhhzuY3qDqlJ/nBirOOcBcTthmhhZcK24QRk8fTmzxhP2/XWqnKMqOyFZ0U6P5VenN/JMwqvCL2tHWZb29WHsNLwny2HPEj2n4kyuWnbZX4

package.json 文件

EWv5Pti9jQ4HoFJj+ptbQLp3o3hEiIofKNO2uLcs/ZpOb30Oo41eKPWHCG30LQAUWgUbYWNn4wa9IDPQNI+THmSkI/Wt81sqv71Q5T8I97SDqg7ScjWa8Zy26t500ym10rbbwRhccSpL9gUVD6Vs2T1Ab6vBUcHNLhj4v3OdFkS3Z3BOfnhK1ioEMoIiJ78TCa3vD1ILzAL9nEx3kXRQhQ==

LPgC+xWz6gb77iy8V4YjAd5Du5XlpLfqGAtxRQr5kOVuqBQsPrwGJf0XxthwWknbIF4HV3jTNGkwOe6kt8Jyh+iUFAST5pOG6jmqrrLjXrNqcUZJjccx6mnw+YKFxO1PXc+UD4lTmxPP4DM59KAYHtx0jd0UjAXWTUmsx6/z8jIF0K6+qzt4KTBr5qoXAULJ9/ulDD/Bl87TUD8X38Unww==

    9Khtbu9KFrvFRG6+Dpb7eBX3ZpVe0ccxn+kKYNpKIY+BF0Kbvt7nbsSNF2ACMjud6Z5JnWHgyWMPiaoPnhyZrfT4rknmDTVx0hJHxAO6qfyvMUvC0BLIgBma9MflqMboBmZGH1yjfhj+Vjat8k66TyyMv1RcVHmjEh7WXC9/4/j3DDWtUk6j8WLjb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s4Z5YBzwDYnzGkm3ky/boj1Jzl99ReSBZNWLqSILGInX1/4PH5Ko6x8eE1HsfENx7cxQtWH1Jy4W4/HdUszWXhF0YbQKeIX9H+3Nh+iMTBcN/DAUVVJkBNy7QhVxML7bJuzn+jLf/W0D6AvQAywsQNtv7qWI69bG2fsMBov9RWKr4ffrZQz37bBY3WM9IcbwNJDDTqP3pjB8eMQN+TSpJg7A==

Sms8RWseK/HDofYz2CF3sCmBLVM2ZbC8EQxBklVaPAYNYx8cWG3le5cwU5ZJ+H8z+XL+KFWXSZHARispFOcklCJxnStgJdGQGZjEcp0rIukG9AY49Xptb5RN+MGc0FkirKw84BsCO06AGXfUP+BujU9IZYKBNZID2ScFNsiiiuQ8nKH0NRYw8quDnBm7YUunw44QDBHPRjPiEumdqzED0BU0MF/4JDpeDB3BETaFWfAyTtztIsJHTNma5o9F+WGN2uMqc4igeJEGlVoOawKGcQ==

tLMl83zB8A+FDSDfalJA5cxdxkp3tKAliSH0AZlL0cVKFit93nVsH76AAw3BYFmACJFYAfqpcRabV/550Qqgn5tuMSy2leKpsTJ1fkffbeWJpI1EpS2SNuiuS4sb1dUd

发布之前:确保您的包安装和工作

hxSKC+2VVzwC3KFMzEolIBAtaVNSVDWtIodGUE+P6gdUrTHNrRLiVB1oZsKzvfcA

umYiHZBcL63iRy03SI5PX10mUZA4t5xlcc5hS6g6B88U0NZUYsoDiI0oI/9Ozu+bcwUPgZd0PKbq0Ryq+hKoXpJEJiBhc1Vp/zP7LmeyfbgoOqZ8Juhl3miUurq2yBWfeR2AI9OLZnmyF2KFWj9ODyURkWO8f86Ap0RI3tNXu0zbtNYP0UeKV/xlnF1bZnYzEIFkMIO/k0mo2Fs+nqYS76CZCxcXedslCNcJvXCwIqGNzOw+UUh56EfA44VPioYLp2KBJDVEqak292QJqIS+/A==

rYpWk+0KX7qgZjsiMdXPSx/qD/89ODA0SCOwuzvi69HJPka2wkZ4sCKbziioNmqp

npm install . -g

bAuWhsTGaX+oiCLVcXuChVc5JA8gMG1ssLvoQCGyuzloPMsMsFZMA28iip6xjAQdYIADQ+3jFpOVIq+4pQjWFNyxGA/AjsI37Sya0JoMc0bYb+1ftzJ9AmwMOKwc1QQGGKNaN76u0EDb4H1aUv+k16l5VtDQNCX4GFa17+qNeoT3rmUtmhh1/QWJaHp8Nrx3

npm link

yUyFFEzcTkIKVZ8bFENlt5Cs6IQG+KDvCIEnZ38XW3J9b7Ah8Y39Dm2KT9UqfNPkRDiOuraJD5n61gfIZCSNxA==

Rr2KtWqb3eyXa80FXHXpZMdcavrIFw1OMm3NJqgaEWlvoCaZhPib2MKXjruLrpsdh2ha47+nU32BNxFsnO0NLybSRhjYSkqfWXdN4DGhvGg=

cd ../some-other-folder
npm install ../my-package

xddr8NJT29yZS8gwfio3L4PEquA4xywORyiYPV6H3Bklu6Rnh1VaLS9HuJ7I9/U8f5QMnLO1SlLPyA0/rLYpAMvWlixnRFWAf3K5CgkMYzE=

52QNy1fT3Sjf0EWp+2F0+iuK/f+STzXgjWSKACS3tfC55ifHF7GMsv+F52NOdbQ+cL96aqlaBUJZYT/D3qhydc6fOIQCMHEQ+Ms/dwLV2z84TLfpOFfBgKbs80sWRz8o

创建用户账户

QomW1jVZfyY9ZrD1rNVfNwiv0WysQgYsEwBKYU+qzdbQqoTnow5B60ocx0IH5WVSGBFOABnMrPSZUycB8vdwrA==

npm adduser

vgBbDethJ21ypcqpySSR07FvRWc2QUEFtzu1DLItWmzcfOvezy9Gzhzh7FEVhAVj

elnpmUkdVRbwFLaEQu1Wr7PewZ8zVerTABFpjcvhS1AFcc6W/9h80kXRf2P4xyDZYLkcLVOCBfgANCUYpC1OxA1cfMWuduunN/8mJPGhunX3zSR9m/1GEq2VMUtukahN

发布你的包

nrUl5/bFi9seUSygCz5cQPcGREgCtIhGfQN3LQ2mUqAX9qJ9enMD3nGv8Ngf5TOXX/MmUqzFdVGVpWvQLGBt3nQBMGqgIvv1Xv34C9VC7UM=

npm publish

mfiGNYVSiGUEfnGqrYcH3UrElJm1VAfmpJkQFrSR11kqlad1f78/jrTimLOft7gcqOvfso/I2RIAYClY1bgQdjMgT/kAO1aS8HLbkh9b5F1ncY00sS3PV9YsI6S9ByDFqwBjPFJsx3QgJvCJy8bQ08FKDhpkYBMnenrgCnnhQ5w=

g98BW6lt+r+LPV64E1lUB1Y1PsQoBGfhGJQN195swLVmyUjOb1pkrhDMttMYPXhNxbX1HWynYP1JA9rKNJ6AnoUqAirkJcINGqUeScS1NOntFjd/yWuFPCNuaDQOS5W6ucjWXVbrQKQmSI5PpIIKrSN2+oJB4ssJG94pjNciYkr/zgQN+JWpkna7xfN2UMHyNzi5J6Dsi9gVr+3obdbCr8sapOV5n+o/RgU0g4epUYPUD5h5U8Kj9Q4TPmFke8J/wJacR7LO4OG0KReJKDi2yw==

宣传它

sp27+TtBZRQGxSbjJVBOGiaqclBCTX2Z5Tu7HMVlgnLAsHJRIrYCGWg+OBh17h2jOXRqBEz8Jjr5OdH4Rg29Qw==

Z0EgmBkfwVzmXlIuFRYxQTcJhoOJPGeKt5ISqb6nFOZszsliSHWNR6CX/wPFdY8UfNb5prCNBZPGivrg03vg3A==