Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include the cake.wyam2 source to fix the docs tasks
- Loading branch information
Showing
12 changed files
with
608 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#nullable disable | ||
namespace Common.Addins.Cake.Wyam; | ||
|
||
/// <summary> | ||
/// Settings for specifying NuGet packages. | ||
/// </summary> | ||
public class NuGetSettings | ||
{ | ||
/// <summary> | ||
/// Specifies that prerelease packages are allowed. | ||
/// </summary> | ||
public bool Prerelease { get; set; } | ||
|
||
/// <summary> | ||
/// Specifies that unlisted packages are allowed. | ||
/// </summary> | ||
public bool Unlisted { get; set; } | ||
|
||
/// <summary> | ||
/// Indicates that only the specified package source(s) should be used to find the package. | ||
/// </summary> | ||
public bool Exclusive { get; set; } | ||
|
||
/// <summary> | ||
/// Specifies the version of the package to use. | ||
/// </summary> | ||
public string Version { get; set; } | ||
|
||
/// <summary> | ||
/// Specifies the package source(s) to get the package from. | ||
/// </summary> | ||
public IEnumerable<string> Source { get; set; } | ||
|
||
/// <summary> | ||
/// The package to install. | ||
/// </summary> | ||
public string Package { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#nullable disable | ||
namespace Common.Addins.Cake.Wyam; | ||
|
||
/// <summary> | ||
/// <para>Contains functionality related to <see href="https://github.com/Wyam2/wyam">Wyam2</see>.</para> | ||
/// <para> | ||
/// In order to use the commands for this alias, include the following in your build.cake file to download and install from NuGet.org, or specify the ToolPath within the WyamSettings class: | ||
/// <code> | ||
/// #addin "nuget:?package=Cake.Wyam2" | ||
/// #tool "nuget:?package=Wyam2" | ||
/// </code> | ||
/// </para> | ||
/// </summary> | ||
/// <remarks> | ||
/// Make sure to remove existing references to old Cake.Wyam addin (https://www.nuget.org/packages/Wyam/). | ||
/// </remarks> | ||
[CakeAliasCategory("Wyam2")] | ||
public static class WyamAliases | ||
{ | ||
/// <summary> | ||
/// Runs Wyam2 using the specified settings. | ||
/// </summary> | ||
/// <param name="context">The context.</param> | ||
/// <example> | ||
/// <code> | ||
/// Wyam(); | ||
/// </code> | ||
/// </example> | ||
[CakeMethodAlias] | ||
public static void Wyam(this ICakeContext context) | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
Wyam(context, new WyamSettings()); | ||
} | ||
|
||
/// <summary> | ||
/// Runs Wyam2 using the specified settings. | ||
/// </summary> | ||
/// <param name="context">The context.</param> | ||
/// <param name="settings">The settings.</param> | ||
/// <example> | ||
/// <code> | ||
/// Wyam(new WyamSettings() | ||
/// { | ||
/// OutputPath = Directory("C:/Output") | ||
/// }); | ||
/// </code> | ||
/// </example> | ||
[CakeMethodAlias] | ||
public static void Wyam(this ICakeContext context, WyamSettings settings) | ||
{ | ||
if (context == null) | ||
{ | ||
throw new ArgumentNullException(nameof(context)); | ||
} | ||
|
||
WyamRunner runner = new WyamRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); | ||
runner.Run(settings); | ||
} | ||
} |
Oops, something went wrong.