Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7a1bf369ce | ||
|
a5c76f56e4 | ||
|
ffb72d7dd9 |
@ -42,5 +42,9 @@
|
||||
},
|
||||
"keywords": [
|
||||
"gruntplugin"
|
||||
],
|
||||
"files": [
|
||||
"tasks",
|
||||
"LICENSE-MIT"
|
||||
]
|
||||
}
|
@ -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.');
|
||||
|
Loading…
Reference in New Issue
Block a user