1, https://docs.npmjs.com/ npm documentation Address
2, npm whoami [Current Source] Returns the current username
3, npm publish contract
4, npm unpublish <package> @ <version> packets sent a revocation
5, npm update express update package
6, npm install installation package
7, npm list -g review the installation information
8, npm list grunt view the version number of a module
9, under npm ls / node_modules / directory to see whether the package still exist
10, npm search express search module
11, npm init initialization module
12, npm login create or add users to save .npmrc this file. Function with npm adduser
13, npm adduser add a user to create or save .npmrc this file.
npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
aliases: login, add-user
Reset Password: https://www.npmjs.com/forgot
Modify E-mail address: https://www.npmjs.com/email-edit
14, npm cache clear
can empty the NPM local cache for dealing with the same version number of people released a new version of the code.
Use Taobao NPM mirror
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
version number
NPM to download and use the code will be released when exposed to the version number. NPM using semantic version number to manage the code, here briefly.
Semantic version XYZ is divided into three, representing the major version number, minor version number and patch version numbers. When the code is changed, the version number of the update follow these guidelines.
- If only fix bug, need to update the Z position.
- If you are a new feature, but backward compatible, needs to be updated Y position.
- If there are big changes, not downward compatible, needs to be updated X position.
With this assurance the version number, when the third party package dependencies stated, in addition to rely on a fixed version, it can also depend on a range of the version number. For example "argv": "0.0.x" represents dependent on the 0.0.x series, the latest version of argv.