UNPKG

magix-combine

Version:

合并Magix View的html,js,css成一个js文件,并检测html,js,css中可能存在的问题

39 lines (26 loc) 509 B
let art=require('../plugins/tmpl-art'); let source=`{{each list as index value}} {{= index }} <span> {{! value }}</span> {{/each}} {{let a=20,b=30}} {{each a as outer}} {{=outer}} {{each outer}} {{ =$value }} {{/each}} {{/each}} {{if key.a>20 }} {{else if a && b || c}} {{/if}} {{forin o as value key}} <span>{{! fn(value) }}<input {{:key}}/></span> {{/forin}} {{=fn(a,b,c)}} {{ let a=20,b=30,c={} }} {{ for(let p in a){ }} {{=p}} {{ } }} `; console.log(art(source));