Dependencies
suggest change{
"dependencies": {
"module-name": "0.1.0"
}
}
- exact:
0.1.0installs that version only. - caret:
^1.2.3installs>=1.2.3 <2.0.0. For a0.xversion the caret stops at the next minor, so^0.1.0means>=0.1.0 <0.2.0, not0.2.0. - tilde or patch range:
~0.1.0or0.1.xinstalls the newest0.1patch, for example0.1.4, and not0.2.0or1.0.0. - wildcard:
*installs the latest version of the module. - git repository: the following will install a tarball from the master branch of a git repo. A
#sha,#tag, or#branchcan also be provided: - GitHub:
user/projectoruser/project#v1.0.0 - url:
git://gitlab.com/user/project.gitorgit://gitlab.com/user/project.git#develop - local path:
file:../lib/project
After adding them to your package.json, run npm install in the project directory.
devDependencies
{
"devDependencies": {
"module-name": "0.1.0"
}
}
Use devDependencies for packages needed only in development, such as tests, styling tools, and proxies. npm install still installs them. They are skipped when NODE_ENV is production, or when you pass --omit=dev.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents