This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Npm.
Summary
Installs packages using the settings returned by a configurator.
- Assembly
- Cake
.Npm .dll - Namespace
- Cake
.Npm - Containing Type
- NpmInstallAliases
Syntax
public static void NpmInstall(this ICakeContext context, Action<NpmInstallSettings> configurator)
Examples
Install packages in a specific working directory ('npm install')
NpmInstall(settings => settings.FromPath(@"c:\myproject"));
Force fetching of remote resources ('npm install --force')
NpmInstall(settings => setting.WithForce());
Install gulp globally ('npm install gulp -g')
NpmInstall(settings => settings.AddPackage("gulp").InstallGlobally());
Ignore devDependencies while installaling packages of the project in the current directory ('npm install --production')
NpmInstall(settings => setting.OnProduction());
Use specific log level ('npm install')
NpmInstall(settings => settings.WithLogLevel(NpmLogLevel.Verbose));
Attributes
Type | Description |
---|---|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
configurator | Action |
The settings configurator. |
Return Value
Type | Description |
---|---|
void |