Skip to content

Commit

Permalink
Resolve path after parsing URI template - fixes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
vseventer committed Jan 5, 2018
1 parent fdfd1dc commit 9ef1c73
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ const EXTENSIONS = {
module.exports = {
// Convert a list of files.
files: (input, output) => {
// Parse output template.
output = path.resolve(output) // Absolute path.
const template = urlTemplate.parse(output)
const template = urlTemplate.parse(output) // Parse output template.

// Process files.
const promises = input.map((src) => {
// Destination.
src = path.resolve(src) // Absolute path.
let dest = template.expand(path.parse(src))
dest = path.resolve(dest) // Absolute path.

// Process file.
const transformer = queue.drain(sharp(src))
Expand Down

0 comments on commit 9ef1c73

Please sign in to comment.