Closed vicdelfant closed 7 years ago
@scottwakefield would love to see this merged!
Thanks to a PR from @timkelty the $strict
parameter is now even more flexible, allowing non-existing files to pass through if $strict = false
as well.
Hey @vicdelfant and @timkelty,
Thank you for the contributions guys!
Happy to merge this in if you could make a couple of updates for me :)
Would it be possible for you to remove - 5.6
from .travis.yml
so that the CI passes – I should have removed this myself as Craft 3 requires 7.0+ anyway.
Also, can you make the necessary updates to get the StyleCI check to pass?
That would save me a bunch of time in pulling the PR down just to tweak those bits. Hope you don't mind.
@scottwakefield no problem, it took a couple of commits but here we go! :)
Nice work @vicdelfant – appreciate it!
@scottwakefield can you bump the version and push a new tag so this is installable from packagist?
@timkelty All sorted now! Sorry for the delay, I ran out of time yesterday.
Hope that's all good now. Let me know if not :)
Thanks again for your work on this!
1.1.0
working great, thanks!
In our (probably not-so-common) case we also copy a couple of files to the asset output directory that we know will be there but aren't available from the manifest file. This caused an
InvalidArgumentException
inFilenameRev
, with no option to get around this.This PR introduces an optional
$strict
parameter to the{{ rev(...) }}
Twig function that allows you to haveFilenameRev
fallback to appending a query string in case the file does not exist in the manifest. The README has been updated accordingly with an example.