yuriy-yakubskiy / miTem

miTem - minimalistic js template system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

miTem

Build Status License: MIT npm

miTem.js is small and fast template engine with twig like syntax

Installation

via yarn:

$ yarn add mitem

via npm:

$ npm install mitem

via bower:

$ bower install mitem

How to use

node:

const miTem = require('./mitem');
let template = miTem.compile("{% for item in arr %}{{item.foo}}{% endfor %}");
template({arr: [{foo:"test "}, {foo:"test2"}]})

output:

test test2

web:

<script src="mitem.js"></script>
var template = miTem.compile("{% for item in arr %}{{item.foo}}{% endfor %}");
template({arr: [{foo:"test "}, {foo:"test2"}]})

More examples can be found here

About

miTem - minimalistic js template system

License:MIT License


Languages

Language:JavaScript 100.0%