Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thzinc/cake.handlebarsdotnet
Cake addin for working with Handlebars templates
https://github.com/thzinc/cake.handlebarsdotnet
addin cake csharp handlebars handlebarsjs
Last synced: about 2 months ago
JSON representation
Cake addin for working with Handlebars templates
- Host: GitHub
- URL: https://github.com/thzinc/cake.handlebarsdotnet
- Owner: thzinc
- License: mit
- Archived: true
- Created: 2018-03-04T21:34:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-30T22:11:12.000Z (over 5 years ago)
- Last Synced: 2024-09-30T07:05:40.690Z (about 2 months ago)
- Topics: addin, cake, csharp, handlebars, handlebarsjs
- Language: PowerShell
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 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:
```csharp
#addin nuget:?package=Cake.HandlebarsDotNet&loaddependencies=true
```Then use it in your script
```csharp
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](https://img.shields.io/appveyor/ci/thzinc/cake-handlebars.svg)](https://ci.appveyor.com/project/thzinc/cake-handlebars)
[![AppVeyor Tests](https://img.shields.io/appveyor/tests/thzinc/cake-handlebars.svg)](https://ci.appveyor.com/project/thzinc/cake-handlebars/build/tests)
[![NuGet](https://img.shields.io/nuget/v/Cake.HandlebarsDotNet.svg)](https://www.nuget.org/packages/Cake.HandlebarsDotNet/)
[![NuGet Pre Release](https://img.shields.io/nuget/vpre/Cake.HandlebarsDotNet.svg)](https://www.nuget.org/packages/Cake.HandlebarsDotNet/)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:
```bash
./build.sh
```On Windows:
```powershell
.\build.ps1
```## Code of Conduct
We are committed to fostering an open and welcoming environment. Please read our [code of conduct](CODE_OF_CONDUCT.md) before participating in or contributing to this project.
## Contributing
We welcome contributions and collaboration on this project. Please read our [contributor's guide](CONTRIBUTING.md) to understand how best to work with us.
## License and Authors
[![Daniel James logo](https://secure.gravatar.com/avatar/eaeac922b9f3cc9fd18cb9629b9e79f6.png?size=16) Daniel James](https://github.com/thzinc)
[![license](https://img.shields.io/github/license/thzinc/Cake.HandlebarsDotNet.svg)](https://github.com/thzinc/Cake.HandlebarsDotNet/blob/master/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/thzinc/Cake.HandlebarsDotNet.svg)](https://github.com/thzinc/Cake.HandlebarsDotNet/graphs/contributors)This software is made available by Daniel James under the MIT license.