A simple template engine.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
scripts
src/platforms/web
.editorconfig
.eslintignore
.eslintrc
.gitignore
CHANGELOG.md
LICENSE
README.md
README.zh-CN.md
commitlint.config.js
package-lock.json
package.json

README.md

English | 简体中文

mnte download npm-version license

A simple template engine.

Installation

npm

npm i mnte

CDN

<script src="https://unpkg.com/mnte@0.1.1/dist/mnte.js"></script>

jsdelivr

<script src="https://cdn.jsdelivr.net/npm/mnte@0.1.1/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