NpmRebuildAliases.

NpmRebuild(ICakeContext, NpmRebuildSettings) Method

Summary

Rebuilds packages using the specified settings.
Assembly
Cake.Npm.dll
Namespace
Cake.Npm
Containing Type
NpmRebuildAliases

Syntax

public static void NpmRebuild(this ICakeContext context, NpmRebuildSettings settings)

Examples

Rebuild packages in a specific working directory ('npm rebuild')

var settings = 
        new NpmRebuildSettings 
        {
            WorkingDirectory = "c:\myproject"
        };
    NpmRebuild(settings);

Rebuild gulp ('npm rebuild gulp')

var settings = 
        new NpmRebuildSettings 
        {
            Global = true
        };
    settings.AddPackage("gulp");
    NpmRebuild(settings);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings NpmRebuildSettings The settings.

Return Value

Type Description
void