本文參考了NPM中文文檔寫做而成的html
更改註冊表配置文件上的設置node
npm profile get [--json|--parseable][<property>] npm profile set [--json|--parseable] <property> <value> npm profile set password npm profile enable-2fa [auth-and-writes|auth-only] npm profile disable-2fa
在註冊表上更改您的配置文件信息。若是您使用的是非 npmjs 註冊表,則此功能不可用。git
npm profile get [<property>]:顯示我的資料的全部屬性,或一個或多個特定屬性。看起來像:github
+-----------------+---------------------------+ | name | example | +-----------------+---------------------------+ | email | me@example.com (verified) | +-----------------+---------------------------+ | two factor auth | auth-and-writes | +-----------------+---------------------------+ | fullname | Example User | +-----------------+---------------------------+ | homepage | | +-----------------+---------------------------+ | freenode | | +-----------------+---------------------------+ | twitter | | +-----------------+---------------------------+ | github | | +-----------------+---------------------------+ | created | 2015-02-26T01:38:35.892Z | +-----------------+---------------------------+ | updated | 2017-10-02T21:29:45.922Z | +-----------------+---------------------------+
npm profile set <property> <value>
:設置配置文件屬性的值。您能夠經過如下方式設置如下屬性:電子郵件,全名,主頁,freenode,twitter,githubnpm profile enable-2fa [auth-and-writes|auth-only]
:啓用雙重身份驗證。默認爲 auth-and-writesmode。模式有:npm
全部 npm profile
子命令都會接受--json
並--parseable
會根據這些命令調整其輸出。json
其中一些命令可能在非 npmjs.com 註冊表上不可用。api
本文參考NPM中文文檔網站