fitemp

0.0.2 • Public • Published

A Very Simple HTML Template Engine

Installation:

npm install fitemp

In HTML

<script src="./fitemp.js"></script>

API

<ul>
<%  for(var i = 0; i < year.length; i++){ %>
    <li><%year[i]%>年大吉</li>
<% } %>
</ul>
//-----
var tpl = require('fitemp');
tpl.render(id,{
	year:	['鼠','牛','虎','兔','龙','蛇','马','羊','猴','鸡','狗','猪']
/*		
 * @param id or html str    
*/
});

/fitemp/

    Package Sidebar

    Install

    npm i fitemp

    Weekly Downloads

    8

    Version

    0.0.2

    License

    BSD

    Last publish

    Collaborators

    • ftft1885