Skip to content
This repository has been archived by the owner. It is now read-only.
Cake addin for working with Handlebars templates
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
src
.gitignore
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Cake.HandlebarsDotNet.sln
LICENSE
README.md
appveyor.yml
build.cake
build.ps1
build.sh

README.md

Cake.HandlebarsDotNet

Cake addin for working with Handlebars templates

(This is very close in functionality to https://github.com/agc93/Cake.Handlebars. At some point, these should probably be merged.)

Quickstart

Add the Cake.HandlebarsDotNet package to your Cake script:

#addin nuget:?package=Cake.HandlebarsDotNet&loaddependencies=true

Then use it in your script

Task("RenderTemplate")
    .Does(() =>
    {
        var rendered = HandlebarsRenderText("Hello, {{Name}}!", new { Name = "World" });
        Information($"Result: {rendered}");
    });

Task("RenderTemplateFromFile")
    .Does(() =>
    {
        var rendered = HandlebarsRenderTextFile("./template.handlebars", new { Name = "World" });
        Information($"Result: {rendered}");
    });

Task("RenderTemplateFromFileToFile")
    .Does(() =>
    {
        HandlebarsRenderTextFile("./template.handlebars", "./rendered.txt", new { Name = "World" });
    });

Building

AppVeyor CI AppVeyor Tests NuGet NuGet Pre Release

This project is built using Cake. Because this Cake addin targets net46 for compatibility with Cake 0.25.0, it does require being built in an environment where net46 is available. (Generally Windows) Development and testing is possible on macOS/Linux, but packaging for use with Cake will require building against net46.

On macOS/Linux:

./build.sh

On Windows:

.\build.ps1

Code of Conduct

We are committed to fostering an open and welcoming environment. Please read our code of conduct before participating in or contributing to this project.

Contributing

We welcome contributions and collaboration on this project. Please read our contributor's guide to understand how best to work with us.

License and Authors

Daniel James logo Daniel James

license GitHub contributors

This software is made available by Daniel James under the MIT license.

You can’t perform that action at this time.