From 95be8d6dd0085bf3186a5c7b2a20dc4ab19c344a Mon Sep 17 00:00:00 2001 From: Bharatesh <64769271+bharateshwq@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:39:12 +0530 Subject: [PATCH] npm-adduser: add page (#14418) --- pages/common/npm-adduser.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/npm-adduser.md diff --git a/pages/common/npm-adduser.md b/pages/common/npm-adduser.md new file mode 100644 index 0000000000..347dd540f2 --- /dev/null +++ b/pages/common/npm-adduser.md @@ -0,0 +1,20 @@ +# npm adduser + +> Add a registry user account. +> More information: . + +- Create a new user in the specified registry and save credentials to `.npmrc`: + +`npm adduser --registry={{registry_url}}` + +- Log in to a private registry with a specific scope: + +`npm login --scope={{@mycorp}} --registry={{https://registry.mycorp.com}}` + +- Log out from a specific scope and remove the auth token: + +`npm logout --scope={{@mycorp}}` + +- Create a scoped package during initialization: + +`npm init --scope={{@foo}} {{--yes}}`