diff --git a/src/MixPugTask.js b/src/MixPugTask.js index 6940e4e..c97d1ee 100644 --- a/src/MixPugTask.js +++ b/src/MixPugTask.js @@ -165,14 +165,13 @@ class MixPugTask extends Task { let file = new File(src); let pathFromBase = this.relativePathFromSource(file.base(), this.excludePath); let baseDir = path.join(pathFromBase, this.dest); + let output = path.join(baseDir, file.nameWithoutExtension() + this.extension); + let asset = new File(output); if (!File.exists(baseDir)) { - new File(baseDir).makeDirectories(); + asset.makeDirectories(); } - let output = path.join(baseDir, file.nameWithoutExtension() + this.extension); - let asset = new File(output); - return asset; }