metalsmith-jstransformer
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -19,6 +19,9 @@ var minimatch = require('minimatch'); | ||
// Find all files that match the given transformer. | ||
var transformFiles = minimatch.match(Object.keys(files), "*." + transform); | ||
var transformFiles = minimatch.match(Object.keys(files), "*." + transform, { | ||
matchBase: true | ||
}); | ||
for (var i in transformFiles) { | ||
var filename = transformFiles[i]; | ||
var data = files[filename]; | ||
var dir = path.dirname(filename); | ||
var locals = merge(data, metalsmith.metadata()); | ||
@@ -40,3 +43,4 @@ | ||
delete files[filename]; | ||
files[name] = data; | ||
var finalPath = path.join(dir, name); | ||
files[finalPath] = data; | ||
} | ||
@@ -43,0 +47,0 @@ } |
{ | ||
"name": "metalsmith-jstransformer", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Metalsmith JSTransformer Plugin", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
5232
40