开发者
开发者指南
描述
因此,您决定使用 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+xWz6gb77iy8V4YjAd5Du5XlpLfqGAtxRQr5kOVuqBQsPrwGJf0XxthwWknb6UE8Tp9+gQfgqLCV2mzFfTv6e7bIOesCu8KDx2cThkQ3Zy649HTNzwYDRd42TFhPuWEeeFPyHVfl0VDdub990gcxsw8mLvSqggkzBrf8UT+YkLjI9rnCxUKkbswMpXYH/LeMibtjkBdCdOzpjktRNA==
- 9Khtbu9KFrvFRG6+Dpb7eBX3ZpVe0ccxn+kKYNpKIY+BF0Kbvt7nbsSNF2ACMjud6Z5JnWHgyWMPiaoPnhyZrfT4rknmDTVx0hJHxAO6qfyvMUvC0BLIgBma9MflqMboBmZGH1yjfhj+Vjat8k66TyyMv1RcVHmjEh7WXC9/4/j3DDWtUk6j8WLjb3pyeg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jWFNyxGA/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
elnpmUkdVRbwFLaEQu1WrwS6F27jpvZhDF/OqGxun3Eqmcnk585OusrOwiJ+qIXbwT5HXUKsEDZH9LF0CxuKUjLgwQESejH/mprP6kzKNObHNABogvEwMSFwOGDoT+Mh
发布你的包
nrUl5/bFi9seUSygCz5cQPcGREgCtIhGfQN3LQ2mUqAX9qJ9enMD3nGv8Ngf5TOXX/MmUqzFdVGVpWvQLGBt3nQBMGqgIvv1Xv34C9VC7UM=
npm publish
mfiGNYVSiGUEfnGqrYcH3UrElJm1VAfmpJkQFrSR11kqlad1f78/jrTimLOft7gcqOvfso/I2RIAYClY1bgQ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