const jade = requier('jade');//引入jade
var str = jade.renderFile('./view/1.jade',{pretty:true});//pertty美化
console.log(str);
//用tab键设置间 距渲染文件
html
head
ul
li
li
li
//jade中的属性class、style有俩种方法
html
head
body
a(href='http://www.baidu.com')
input(type='text',name='uname',value='用户名')
div(style='width:100px;height=100px')
div(style={width:'100px',height:'100px'})
p(class='box left active')
p{class=['box','left','active']}
//jade解析内容
html
head
body
a(href='#') 百度
div 外层div
div 内层div