NpmRunScriptAliases.

NpmRunScript(ICakeContext, string, IEnumerable<string>) Method

Summary

Runs a npm script defined in the package.json from the current folder with specific arguments.
Assembly
Cake.Npm.dll
Namespace
Cake.Npm
Containing Type
NpmRunScriptAliases

Syntax

public static void NpmRunScript(this ICakeContext context, string scriptName, IEnumerable<string> arguments)

Examples

NpmRunScript("hello", new List<string> { "--foo=bar" });

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
scriptName string Name of the script to execute as defined in package.json.
arguments IEnumerable<string> Arguments to pass to the target script

Return Value

Type Description
void