minsrv
is a build tool that helps you minify and hash our CSS and Javascript files automatically, so that you don't have to set up webpack or any of the other Node tools.
It comes with two parts.
This is a CLI that you can use to compress your JS, CSS and HTML, and put everything into new, hashed files
TODO: use
pkger
to embed everything into the binary
This is middleware that does a few things:
- Intercepts HTML pages before they go back to the client
- Parses all of the
<script>
and<link>
tags & changes thesrc
andhref
(respectively) URLs to point to the newly hashed files - Minifies the HTML and returns it to the client