Here's an instance of the package.json file that express.js generates
{ "name": "packagename", "version": "0.0.1", "private": true, "dependencies": { "express": "2.5.5", "stylus": "0.22.2" } }
It's fairly obvious that I can add packages to the dependencies object. However I have no idea what "private": true
means. Nor do I know what syntax I can use in the dependencies value fields. I've Googled for quite a while without discovering anything.
What I'm wondering is pretty much if a complete summary of all settings that the package.json file can contain exists, as I could not find one. I haven't checked man
since I'm on a windows PC.
Thanks
Your package. json holds important information about the project. It contains human-readable metadata about the project (like the project name and description) as well as functional metadata like the package version number and a list of dependencies required by the application.
A package. json is a JSON file that exists at the root of a Javascript/Node project. It holds metadata relevant to the project and it is used for managing the project's dependencies, scripts, version and a whole lot more.
The easiest way to create a package. json file is to run npm init to generate one for you. It will ask you to fill out some fields, and then create a package. json file in the current directory.
json is an auto-generated Node. js NPM package file for your project. You cannot directly edit this file from within Autocode. Autocode will automatically parse your entire project for NPM dependencies and add them automatically.
You're looking for the output of npm help json
. It is available in Markdown format on NPM's GitHub project.
Also check out this interactive guide:
Besides the official guide for package.json from NPM, the guys from Nodejitsu made a nice cheatsheet for it: http://package.json.nodejitsu.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With