mnte
v0.1.1
Published
A simple template engine.
Downloads
11
Readme
English | 简体中文
mnte
A simple template engine.
Installation
npm
npm i mnte
CDN
<script src="https://unpkg.com/[email protected]/dist/mnte.js"></script>
jsdelivr
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mnte.js"></script>
Usage
Demo1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Demo of mnte</title>
</head>
<body>
<h2>Demo1</h2>
<div id="demo1"></div>
<script>
import mnte from 'mnte';
const demo1 = '<a class="mnte-tab" data-tab="{{id}}" id="__mnte_tab_{{id}}">{{name}}</a>';
document.getElementById('demo1').innerHTML = mnte(demo1, {id: 'demo1', name: 'This is Demo1!'});
</script>
</body>
</html>
Of course, you can also download first and then use it. It's at mnte/dist
. mnte.min.js
for production and mnte.js
for development.
License
MIT