cssmagic / underscore-template

More APIs for Underscore's template engine.
10 stars 3 forks source link

需要增加一个 API 来输出推荐的模板设置 #28

Open cssmagic opened 7 years ago

cssmagic commented 7 years ago
var templateConfig = {
    //compatible with ejs
    interpolate : /<%-([\s\S]+?)%>/g,
    escape      : /<%=([\s\S]+?)%>/g,

    //to avoid use `with` in compiled templates
    //see: https://github.com/cssmagic/blog/issues/4
    variable: 'data',
}
_.extend(_.templateSettings, templateConfig)