NpmInstallSettings Class

Summary

Contains settings used by NpmInstaller.
Assembly
Cake.Npm.dll
Namespace
Cake.Npm.Install
Base Types
graph BT Type-->Base0["NpmSettings"] click Base0 "/api/Cake.Npm/NpmSettings" Base0-->Base1["ToolSettings"] Type["NpmInstallSettings"] class Type type-node

Syntax

public class NpmInstallSettings : NpmSettings

Constructors

Name Summary
NpmInstallSettings() Initializes a new instance of the NpmInstallSettings class.

Properties

Name Value Summary
Command string
Gets the command which should be run.
Inherited from NpmSettings
Force bool
Gets a value indicating whether npm should fetch remote resources even if a local copy exists on disk.
Global bool
Gets a value indicating whether the package should be installed globally rather than locally.
LogLevel NpmLogLevel
Gets or sets the log level which should be used to run the npm command.
Inherited from NpmSettings
NoOptional bool
Gets a value indicating whether npm should prevent optional dependencies from being installed (the --no-optional argument)
Packages IList<string>
Gets the list of packages which should be installed.
PreferOffline bool
Gets or sets a value indicating whether or not to utilise the prefer offline flag, avoiding going to the internet for packages if possible.
Production bool
Gets a value indicating whether npm should ignore modules listed in
devDependencies
.
RedirectStandardError bool
Gets or sets the process option to redirect standard error output.
Inherited from NpmSettings
RedirectStandardOutput bool
Gets or sets the process option to redirect standard output.
Inherited from NpmSettings
Registry Uri
Gets or sets a value indicating which registry we should point to. Defaulted to whatever the NPM configuration is.
StandardErrorAction Action<string>
Gets or sets an action to retrieve and process standard error output.
Inherited from NpmSettings
StandardOutputAction Action<string>
Gets or sets an action to retrieve and process standard output.
Inherited from NpmSettings

Methods

Name Value Summary
EvaluateCore(ProcessArgumentBuilder) void
Evaluates the settings and writes them to args.

Extension Methods

Name Value Summary
AddPackage(string, string, string) NpmInstallSettings
Install a package by name, version/tag and scope.
Requires the Cake.Npm addin
AddPackage(string, string) NpmInstallSettings
Install a package by name and version/tag.
Requires the Cake.Npm addin
AddPackage(string) NpmInstallSettings
Install a package by name, version/tag.
Requires the Cake.Npm addin
AddPackage(Uri) NpmInstallSettings
Install a package from a specific url.
Requires the Cake.Npm addin
AddScopedPackage(string, string) NpmInstallSettings
Install a scoped package by name, version/tag.
Requires the Cake.Npm addin
Dump<NpmInstallSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
ForProduction() NpmInstallSettings
Defines that npm should ignore modules listed in devDependencies.
Requires the Cake.Npm addin
FromPath(DirectoryPath) NpmSettings
Sets the working directory which should be used to run the npm command.
Requires the Cake.Npm addin
FromRegistry(Uri) NpmInstallSettings
Instructs npm to look for packages in the given registry.
Requires the Cake.Npm addin
InstallGlobally() NpmInstallSettings
Defines that the package should be installed globally.
Requires the Cake.Npm addin
InstallLocally() NpmInstallSettings
Defines that the package should be installed locally.
Requires the Cake.Npm addin
IsIn<NpmInstallSettings>(NpmInstallSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<NpmInstallSettings>(string) void
Requires the Cake.Issues addin
NotNull<NpmInstallSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
SetRedirectedStandardErrorHandler(Action<string>) NpmSettings
Sets the StandardError-Action
Requires the Cake.Npm addin
SetRedirectedStandardOutputHandler(Action<string>) NpmSettings
Sets the StandardOutput-Action
Requires the Cake.Npm addin
ThrowIfNull<NpmInstallSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<NpmInstallSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin
WithForce(bool) NpmInstallSettings
Defines whether npm should fetch remote resources even if a local copy exists on disk.
Requires the Cake.Npm addin
WithForce() NpmInstallSettings
Defines that npm should fetch remote resources even if a local copy exists on disk.
Requires the Cake.Npm addin
WithLogLevel(NpmLogLevel) NpmSettings
Sets the log level which should be used to run the npm command.
Requires the Cake.Npm addin
WithNoOptional(bool) NpmInstallSettings
Defines whether npm should prevent optional dependencies from being installed
Requires the Cake.Npm addin
WithOptionalDependencies() NpmInstallSettings
Defines that npm should install optional dependencies
Requires the Cake.Npm addin
WithoutForce() NpmInstallSettings
Defines that npm should not fetch remote resources if a local copy exists on disk.
Requires the Cake.Npm addin
WithoutOptionalDependencies() NpmInstallSettings
Defines that npm should prevent optional dependencies from being installed
Requires the Cake.Npm addin