Comparing version 0.1.3 to 0.1.4
10
index.js
@@ -8,14 +8,14 @@ 'use strict'; | ||
module.exports = function (options, settings) { | ||
settings = settings || {}; | ||
settings.ext = settings.ext || '.html'; | ||
return es.map(function (file, cb) { | ||
try { | ||
settings = settings || {}; | ||
if(!settings.ext) settings.ext = '.html'; | ||
file.contents = new Buffer(ejs.render(file.contents.toString(), options)); | ||
file.path = gutil.replaceExtension(file.path, settings.ext); | ||
cb(null, file); | ||
} catch (err) { | ||
return cb(new Error('gulp-ejs: ' + err)); | ||
return cb(new gutil.PluginError('gulp-ejs', err)); | ||
} | ||
cb(null, file); | ||
}); | ||
}; |
{ | ||
"name": "gulp-ejs", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "A plugin for Gulp that parses ejs template files", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"engines": { | ||
"node": ">=0.8.0", | ||
"node": ">=0.10.0", | ||
"npm": ">=1.2.10" | ||
@@ -38,0 +38,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7763