Node.js package.json Extended project definition


Example

Some of the additional attributes are parsed by the npm website like repository, bugs or homepage and shown in the infobox for this packages

{
  "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
  ]
}
FieldDescription
mainEntry script for this package. This script is returned when a user requires the package.
repositoryLocation and type of the public repository
bugsBugtracker for this package (e.g. github)
homepageHomepage for this package or the general project
filesList of files and folders which should be downloaded when a user does a npm install <packagename>