Skip to content

xucz/fis3-parser-translate-jst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fis3-parser-translate-jst

安装

全局安装或者本地安装都可以。

npm install fis3-parser-translate-jst

启用

在 fis-conf.js 中加入以下代码。

fis.match('/static/tmpl/**.jst', {
  parser: fis.plugin('translate-jst'),
  rExt: '.js'
}).match('/static/tmpl/**.{js, jst}', {
  isMod: true,
  packTo: '/static/components.js'
});

模板开发

hello.jst

  var hellp = 'Hello';
  <div>
    <% if(hello){ %>
      <%=hello%>,<%=name%>
    <% } %>
  </div>

main.jst

  var Hello = require('hello.jst');
  <div>
    <%=Hello({name:xu})%>
  </div>

About

fis3 jst预编译插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published