pushup icon indicating copy to clipboard operation
pushup copied to clipboard

Consider features to support static asset caching

Open scitech opened this issue 3 years ago • 1 comments

Not sure if this is a use case we're concerned with here, but I think there'd need to be something like Django's collectstatic for apps more complex than a toy app. That way we could have hashed filenames to support asset caching and we wouldn't need to check built assets into source control.

The collectstatic approach would work something like:

  • add a way to configure pushup with paths to reference for production-ready static assets, and a desired public path where assets should be located in deployed environments
  • in the pushup template language, add some way of referencing paths to frontend assets relative to the public path
  • pushup build or a new pushup collectstatic command md5's the assets at the source path and produces a public path URL with a hashed filename

scitech avatar Sep 13 '22 13:09 scitech

Yes, I think this is a solid improvement and the kind of thing we should take advantage of by having a template language we control.

paulsmith avatar Sep 13 '22 13:09 paulsmith