# Code coverage report for thinkjs/lib/Lib/Driver/Template/EjsTemplate.js

## Statements: 100% (5 / 5) Branches: 100% (0 / 0) Functions: 100% (1 / 1) Lines: 100% (5 / 5) Ignored: none

All files » thinkjs/lib/Lib/Driver/Template/ » EjsTemplate.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17

    2
    2

    13
    13

    13

     /**
     * ejs
     * https://github.com/visionmedia/ejs
     * @type {[type]}
     */
    var ejs = require('ejs');
    module.exports = {
      fetch: function(templateFile, tVar){
        'use strict';
        var content = getFileContent(templateFile);
        var conf = extend({
          filename: templateFile,
          cache: true
        }, C('tpl_engine_config'));
        return  ejs.compile(content, conf)(tVar);
      }
    };