1.0.3 • Published 5 years ago

@bryn-mailer/temp-eng v1.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

temp-eng

A simple, minimal HTML templating engine.

Syntax

Variable Substitution

<div>This is a variable -> {{ variable_name }}</div>

Conditionals

{ #if (variable === false) }
<div>I will be rendered if the condition evaluates to true</div>
{ #else }
<div>Otherwise I will be rendered</div>
{ #endif }

Usage

import { Template }from '@bryn-mailer/temp-eng';

const template = new Template('pathToTemplate.html');
const html = template.generateHTML({
  variable: 'value'
});
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago