non-stupid-digest-assets
non-stupid-digest-assets copied to clipboard
Issue #26
rewriting manifest, deletes digest-files and entries, adds non-digest entries cherry-picked 1588a045798c7d9620ffbbb4272ecfb1a150a876
concerning issue #26
Not so sure about this - I definitely don't think removing the digest files should be the default behaviour. I haven't looked into the manifest very much so I don't know if it makes sense to have both digest and non digest in the manifest, but I'm a bit hesitant to merge without knowing more about how it works and making removing the digested files an option rather than the default.
It makes no sense if you're only using the logical paths in your app. The manifest is simply a hash with the logical path as key, wich would be the same for non-digest and digest files. But if you're using hardcoded paths you'd be better off not altering the manifest. In this case the logical path would be translated to the digest file.
@armanm initializing a Manifest with the filename was the first thing i tried. Unfortunately i had do discover that the save for Manifest class is protected. As the original intention (for my purpose) was to move/rename the digested-files it was sufficient to jsut replace the digest-filenames in the Manifest.
@alexspeller and i'm sorry for the wrong information, but the keys in the manifest are the filenames. An entry would like that:
"header_login_bg-c6d29c89b35f0bcc2d092d0b0f8698bc.png":{"logical_path":"header_login_bg.png","mtime":"2014-11-07T23:17:10+01:00","size":143,"digest":"c6d29c89b35f0bcc2d092d0b0f8698bc"}
But as the asset-path-helpers search for the logical path, i guess there will always be returned the first match. So you'd either need additional helper-methods for non-digest asset-paths or address them without helpers, but that would kill the logical-path <=> filename concept.