clubstudio / craft-asset-rev

A Craft CMS plugin to help with cache busting
MIT License
109 stars 7 forks source link

Do the files need to exist? #8

Closed lxcodes closed 6 years ago

lxcodes commented 7 years ago

Currently hitting an issue where we have javascripts that are hot-reloaded and not an actual file served from the file system but generated and inserted by a node server. Would it be possible, either by configuration variable or something else, to just ignore that a file may not exist and still output a query string of random to just cache bust?

scottwakefield commented 7 years ago

Hi @al3x-edge,

Sure, I can look at adding a configuration option that when true will allow the plugin to fallback to using a random query string. Initial intentions were to always throw an error when the plugin couldn't do what it needed to, so that people didn't miss assets not loading etc. With that in mind, I think a configuration is the way to go.

Leave it with me, or feel free to open a pull request 👍

lxcodes commented 7 years ago

@scottwakefield I'll try for a PR in a bit / today. I have a partial implementation but will need to add in configuration stuff.