Tutorial by Examples

{ "name": "my-project", "version": "0.0.1", "description": "This is a project.", "author": "Someone <[email protected]>", "contributors": [{ "name": "Som...
"dependencies": { "module-name": "0.1.0" } exact: 0.1.0 will install that specific version of the module. newest minor version: ^0.1.0 will install the newest minor version, for example 0.2.0, but won't install a module with a higher major version e.g. 1.0.0 newe...
You can define scripts that can be executed or are triggered before or after another script. { "scripts": { "pretest": "scripts/pretest.js", "test": "scripts/test.js", "posttest": "scripts/posttest.js" } } ...
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:/...
A package.json file, usually present in the project root, contains metadata about your app or module as well as the list of dependencies to install from npm when running npm install. To initialize a package.json type npm init in your command prompt. To create a package.json with default values use...

Page 1 of 1