fis3-parser-translate-jst

0.0.3 • Public • Published

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>

Readme

Keywords

Package Sidebar

Install

npm i fis3-parser-translate-jst

Weekly Downloads

0

Version

0.0.3

License

ISC

Last publish

Collaborators

  • xuchaozheng