W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
退出注冊表
npm logout [--registry=<url>] [--scope=<@scope>]
當登錄到支持基于令牌的身份驗證的注冊表時,告訴服務器結束此令牌的會話。這將在你使用它的任何地方使令牌無效,而不僅僅是對于當前環(huán)境。
當登錄到使用用戶名和密碼身份驗證的舊注冊表時,這將清除用戶配置中的憑據。在這種情況下,它只會影響當前環(huán)境。
如果--scope
提供,這將找到連接到該范圍的注冊表的憑據(如果已設置)。
https?:?//registry.npmjs.org/
Url
npm 包注冊表的基本 URL。如果scope
還指定了,則優(yōu)先。
String
將操作與作用域注冊表的作用域相關聯(lián)。
登錄或退出私有注冊表時很有用:
npm init --scope=@foo --yes# log in, linking the scope to the custom registry
npm login --scope=@mycorp --registry=https://registry.mycorp.com
## log out, removing the link and the auth token
npm logout --scope=@mycorp
這將導致@mycorp
映射到注冊表,以便將來安裝根據模式指定的軟件包?@mycorp/package
。
這也將導致npm init
創(chuàng)建一個作用域包。
## accept all defaults, and create a package named "@foo/whatever",
## instead of just named "whatever"
npm init --scope=@foo --yes
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: