Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: normalize paths for compiled JS in console messages #203

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

greatislander
Copy link
Contributor

@greatislander greatislander commented Aug 14, 2023

We output built paths for JavaScript; Eleventy normalizes paths for its built files so this PR uses path.normalize to make sure the paths are formatted the same (prior to this PR it was ./_site/, now it is _site for both the JS files and the other Eleventy-built files).

@greatislander greatislander self-assigned this Aug 14, 2023
@greatislander greatislander added the bug Something isn't working label Aug 14, 2023
@greatislander greatislander added this to the 2.3.2 milestone Aug 14, 2023
@greatislander greatislander enabled auto-merge (squash) August 14, 2023 15:34
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #203 (1973626) into main (2d4c1cf) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #203   +/-   ##
=======================================
  Coverage   97.05%   97.05%           
=======================================
  Files          14       14           
  Lines         679      679           
=======================================
  Hits          659      659           
  Misses         20       20           
Files Changed Coverage Δ
index.js 96.58% <100.00%> (ø)

index.js Outdated
console.log(`[11ty] Writing ${options.js.outdir}/${path.basename(item)} from ${item}`);
console.log(`[11ty] Writing ${path.normalize(options.js.outdir)}/${path.basename(item)} from ${item}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you should just use path.join here instead, which would also use the platform specific separator. According to the docs it will also normalize the result.

@greatislander greatislander merged commit 16f066a into fluid-project:main Aug 14, 2023
5 checks passed
@greatislander greatislander deleted the fix/paths branch August 14, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants