0.0.1 • Published 11 years ago

mustacheplus v0.0.1

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

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>