Skip to content

Commit

Permalink
A few more style tweaks for #1686
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jun 24, 2022
1 parent 0830d68 commit 631c881
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/TemplatePassthrough.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TemplatePassthrough {
}

getOutputPath(inputFileFromGlob) {
const { inputDir, outputDir, outputPath, inputPath } = this;
let { inputDir, outputDir, outputPath, inputPath } = this;

if (outputPath === true) {
return TemplatePath.normalize(
Expand Down Expand Up @@ -106,7 +106,7 @@ class TemplatePassthrough {
debug("Searching for: %o", glob);
let b = this.benchmarks.aggregate.get("Searching the file system");
b.before();
const files = TemplatePath.addLeadingDotSlashArray(
let files = TemplatePath.addLeadingDotSlashArray(
await fastglob(glob, {
caseSensitiveMatch: false,
dot: true,
Expand Down Expand Up @@ -193,7 +193,7 @@ class TemplatePassthrough {

// default options for recursive-copy
// see https://www.npmjs.com/package/recursive-copy#arguments
const copyOptionsDefault = {
let copyOptionsDefault = {
overwrite: true, // overwrite output. fails when input is directory (mkdir) and output is file
dot: true, // copy dotfiles
junk: false, // copy cache files like Thumbs.db
Expand All @@ -206,7 +206,7 @@ class TemplatePassthrough {
// e.g. `{ filePaths: [ './img/coolkid.jpg' ], relativePaths: [ '' ] }`
};

const copyOptions = Object.assign(copyOptionsDefault, this.copyOptions);
let copyOptions = Object.assign(copyOptionsDefault, this.copyOptions);

let promises = fileMap.map((entry) => {
// For-free passthrough copy
Expand Down
6 changes: 3 additions & 3 deletions src/TemplatePassthroughManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ class TemplatePassthroughManager {
}

getConfigPaths() {
const paths = [];
const pathsRaw = this.config.passthroughCopies || {};
let paths = [];
let pathsRaw = this.config.passthroughCopies || {};
debug("`addPassthroughCopy` config API paths: %o", pathsRaw);
for (const [inputPath, { outputPath, copyOptions }] of Object.entries(
for (let [inputPath, { outputPath, copyOptions }] of Object.entries(
pathsRaw
)) {
paths.push(this._normalizePaths(inputPath, outputPath, copyOptions));
Expand Down
1 change: 0 additions & 1 deletion test/TemplatePassthroughManagerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const fs = require("fs");
const TemplatePassthroughManager = require("../src/TemplatePassthroughManager");
const TemplateConfig = require("../src/TemplateConfig");
const EleventyFiles = require("../src/EleventyFiles");
const EleventyExtensionMap = require("../src/EleventyExtensionMap");

test("Get paths from Config", async (t) => {
let eleventyConfig = new TemplateConfig();
Expand Down

0 comments on commit 631c881

Please sign in to comment.