Using Package.json
The Package.json is located in the module's directory and is used to define the properties of the package. Next, let's look at the Package.json file for the Express package, located in Node_modules/express/package.json content:
{ "Name": "Express", "description": "Fast, unopinionated, minimalist web framework", "Version": "4.13.3", "Author": { "Name": "TJ Holowaychuk", "Email": "[email protected]" }, "Contributors": [ { "Name": "Aaron Heckmann", "Email": "[email protected]" }, { "Name": "Ciaran Jessup", "Email": "[email protected]" }, { "Name": "Douglas Christopher Wilson", "Email": "[email protected]" }, { "Name": "Guillermo Rauch", "Email": "[email protected]" }, { "Name": "Jonathan Ong", "Email": "[email protected]" }, { "Name": "Roman Shtylman", "Email": "[email protected]" }, { "Name": "Young Jae Sim", "Email": "[email protected]" } ], "License": "MIT", "Repository": { ' type ': ' Git ', "url": "Git+https://github.com/strongloop/express.git" }, "Homepage": "http://expressjs.com/", "keywords": [ "Express", "Framework", "Sinatra", "Web", "Rest", "RESTful", "Router", "App", "API" ], "Dependencies": { "Accepts": "~1.2.12", "Array-flatten": "1.1.1", "Content-disposition": "0.5.0", "Content-type": "~1.0.1", "Cookie": "0.1.3", "Cookie-signature": "1.0.6", "Debug": "~2.2.0", "DEPD": "~1.0.1", "escape-html": "1.0.2", "ETag": "~1.7.0", "Finalhandler": "0.4.0", "Fresh": "0.3.0", "Merge-descriptors": "1.0.0", "Methods": "~1.1.1", "on-finished": "~2.3.0", "parseURL": "~1.3.0", "Path-to-regexp": "0.1.7", "Proxy-addr": "~1.0.8", "QS": "4.0.0", "Range-parser": "~1.0.2", "Send": "0.13.0", "Serve-static": "~1.10.0", "Type-is": "~1.6.6", "Utils-merge": "1.0.0", "Vary": "~1.0.1" }, "Devdependencies": { "After": "0.8.1", "Ejs": "2.3.3", "Istanbul": "0.3.17", "Marked": "0.3.5", "Mocha": "2.2.5", "Should": "7.0.2", "SuperTest": "1.0.1", "Body-parser": "~1.13.3", "Connect-redis": "~2.4.1", "Cookie-parser": "~1.3.5", "Cookie-session": "~1.2.0", "Express-session": "~1.11.3", "Jade": "~1.11.0", "Method-override": "~2.3.5", "Morgan": "~1.6.1", "Multiparty": "~4.1.2", "Vhost": "~3.0.1" }, "Engines": { "Node": ">= 0.10.0" }, "Files": [ "LICENSE", "History.md", "Readme.md", "Index.js", "Lib/" ], "Scripts": {"test": "Mocha--require test/support/env--reporter spec--bail--check-leaks test/test/acceptance/", " Test-ci ":" Istanbul cover Node_modules/mocha/bin/_mocha--report lcovonly----require test/support/env--reporter spec- -check-leaks test/test/acceptance/"," Test-cov ":" Istanbul cover Node_modules/mocha/bin/_mocha----require test/ Support/env--reporter dot--check-leaks test/test/acceptance/"," Test-tap ":" Mocha--require test/support/env-- Reporter tap--check-leaks test/test/acceptance/"}," Githead ":" ef7ad681b245fba023843ce94f6bcb8e275bbb8e "," bugs ": {" URL ":" Https://github.com/strongloop/express/issues "}," _id ":" [email protected] "," _shasum ":" Ddb2f1fb4502bf33598d2b032b037960ca6c80a3 "," _from ":" [email protected]* "," _npmversion ":" 1.4.28 "," _npmUser ": {"Name": "Dougwilson", "email": "[email protected]"}, "maintainers": [{"Name": "Tjholowaychuk", "email": "[email protected] "},{" name ":" Jongleberry "," email ":" [email protected] "},{" name ":" Dougwilson "," email ":" [ Email&nbSp;protected] "},{" name ":" Rfeng "," email ":" [email protected] "},{" name ":" Aredridel "," email ":" [email Protected] "},{" name ":" Strongloop "," email ":" [email protected]gloop.com "},{" name ":" Defunctzombie "," email ":" [ Email protected] "}", "dist": {"shasum": "Ddb2f1fb4502bf33598d2b032b037960ca6c80a3", "tarball": "/HTTP/ Registry.npmjs.org/express/-/express-4.13.3.tgz "}," directories ": {}," _resolved ":" https://registry.npmjs.org/ Express/-/express-4.13.3.tgz "," Readme ":" Error:no Readme data found! "}
Package.json Property Description
name -the package name.
Version-number of the package.
Description -Description of the package.
Homepage -the website URL of the package.
author -The name of the author of the package.
Contributors -Other contributors ' names for the package.
Dependencies -List of dependent packages. If a dependent package is not installed, NPM will automatically install the dependent package in the Node_module directory.
Repository -the type of place where the package code is stored can be git or svn,git available on Github.
The main-main field is a module ID, which is a main item that points to your program. That is, if the name of your package is called Express, then the user installs it and then require ("Express").
Keywords -keywords
Original http://www.runoob.com/nodejs/nodejs-npm.html
Nodejs Package.json Detailed interpretation