NpmAddUserAliases.

NpmAddUser(ICakeContext, Action<NpmAddUserSettings>) Method

Summary

Adds user using the settings returned by a configurator.
Assembly
Cake.Npm.dll
Namespace
Cake.Npm
Containing Type
NpmAddUserAliases

Syntax

public static void NpmAddUser(this ICakeContext context, Action<NpmAddUserSettings> configurator)

Examples

Base url of package registry ('npm adduser --registry=http://myregistry.example.com')

NpmAddUser(settings => setting.ForRegistry("http://myregistry.example.com"));

Scope assoicated with the user ('npm adduser --scope=@cake')

NpmAddUser(settings => settings.ForScope("@cake"));

Indicates that all requests to the given registry should include authorization information ('npm adduser --registry=http://private-registry.example.com --always-auth')

NpmAddUser(settings => settings.AlwaysAuthenticate());

What authentication strategy to use ('npm adduser --auth-type=legacy')

NpmAddUser(settings => setting.UsingAuthentication(AuthType.Legacy));

Use specific log level ('npm adduser')

NpmAddUser(settings => settings.WithLogLevel(NpmLogLevel.Verbose));

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
configurator Action<NpmAddUserSettings> The settings configurator.

Return Value

Type Description
void