Closed seanami closed 10 years ago
@seanami - I have no problem merging this change. Have you tested this PR?
I didn't see any tests in this repo that I could run, but my branch is deployed as part of my own project and things seem to be working the same as before my change.
@seanami - Good enough for me. Just wanted to make sure you deployed exactly what was in the PR. :) I will merge. Do you need me to bump the version number and publish to NPM?
Thanks! If you have time to bump the version and publish, that would be cool, since I could go back to using a vanilla NPM version of the library. But I've already got my branch out, so there's no rush from me other than cleanliness.
Published to NPM. All set! Thanks again for the PR!
I found myself trying to integrate this minimal static asset fingerprinting library (which I love, by the way) with the Less pre-processor for CSS and ran into problems because the
assetFingerprint
method is only available from the request and locals within templates. In writing a custom Less function to wrapassetFingerprint
, I don't have access to either the request object or the template locals, so I needed a reference to the method another way. This is the simplest change that I could come up with that made things workable.With this change, I can do something like the following when setting up my middleware:
In my case, my Less middleware setup for step 3 looked like this, for reference:
If you have a better suggestion on how to achieve this instead, let me know.