Add production dependencies
This commit is contained in:
parent
5a0114f3e2
commit
579ccdc29f
12113 changed files with 978046 additions and 3 deletions
23
node_modules/gulp-util/lib/template.js
generated
vendored
Normal file
23
node_modules/gulp-util/lib/template.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
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,
|
||||
interpolate: reInterpolate
|
||||
};
|
||||
|
||||
module.exports = function(tmpl, data) {
|
||||
var fn = template(tmpl, 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');
|
||||
}
|
||||
return fn(o);
|
||||
};
|
||||
|
||||
return (data ? wrapped(data) : wrapped);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue