Comparing version 0.0.4 to 0.0.5
10
index.js
@@ -49,3 +49,3 @@ /** | ||
var SwigWrap = module.exports = function SwigWrap(options) { | ||
var SwigWrap = module.exports = function SwigWrap(options, api) { | ||
@@ -59,3 +59,9 @@ if (!(this instanceof SwigWrap)) { | ||
var origin = this.swig.options.loader.resolve; | ||
this.swig.options.loader.resolve = function(to, from) { | ||
to = api.resolve(to); | ||
return origin.call(this, to, from); | ||
}; | ||
tags.forEach(function (tag) { | ||
@@ -76,3 +82,3 @@ var t = require('./tags/' + tag); | ||
if (err) { | ||
return self.emit('error', error); | ||
return self.emit('error', err); | ||
} | ||
@@ -79,0 +85,0 @@ |
{ | ||
"name": "yog-swig", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "custom swig template, add some tag or filter ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13449
320
0