non-stupid-digest-assets icon indicating copy to clipboard operation
non-stupid-digest-assets copied to clipboard

Issue #26

Open m0gg opened this issue 11 years ago • 4 comments

rewriting manifest, deletes digest-files and entries, adds non-digest entries cherry-picked 1588a045798c7d9620ffbbb4272ecfb1a150a876

concerning issue #26

m0gg avatar Dec 09 '14 01:12 m0gg

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.

alexspeller avatar Dec 09 '14 01:12 alexspeller

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.

m0gg avatar Dec 09 '14 02:12 m0gg

@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.

m0gg avatar Dec 09 '14 14:12 m0gg

@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.

m0gg avatar Dec 09 '14 15:12 m0gg