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>
    

    Keywords

    none

    Install

    npm i mustacheplus

    DownloadsWeekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • yutou_cn