Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NpmLoginCommand

Hierarchy

Properties

Methods

Properties

cwd

cwd: undefined | string = Option.String(`--cwd`, {hidden: true})

publish

publish: boolean = Option.Boolean(`--publish`, false, {description: `Login to the publish registry`,})

scope

scope: undefined | string = Option.String(`-s,--scope`, {description: `Login to the registry configured for a given scope`,})

Static paths

paths: string[][] = [[`npm`, `login`],]

Static usage

usage: Usage = Command.Usage({category: `Npm-related commands`,description: `store new login info to access the npm registry`,details: `This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.Adding the \`-s,--scope\` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also \`npmScopes\`).Adding the \`--publish\` flag will cause the authentication to be done against the registry used when publishing the package (see also \`publishConfig.registry\` and \`npmPublishRegistry\`).`,examples: [[`Login to the default registry`,`yarn npm login`,], [`Login to the registry linked to the @my-scope registry`,`yarn npm login --scope my-scope`,], [`Login to the publish registry for the current package`,`yarn npm login --publish`,]],})

Methods

execute

  • execute(): Promise<0 | 1>

Generated using TypeDoc