Using Cake

Wyam includes an official Cake Build addin called Cake.Wyam. This allows you to integrate Wyam into a more general Cake-based build and deployment process. To use it, you must include the appropriate #tool and #addin directive at the top of your Cake script (to load the Wyam engine and the Cake addin respectively).

#tool nuget:?package=Wyam
#addin nuget:?package=Cake.Wyam

// ...

Task("Build")
    .Does(() =>
    {
        Wyam();        
    });
    
Task("Preview")
    .Does(() =>
    {
        Wyam(new WyamSettings
        {
            Preview = true,
            Watch = true
        });        
    });

The Cake addin supports all available command line options and is kept up to date with each Wyam release.

If you want to use the development feed to get the latest Wyam packages, change the directives at the top of the Cake build script to:

#tool nuget:https://www.myget.org/F/wyam/api/v2?package=Wyam&prerelease
#addin nuget:https://www.myget.org/F/wyam/api/v2?package=Cake.Wyam&prerelease

Note that you'll also need to delete the existing "tools\Wyam" and "tools\Addins\Cake.Wyam" folders if they exist (otherwise Cake will just use the existing packages and won't download the new packages).

GitHub