package.json:
*Dependencies
“dependencies”: {
"module-name": "0.1.0"
}
0.1.0 will install that specific version of the module.
^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
0.1.x or ~0.1.0 will install the newest patch version available, for example 0.1.4, but won’t install a module with higher major or minor version, e.g. 0.2.0 or 1.0.0.
\* will install the latest version of the module.
#sha, #tag or #branch can also be provided:
user/project or user/project#v1.0.0
git://gitlab.com/user/project.git or git://gitlab.com/user/project.git#develop
file:../lib/project
After adding them to your package.json, use the command npm install in your project directory in terminal.
"devDependencies": {
"module-name": "0.1.0"
}
For dependencies required only for development, like testing styling proxies ext. Those dev-dependencies won’t be installed when running “npm install” in production mode.