diff options
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/templateEngine.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/models/templateEngine.js b/lib/models/templateEngine.js index aaa70fd..9a18bd4 100644 --- a/lib/models/templateEngine.js +++ b/lib/models/templateEngine.js @@ -1,8 +1,6 @@ var nunjucks = require('nunjucks'); var Immutable = require('immutable'); -var Promise = require('../utils/promise'); - var TemplateEngine = Immutable.Record({ // List of {TemplateBlock} blocks: Immutable.List(), @@ -105,26 +103,4 @@ TemplateEngine.prototype.bindToContext = function(fn) { return fn.bind(this.getContext()); }; -/** - Render a template - - @param {String} filePath - @param {String} content - @param {Object} ctx - @return {Promise<String>} -*/ -TemplateEngine.prototype.render = function renderTemplate(filePath, content, context) { - context = context || {}; - var env = this.toNunjucks(); - - return Promise.nfcall( - env.renderString.bind(env), - content, - context, - { - path: filePath - } - ); -}; - module.exports = TemplateEngine; |