pug-plugin-modules
Advanced tools
Comparing version 0.2.2 to 0.2.3
12
index.js
@@ -8,4 +8,14 @@ const path = require('path'); | ||
const file = path.parse(filename); | ||
const resolvePath = file.dir ? `${file.dir}/${file.name}` : file.name; | ||
// Strip out extension that is automatically added by Pug | ||
file.ext = ''; | ||
file.base = file.name; | ||
let resolvePath; | ||
if (!file.dir && file.dir[0] !== path.sep && file.dir[0] !== '.') { | ||
resolvePath = file.name; | ||
} else { | ||
resolvePath = path.format(file); | ||
} | ||
return resolve.sync(resolvePath, Object.assign({ | ||
@@ -12,0 +22,0 @@ basedir: path.dirname(source), |
{ | ||
"name": "pug-plugin-modules", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Pug plugin for resolving templates in node_modules", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4213
27