mustacheplus

0.0.1 • Public • Published

mustache-node-plus

为express中间件封装了一下,最重要是添加了模板嵌套特性

example

var app = express();
var _mustacheplus = require('mustacheplus');
_mustacheplus.prefix=__dirname+"/templates/";//设置模板的路径前缀
app.engine("html", _mustacheplus); 
app.set('views', __dirname + '/templates');

template:

<body>
        {include tpl="store/header.html"}   <!-- relative path -->
        <div id="content">
        </div>
        {include tpl="store/footer.html"}
</body>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i mustacheplus

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • yutou_cn