non-stupid-digest-assets
non-stupid-digest-assets copied to clipboard
Non-digest only mode (move instead of copy)
For various reasons we've gone for a setup where cache busting is provided at a higher level (root of the path) so digesting of any sort isn't useful (actually just gets in the way). Using this gem solves the problem but leaves our asset bundle double the size it really needs to be.
I'm going to patch a fork to include a non_digest_asset_mode
or similar setting. Default being copy
but optionally move
.
Would this be something you'd be interested in?
I'm just a non-stupid-digest-assets user, but I imagine moving the digested assets completely would break most applications. Perhaps adding a mode for copy, move, or symlink would be useful? I forget the disadvantages of symlink over copy in this situation but if I recall there are some other than the obvious bonus of not duplicating files.
@courtland the proposed change would definitely keep the status quo by default (see my note about the default being copy
). You'd need to opt-in to change that to move
(or something else).
Here's what I'm proposing https://github.com/alexspeller/non-stupid-digest-assets/compare/master...abrom:master
along with
NonStupidDigestAssets.destupidify_mode = :move
will move instead of copy.
A PR for this sounds good to me, I wouldn't use it personally but I can see it might be useful
I think you can just set config.assets.digest = false
if you don't want digests at all.