aboutsummaryrefslogtreecommitdiff
path: root/node_modules/gulp-util/lib/template.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-03 01:33:53 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-03 01:33:53 +0100
commitd1291f67551c58168af43698a359cb5ddfd266b0 (patch)
tree55a13ed29fe1915e3f42f1b1b7038dafa2e975a7 /node_modules/gulp-util/lib/template.js
parentd0a0695fb5d34996850723f7d4b1b59c3df909c2 (diff)
node_modules
Diffstat (limited to 'node_modules/gulp-util/lib/template.js')
-rw-r--r--node_modules/gulp-util/lib/template.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/node_modules/gulp-util/lib/template.js b/node_modules/gulp-util/lib/template.js
index eef3bb376..c467820f3 100644
--- a/node_modules/gulp-util/lib/template.js
+++ b/node_modules/gulp-util/lib/template.js
@@ -1,21 +1,17 @@
var template = require('lodash.template');
-var reEscape = require('lodash._reescape');
-var reEvaluate = require('lodash._reevaluate');
var reInterpolate = require('lodash._reinterpolate');
var forcedSettings = {
- escape: reEscape,
- evaluate: reEvaluate,
+ escape: /<%-([\s\S]+?)%>/g,
+ evaluate: /<%([\s\S]+?)%>/g,
interpolate: reInterpolate
};
-module.exports = function(tmpl, data) {
- var fn = template(tmpl, forcedSettings);
+module.exports = function(tmpl, data){
+ var fn = template(tmpl, null, forcedSettings);
var wrapped = function(o) {
- if (typeof o === 'undefined' || typeof o.file === 'undefined') {
- throw new Error('Failed to provide the current file as "file" to the template');
- }
+ if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template');
return fn(o);
};