From 10f13508aa60a112031e397f09dc3682c4e521cd Mon Sep 17 00:00:00 2001 From: javi Date: Fri, 17 Jan 2014 13:05:52 +0100 Subject: [PATCH] allow to set template compiler --- tasks/jst.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/jst.js b/tasks/jst.js index c4495cd..3e134c5 100644 --- a/tasks/jst.js +++ b/tasks/jst.js @@ -22,7 +22,8 @@ module.exports = function(grunt) { namespace: 'JST', templateSettings: {}, processContent: function (src) { return src; }, - separator: lf + lf + separator: lf + lf, + template: _.template }); // assign filename transformation functions @@ -48,7 +49,7 @@ module.exports = function(grunt) { var compiled, filename; try { - compiled = _.template(src, false, options.templateSettings).source; + compiled = options.template(src, false, options.templateSettings).source; } catch (e) { grunt.log.error(e); grunt.fail.warn('JST ' + chalk.cyan(filepath) + ' failed to compile.');