- name
- 包名。
- version
- 包的版本号。
- description
- 包的描述。
- homepage
- 包的官网 url 。
- author
- 包的作者姓名。
- contributors
- 包的其他贡献者姓名。
- dependencies
- 依赖包列表。如果依赖包没有安装,npm 会自动将依赖包安装在 node_module 目录下。
- repository
- 包代码存放的地方的类型,可以是 git 或 svn,git 可在 Github 上。
- main
- main 字段指定了程序的主入口文件,require('moduleName') 就会加载这个文件。这个字段的默认值是模块根目录下面的 index.js。
- keywords
- 关键字