npm命令

npm doc: https://www.npmjs.org/doc/
package.json doc: https://www.npmjs.org/doc/json.html
template: http://browsenpm.org/package.json


查看包最新版本:

$ npm view <package-name> version
Example

//useful command
$ npm view underscore version
1.5.1

npm prune //去掉多余的包
npm prune --production //去掉dev包
npm install --production  //不安装dev包
npm link
npm publish
npm install async --save


Simply change every dependency's version to *, then run
npm update --save

  "dependencies": {
    "express": "*"
  }
After:
  "dependencies": {
    "express": "~3.2.0",
  }

你可能感兴趣的:(npm)