jingo-minify
jingo-minify copied to clipboard
Add hash of every bundle to build.py.
In bedrock we change the less files a lot, and have a lot of them. In reading the jingo_minify code it looked to me like a change to any CSS file would invalidate all CSS, and the same was true for js. In my local tests though they seemed to all be invalidated for every commit. So our long Expires headers for our media don't do us much good because all JS and CSS is invalidated on every push, and we push a few times per week.
The concatinated files are already hashed every time compress_assets is run to check for sameness. Why not add those hashes for all bundles to the BUNDLE_HASHES dict in build.py. The helpers already use it.
I wanted to submit some tests with this as well but compress_assets is thus for untested. I hope to add some tests for this command in a subsequent PR.
I started to look at this PR, but I don't really understand what it used to do nor what the changes cause it to do now, so I can't really comment.
It does seem like this code could use some cleaning up.
Yeah. It needs cleaning, organizing and testing. It's on my list.
@pmclanahan Any plan to keep this going?
I do indeed have such plans. Sorry it's taking so long. I want a lot of new tests and that has proved daunting enough to delay me :) I hope to get back to JM improvements very shortly. I'm preparing a PR for another more pressing issue bedrock has right now.