Compare commits

...

3 Commits

Author SHA1 Message Date
javi
7a1bf369ce allow to set template compiler 2014-01-17 13:05:52 +01:00
Kyle Robinson Young
a5c76f56e4 Explicitly set files to publish to npm. Ref gruntjs/gruntjs.com#65 2013-12-15 10:17:44 -08:00
Kyle Robinson Young
ffb72d7dd9 Remove verbose writeFlags as of Grunt v0.4.2 its automatic. Ref gruntjs/grunt#749. 2013-11-30 09:12:35 -08:00
2 changed files with 7 additions and 4 deletions

View File

@ -42,5 +42,9 @@
},
"keywords": [
"gruntplugin"
],
"files": [
"tasks",
"LICENSE-MIT"
]
}

View File

@ -22,14 +22,13 @@ module.exports = function(grunt) {
namespace: 'JST',
templateSettings: {},
processContent: function (src) { return src; },
separator: lf + lf
separator: lf + lf,
template: _.template
});
// assign filename transformation functions
var processName = options.processName || defaultProcessName;
grunt.verbose.writeflags(options, 'Options');
var nsInfo;
if (options.namespace !== false) {
nsInfo = helpers.getNamespaceDeclaration(options.namespace);
@ -50,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 "' + filepath + '" failed to compile.');