[Archivesspace_Users_Group] Aggregating plugin assets
Joshua D. Shaw
Joshua.D.Shaw at dartmouth.edu
Thu Apr 16 16:11:31 EDT 2020
Hey all-
I was getting a little frustrated with aggressive browser caching during deployment when I'd update a plugin's css or js. Often the old css or js would still be cached in the user's browser and then things would be bad.
So... I've whipped up a proof of concept/template plugin that aggregates the css and js in a plugin's frontend/assets folder and serves up those two aggregate files rather than the individual files. It gets you two benefits 1) fingerprinting 2) any css or js added to assets gets picked up automatically, so you don't have to edit the frontend/views/layouts_head.html.erb file
This isn't a plugin that will actually do anything for existing plugins - you'd want to use this as a template when updating or creating new plugins.
https://github.com/dartmouth-dltg/aggregate_assets
Cheers,
Joshua
___________________
Joshua Shaw (he, him)
Technology Coordinator
Rauner Special Collections Library & Digital Library Technologies Group
Dartmouth College
603.646.0405
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200416/d209ded1/attachment-0001.html>
More information about the Archivesspace_Users_Group
mailing list