为一个包列出尽可能多的关键字(一百个)好吗还是这是一个糟糕的方法?
你应该只使用与你的模块相关的关键字,以及你希望人们在搜索像你这样的模块时使用的关键字.
因此,如果你有一个使用twitter的模块,并且有一个基于promise的api,那么你可以使用"twitter"和"promise"这样的关键字,但你不应该只使用不相关的关键字来垃圾邮件搜索结果.
我想不出任何合理的理由需要这么多关键词.
如何正确列出关键字?
这是我自己的模块caught中的一个例子,如你所见,它使用了4个关键词:
{
"name": "caught",
"version": "0.1.1",
"description": "Avoids UnhandledPromiseRejectionWarning and PromiseRejectionHandledWarning",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "bash test.sh"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rsp/node-caught.git"
},
"keywords": [
"promise",
"async",
"UnhandledPromiseRejectionWarning",
"PromiseRejectionHandledWarning"
],
"author": "Rafał Pocztarski <r.pocztarski@gmail.com> (https://pocztarski.com/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/rsp/node-caught/issues"
},
"homepage": "https://github.com/rsp/node-caught#readme"
}
见: