allow to set template compiler
This commit is contained in:
parent
a5c76f56e4
commit
7a1bf369ce
@ -22,7 +22,8 @@ module.exports = function(grunt) {
|
|||||||
namespace: 'JST',
|
namespace: 'JST',
|
||||||
templateSettings: {},
|
templateSettings: {},
|
||||||
processContent: function (src) { return src; },
|
processContent: function (src) { return src; },
|
||||||
separator: lf + lf
|
separator: lf + lf,
|
||||||
|
template: _.template
|
||||||
});
|
});
|
||||||
|
|
||||||
// assign filename transformation functions
|
// assign filename transformation functions
|
||||||
@ -48,7 +49,7 @@ module.exports = function(grunt) {
|
|||||||
var compiled, filename;
|
var compiled, filename;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
compiled = _.template(src, false, options.templateSettings).source;
|
compiled = options.template(src, false, options.templateSettings).source;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
grunt.log.error(e);
|
grunt.log.error(e);
|
||||||
grunt.fail.warn('JST "' + filepath + '" failed to compile.');
|
grunt.fail.warn('JST "' + filepath + '" failed to compile.');
|
||||||
|
Loading…
Reference in New Issue
Block a user