扩展项目定义
一些额外的属性由 npm 网站解析,如 repository
,bugs
或 homepage
,并在信息框中显示此包
{
"main": "server.js",
"repository" : {
"type": "git",
"url": "git+https://github.com/<accountname>/<repositoryname>.git"
},
"bugs": {
"url": "https://github.com/<accountname>/<repositoryname>/issues"
},
"homepage": "https://github.com/<accountname>/<repositoryname>#readme",
"files": [
"server.js", // source files
"README.md", // additional files
"lib" // folder with all included files
]
}
领域 | 描述 |
---|---|
主要 | 此包的输入脚本。当用户需要包时,将返回此脚本。 |
知识库 | 公共存储库的位置和类型 |
虫子 | 这个包的 Bugtracker(例如 github) |
主页 | 此套餐或一般项目的主页 |
档 | 用户执行 npm install <packagename> 时应下载的文件和文件夹列表 |