擴充套件專案定義
一些額外的屬性由 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> 時應下載的檔案和資料夾列表 |