xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

npm registry All In One

npm registry All In One

npm-config

https://docs.npmjs.com/cli/v7/commands/npm-config

npm config set <key>=<value> [<key>=<value> ...]
npm config get [<key> [<key> ...]]
npm config delete <key> [<key> ...]
npm config list [--json]
npm config edit
npm set <key>=<value> [<key>=<value> ...]
npm get [<key> [<key> ...]]

alias: c

npm config set key=value [key=value...]
npm set key=value [key=value...]

``sh
npm config get [key ...]
npm get [key ...]




## demo

```sh
$ npm config list --json


{
  "json": true,
  "user-agent": "npm/6.14.4 node/v12.18.0 darwin x64",
  "metrics-registry": "https://registry.npmjs.org/",
  "scope": "",
  "home": "https://www.npmjs.org",
  "registry": "https://registry.npmjs.org/",
  "access": null,
  "allow-same-version": false,
  "always-auth": false,
  "also": null,
  "audit": true,
  "audit-level": "low",
  "auth-type": "legacy",
  "before": null,
  "bin-links": true,
  "browser": null,
  "ca": null,
  "cache": "/Users/xgqfrms-mbp/.npm",
  "cache-lock-stale": 60000,
  "cache-lock-retries": 10,
  "cache-lock-wait": 10000,
  "cache-max": null,
  "cache-min": 10,
  "cert": null,
  "cidr": null,
  "color": true,
  "depth": null,
  "description": true,
  "dev": false,
  "dry-run": false,
  "editor": "vi",
  "engine-strict": false,
  "force": false,
  "format-package-lock": true,
  "fund": true,
  "fetch-retries": 2,
  "fetch-retry-factor": 10,
  "fetch-retry-mintimeout": 10000,
  "fetch-retry-maxtimeout": 60000,
  "git": "git",
  "git-tag-version": true,
  "commit-hooks": true,
  "global": false,
  "globalconfig": "/Users/xgqfrms-mbp/.nvm/versions/node/v12.18.0/etc/npmrc",
  "global-style": false,
  "group": 20,
  "ham-it-up": false,
  "heading": "npm",
  "if-present": false,
  "ignore-prepublish": false,
  "ignore-scripts": false,
  "init-module": "/Users/xgqfrms-mbp/.npm-init.js",
  "init-author-name": "",
  "init-author-email": "",
  "init-author-url": "",
  "init-version": "1.0.0",
  "init-license": "ISC",
  "key": null,
  "legacy-bundling": false,
  "link": false,
  "loglevel": "notice",
  "logs-max": 10,
  "long": false,
  "maxsockets": 50,
  "message": "%s",
  "node-options": null,
  "node-version": "12.18.0",
  "offline": false,
  "onload-script": null,
  "only": null,
  "optional": true,
  "otp": null,
  "package-lock": true,
  "package-lock-only": false,
  "parseable": false,
  "prefer-offline": false,
  "prefer-online": false,
  "prefix": "/Users/xgqfrms-mbp/.nvm/versions/node/v12.18.0",
  "preid": "",
  "production": false,
  "progress": true,
  "proxy": null,
  "https-proxy": null,
  "noproxy": null,
  "read-only": false,
  "rebuild-bundle": true,
  "rollback": true,
  "save": true,
  "save-bundle": false,
  "save-dev": false,
  "save-exact": false,
  "save-optional": false,
  "save-prefix": "^",
  "save-prod": false,
  "script-shell": null,
  "scripts-prepend-node-path": "warn-only",
  "searchopts": "",
  "searchexclude": null,
  "searchlimit": 20,
  "searchstaleness": 900,
  "send-metrics": false,
  "shell": "/bin/zsh",
  "shrinkwrap": true,
  "sign-git-commit": false,
  "sign-git-tag": false,
  "sso-poll-frequency": 500,
  "sso-type": "oauth",
  "strict-ssl": true,
  "tag": "latest",
  "tag-version-prefix": "v",
  "timing": false,
  "tmp": "/var/folders/qm/csrtpvpn62x82v4zykvsrnw80000gn/T",
  "unicode": true,
  "unsafe-perm": true,
  "update-notifier": true,
  "usage": false,
  "user": 501,
  "userconfig": "/Users/xgqfrms-mbp/.npmrc",
  "umask": 18,
  "version": false,
  "versions": false,
  "viewer": "man",
  "globalignorefile": "/Users/xgqfrms-mbp/.nvm/versions/node/v12.18.0/etc/npmignore"
}

refs

https://docs.npmjs.com/cli/v7/using-npm/registry

https://docs.npmjs.com/cli/v6/using-npm/registry



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-08-20 00:00  xgqfrms  阅读(36)  评论(1编辑  收藏  举报