YarnRunner.

Add(Action<YarnAddSettings>) Method

Summary

execute 'yarn add' with options
Assembly
Cake.Yarn.dll
Namespace
Cake.Yarn
Containing Type
YarnRunner

Syntax

public IYarnRunnerCommands Add(Action<YarnAddSettings> configure = null)

Examples

Run 'yarn add gulp'

Task("Yarn-Add-Gulp")
    .Does(() =>
{
    Yarn.Add(settings => settings.Package("gulp"));
});

Run 'yarn global add gulp'

Task("Yarn-Add-Gulp")
    .Does(() =>
{
    Yarn.Add(settings => settings.Package("gulp").Globally());
});

Parameters

Name Type Description
configure Action<YarnAddSettings> options when running 'yarn install'

Return Value

Type Description
IYarnRunnerCommands