-
Notifications
You must be signed in to change notification settings - Fork 11
Rewrite Based on Manifest File #8
Comments
If I understand correctly, that would be everyone's job to get the digest and append it in the index.html file? That sounds good to me because reading a JSON before rendering my Jade template is easy and cleaner than what I currently do (see #13) :) Also as a suggestion (that the rewrite would allow): appending the digest to the file URL, not the file name (to ease versioning). Instead of having: <script type="text/javascript" src="assets/myscript-2a4z2r.js"></script> We would have: <script type="text/javascript" src="assets/myscript.js?2a4z2r"></script> I'm not sure this would work out of the box with all HTTP server but it works with ExpressJS and I bet this is rather common (and configurable if it's not the default behavior). If the plugin generates a manifest with a list of "file => digest" I think it's easily doable anyway. Also, if you plan on keeping the "append" feature within the plugin, it could have two appending modes: append to file or append to URL. Cheers and thanks again for your work! |
Love the idea @jsilvestre. I opened #14 to make sure I don't lose track of it. |
Closed by #24 |
How does it works? How can I set the digest as parameter ? |
Renaming and replacing occurrences of
DIGEST
ad-hoc was a bad approach. Instead, we should generate a manifest file a la Rails and then do the rename / replacements based on its contents. We could optionally leave the manifest file around as an artifact that allowsExamples in the wild:
The text was updated successfully, but these errors were encountered: