I wanted a quick and easy way to minify a CSS file for this site, without adding any fancy build tools like webpack, using a quick command.
The ideal workflow was:
After some digging and a node library, I came up with this.
npm install -g minify
vim style.css
:r !minify %
If you are looking to minify lots of files for an app there are clearly better options, but if you just want to shrink the size of a single file on a static site this is my new favorite.