GruntRunnerAliases.

Grunt(ICakeContext) Method

Summary

Allows access to the grunt task orchestrator for either the local or global installation
Assembly
Cake.Grunt.dll
Namespace
Cake.Grunt
Containing Type
GruntRunnerAliases

Syntax

public static GruntRunnerFactory Grunt(this ICakeContext context)

Examples

Run 'grunt' from your local grunt installation

Cake task:

Task("Grunt")
    .Does(() =>
{
    Grunt.Local.Execute();
});

Run 'grunt' from your global grunt installation

Cake task:

Task("Grunt")
    .Does(() =>
{
    Grunt.Global.Execute();
});

Run 'grunt --gruntfile gruntbuild.js'

Cake task:

Task("Grunt")
    .Does(() =>
{
    Grunt.Local.Execute(settings => settings.WithGruntFile("gruntbuild.js"));
    
    Grunt.Global.Execute(settings => settings.WithGruntFile("gruntbuild.js"));
});

Run 'grunt ci'

Cake task:

Task("Grunt")
    .Does(() =>
{
    Grunt.Local.Execute(settings => settings.WithArguments("ci"));
    Grunt.Global.Execute(settings => settings.WithArguments("ci"));
});

Run 'grunt ci --dist=./artifacts/dist'

Cake task:

Task("Grunt")
    .Does(() =>
{
    Grunt.Local.Execute(settings => settings.WithArguments("ci --dist=./artifacts/dist"));
});

Attributes

Type Description
CakePropertyAliasAttribute

Parameters

Name Type Description
context ICakeContext The cake context

Return Value

Type Description
GruntRunnerFactory