Skip to content

brynmailer/temp-eng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
});

About

A simple, minimal HTML templating engine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published