A lazy man's minify
go get github.com/romainmenke/simple-mini
I needed a tool to remove whitespace from css and js files for golang web projects. I did't want a transpiler and I didn't want to add node as a dependency. Since everything is gzipped anyway I also didn't want to minify naming.
- it loops over all files in a directory
- removes whitespace
- saves to
.min
version
I use it with //go:generate simple-mini
and modd.
-h
: help-source
: source directory-out
: output directorytrailing args
: exclusion -> simplemust not contain
logic
It removes :
- tabs
- linebreaks
It replaces :
- double spaces with single spaces