-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
364 additions
and
306 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 @@ | ||
System.Globalization.CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-GB"); |
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,13 @@ | ||
--- | ||
Title: Cake.AsciiDoctorJ | ||
NoSidebar: true | ||
NoContainer: false | ||
NoGutter: true | ||
--- | ||
|
||
<div class="container"> | ||
<h1>What is it?</h1> | ||
<p> | ||
Cake.AsciiDoctorJ is an Addin for <a href="http://cakebuild.net/">Cake</a> to use <a href="https://github.com/asciidoctor/asciidoctorj">AsciiDoctorJ</a>. | ||
</p> | ||
</div> |
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
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
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 |
---|---|---|
@@ -1,59 +1,60 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.CompilerServices; | ||
using Cake.Core; | ||
using Cake.Core.IO; | ||
using Cake.Core.Tooling; | ||
|
||
[assembly: InternalsVisibleTo("Cake.AsciiDoctorJ.Tests")] | ||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Cake.AsciiDoctorJ.Tests")] | ||
|
||
namespace Cake.AsciiDoctorJ | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using Cake.Core; | ||
using Cake.Core.IO; | ||
using Cake.Core.Tooling; | ||
|
||
/// <summary> | ||
/// This is the runner. <see cref="Tool{TSettings}"/> | ||
/// This is the runner. <see cref="Tool{TSettings}"/>. | ||
/// </summary> | ||
internal class AsciiDoctorJRunner : Tool<AsciiDoctorJRunnerSettings>, IAsciiDoctorJRunner | ||
internal class AsciiDoctorJRunner : Tool<AsciiDoctorJRunnerSettings> | ||
{ | ||
private ICakeEnvironment environment; | ||
private readonly ICakeEnvironment environment; | ||
|
||
/// <summary> | ||
/// default ctor. <see cref="Tool{TSettings}(IFileSystem,ICakeEnvironment,IProcessRunner,IToolLocator)"/> | ||
/// Initializes a new instance of the <see cref="AsciiDoctorJRunner"/> class. | ||
/// <see cref="Tool{TSettings}(IFileSystem,ICakeEnvironment,IProcessRunner,IToolLocator)"/>. | ||
/// </summary> | ||
/// <param name="fileSystem"></param> | ||
/// <param name="environment"></param> | ||
/// <param name="processRunner"></param> | ||
/// <param name="tools"></param> | ||
/// <param name="fileSystem">The <see cref="IFileSystem"/>.</param> | ||
/// <param name="environment">The <see cref="ICakeEnvironment"/>.</param> | ||
/// <param name="processRunner">The <see cref="IProcessRunner"/>.</param> | ||
/// <param name="tools">The <see cref="IToolLocator"/>.</param> | ||
internal AsciiDoctorJRunner(IFileSystem fileSystem, ICakeEnvironment environment, IProcessRunner processRunner, IToolLocator tools) | ||
: base(fileSystem, environment, processRunner, tools) | ||
{ | ||
this.environment = environment; | ||
} | ||
|
||
/// <summary> | ||
/// AsciiDoctorJ | ||
/// Runs the tool using an action to configure seetings. | ||
/// </summary> | ||
/// <returns></returns> | ||
protected override string GetToolName() => "AsciiDoctorJ Runner"; | ||
|
||
/// <summary> | ||
/// AsciiDoctorJ.exe | ||
/// </summary> | ||
/// <returns></returns> | ||
protected override IEnumerable<string> GetToolExecutableNames() => new[] { "asciidoctorj.exe", "asciidoctorj" }; | ||
|
||
internal AsciiDoctorJRunner Run(Action<AsciiDoctorJRunnerSettings> configure = null) | ||
/// <param name="configure">The configuration action.</param> | ||
internal void Run(Action<AsciiDoctorJRunnerSettings> configure = null) | ||
{ | ||
var settings = new AsciiDoctorJRunnerSettings(); | ||
configure?.Invoke(settings); | ||
return Run(settings); | ||
Run(settings); | ||
} | ||
|
||
internal AsciiDoctorJRunner Run(AsciiDoctorJRunnerSettings settings) | ||
/// <summary> | ||
/// Runs the tool. | ||
/// </summary> | ||
/// <param name="settings">The settings.</param> | ||
internal void Run(AsciiDoctorJRunnerSettings settings) | ||
{ | ||
var args = new ProcessArgumentBuilder(); | ||
settings?.Evaluate(args, environment); | ||
Run(settings, args); | ||
return this; | ||
} | ||
|
||
/// <inheritdoc/> | ||
protected override string GetToolName() => "AsciiDoctorJ Runner"; | ||
|
||
/// <inheritdoc/> | ||
protected override IEnumerable<string> GetToolExecutableNames() => new[] { "asciidoctorj.exe", "asciidoctorj" }; | ||
} | ||
} |
Oops, something went wrong.