Juicer 是一个高效、轻量的前端 (Javascript) 模板引擎,效率和易用是它追求的目标。 除此之外,它还可以运行在 Node.js 环境中。

Download Docs Demo

latest: v0.6.5-stable

EXAMPLES:

`Template String:
<ul>
	{@each list as it,k}
		<li>${it.name} (index: ${k})</li>
	{@/each}
	{@each blah as it}
		<li>
			num: ${it.num} <br />
			{@if it.num==3}
				{@each it.inner as it2}
					${it2.time} <br />
				{@/each}
			{@/if}
		</li>
	{@/each}
</ul>
`Data Source:
var data={
	list:[
		{name:'guokai',show:true},
		{name:'benben',show:false},
		{name:'dierbaby',show:true}
	],
	blah:[
		{num:1},
		{num:2},
		{num:3,inner:[
			{'time':'15:00'},
			{'time':'16:00'},
			{'time':'17:00'},
			{'time':'18:00'}
		]},
		{num:4}
	]
};
`Render Result:
...
Fork me on GitHub