Denperidge / eleventy-auto-cache-buster

An Eleventy content-hash based cache buster, not requiring any filters or code changes aside from enabling the plugin!
https://www.npmjs.com/package/eleventy-auto-cache-buster
MIT License
9 stars 0 forks source link

Use `replaceAll`, fixes #4 #5

Closed BenjaminEHowe closed 2 months ago

BenjaminEHowe commented 2 months ago

Fixes #4.

Note that I haven't tested this as well as I would like -- please test it before merging and releasing!

Also replaced string concatenation with a template literal because IMO it's easier to read.

Denperidge commented 2 months ago

Oh! I should honestly just write some tests, might be overdue and make future maintenance easier

BenjaminEHowe commented 2 months ago

Perhaps, but I'm not really qualified to comment on missing tests 😂. In my defence I don't really work with Node.js – learning more about testing using the stack (both BE and FE) is on my "want to learn" list.

Denperidge commented 2 months ago

Understandable! No worries, I'm trying to cook up a very rudimentary-but-hopefully-enough test

BenjaminEHowe commented 2 months ago

More than happy to pair on adding tests if you'd like -- if nothing else it would help me to learn something new :-)

Denperidge commented 2 months ago

Sounds good! A bit is on the dev branch already, but not finished. Feel free to throw me any chat platforms you prefer to use on my email @BenjaminEHowe

Denperidge commented 2 months ago

Tests, even if written a bit peculiar, are written and passing again since adding your commits! Thanks for opening the issue and pr 😄