maria-engine
v0.0.5
Published
![build](https://github.com/haikyuu/maria-engine/workflows/Build/badge.svg) ![test](https://github.com/haikyuu/maria-engine/workflows/Test/badge.svg) ![npm](https://img.shields.io/npm/v/maria-engine) [![Netlify Status](https://api.netlify.com/api/v1/badge
Downloads
2
Readme
Maria Engine
Maria is a templating engine that works in node.js. It features:
- A lightweight readable syntax.
- Easily customizable.
- Just html.
Here is how your our templates look like:
<div :each="activeUsers user">
<span>${user.name}</span>
<span :.danger:if="user.status === 'unknown'">${user.status}</span>
<button :disabled:if="user.active">Mark as active</button>
</div>
And this is how to achieve the same in one of the popular templating engines in the ecosystem:
{{#each activeUsers as | user}}
<div>
<span>{{user.name}}</span>
<!-- We can't just use javascript expressions -->
<span {{#if user.isStatusUnkown}} class="danger" {{/if}}>{{user.status}}</span>
<button {{#if user.active}} disabled {{/if}}>Mark as active</button>
</div>
{{/each}}
In terms of character count, Maria has ±20%
less characters than handlebars (and that's including the html!).
And more importantly, it's arguably more readable.