# mustache

mustache 模块引擎

# 用法

var view = {
  title: "Joe",
  calc: function () {
    return 2 + 4;
  }
};

var output = Mustache.render("{{title}} spends {{calc}}", view);

# API

# Mustache.render(template, view)

# Mustache.parse(template)

# Mustache.tags property

# CLI

$ npm install -g mustache

$ mustache dataView.json myTemplate.mustache > output.html
{
  "scripts": {
    "build": "mustache dataView.json myTemplate.mustache > public/output.html"
  }
}

# 参考

mustache (opens new window)