Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/BuildDeployAbiesWebAssembly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Deploy AbiesWebAssembly

on:
push:
branches:
- example-Abies

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Restore Dependencies
run: dotnet restore ./examples/AbiesWebAssembly/AbiesWebAssembly.csproj

- name: Build Project
run: dotnet publish ./examples/AbiesWebAssembly/AbiesWebAssembly.csproj -c Release -o build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/wwwroot
# destination_dir: Handlebars.Net.Helpers
8 changes: 8 additions & 0 deletions Handlebars.Net.Helpers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorAppWebAssembly", "exa
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub Actions", "GitHub Actions", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
ProjectSection(SolutionItems) = preProject
.github\workflows\BuildDeployAbiesWebAssembly.yml = .github\workflows\BuildDeployAbiesWebAssembly.yml
.github\workflows\CreateRelease.yml = .github\workflows\CreateRelease.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbiesWebAssembly", "examples\AbiesWebAssembly\AbiesWebAssembly.csproj", "{BC14E557-DA32-DA21-BED6-45EE6D296EA3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -108,6 +111,10 @@ Global
{F3AD9D4E-CA0D-4FFE-87D3-27974BECC5BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3AD9D4E-CA0D-4FFE-87D3-27974BECC5BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3AD9D4E-CA0D-4FFE-87D3-27974BECC5BD}.Release|Any CPU.Build.0 = Release|Any CPU
{BC14E557-DA32-DA21-BED6-45EE6D296EA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC14E557-DA32-DA21-BED6-45EE6D296EA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC14E557-DA32-DA21-BED6-45EE6D296EA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC14E557-DA32-DA21-BED6-45EE6D296EA3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -127,6 +134,7 @@ Global
{E9A5CF6C-544C-4D1C-8AAD-EF4144FF7E9D} = {BA564CB5-1908-41F9-A32A-3535BBE0E8C6}
{F3AD9D4E-CA0D-4FFE-87D3-27974BECC5BD} = {845A8FA6-E56E-4BB4-AD92-29093BB2CA09}
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {01DFE66D-E850-4ADC-A0FC-A3A13B896CDA}
{BC14E557-DA32-DA21-BED6-45EE6D296EA3} = {845A8FA6-E56E-4BB4-AD92-29093BB2CA09}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FC1E6DF8-EC39-439B-ABF0-EE3786C5C0F6}
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Handlebars.Net.Helpers
# Handlebars.Net.Helpers
Several helpers which can be used for [Handlebars.Net](https://github.com/rexm/Handlebars.Net)

## Project
Expand Down Expand Up @@ -129,13 +129,14 @@ The following default built-in helpers are available:
- [Dictionary](https://github.com/StefH/Handlebars.Net.Helpers/wiki/Dictionary)
- [Constants](https://github.com/StefH/Handlebars.Net.Helpers/wiki/Constants)
- [Enumerable](https://github.com/StefH/Handlebars.Net.Helpers/wiki/Enumerable)
- [Environment](https://github.com/StefH/Handlebars.Net.Helpers/wiki/Environment) [🔺](#a-environmenthelpers)
- [Math](https://github.com/StefH/Handlebars.Net.Helpers/wiki/Math)
- [Regex](https://github.com/StefH/Handlebars.Net.Helpers/wiki/Regex)
- [String](https://github.com/StefH/Handlebars.Net.Helpers/wiki/String)
- [Url](https://github.com/StefH/Handlebars.Net.Helpers/wiki/Url)

And the following additonal helpers are available
- [DynamicLinq](https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/DynamicLinq)
And the following additonal helpers are available:
- [DynamicLinq](https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/DynamicLinq) [🔺](#b-systemlinqdynamiccore)
- [Humanizer](https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/Humanizer)
- [Json](https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/Json)
- [Random](https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/Random)
Expand All @@ -150,3 +151,8 @@ And the following additonal helpers are available
- Some code based on https://www.30secondsofcode.org/c-sharp/t/string/p/1
- Some documentation based on https://github.com/arinet/HandlebarDocs
- SimpleJson copied from (https://github.com/facebook-csharp-sdk/simple-json)


## Example
- Static WebAssembly WebSite on GitHub Pages: [handlebars-net.github.io/Handlebars.Net.Helpers](https://handlebars-net.github.io/Handlebars.Net.Helpers/)
<br>Created with [Abies](https://github.com/Picea/Abies).
27 changes: 27 additions & 0 deletions examples/AbiesWebAssembly/AbiesWebAssembly.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>

<ItemGroup>
<Content Remove="wwwroot\abies.js" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Abies" Version="1.0.10-beta" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers.DynamicLinq\Handlebars.Net.Helpers.DynamicLinq.csproj" />
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers.Humanizer\Handlebars.Net.Helpers.Humanizer.csproj" />
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers.Json\Handlebars.Net.Helpers.Json.csproj" />
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers.Random\Handlebars.Net.Helpers.Random.csproj" />
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers.Xeger\Handlebars.Net.Helpers.Xeger.csproj" />
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers.XPath\Handlebars.Net.Helpers.XPath.csproj" />
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers.Xslt\Handlebars.Net.Helpers.Xslt.csproj" />
<ProjectReference Include="..\..\src\Handlebars.Net.Helpers\Handlebars.Net.Helpers.csproj" />
</ItemGroup>

</Project>
11 changes: 11 additions & 0 deletions examples/AbiesWebAssembly/Fluent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.CompilerServices;
using Abies.DOM;
using static Abies.Html.Elements;

namespace AbiesWebAssembly;

public static class Fluent
{
public static Element button(Attribute[] attributes, Element[] children, [CallerLineNumber] int id = 0)
=> element("fluent-button", attributes, children, id);
}
Loading
Loading