Terser Glob
A small command-line wrapper around Terser that accepts glob patterns, so a whole directory is minified in one command instead of one file at a time.
About this project
Terser Glob is the terser command line with glob patterns added. The terser CLI takes files one at a time, which is why a build script that minifies a folder ends up as a shell loop or a hand-written list of paths, and this module removes that step.
Usage is the terser usage: replace the command and pass the same options. A path can be a glob pattern in quotes, several patterns can be given at once, individual files still work, and an output path is a directory the results are written into. The terser package comes as a dependency, so nothing else has to be installed alongside it.
It exists because terser has carried the request for this for years, and a build script should not have to grow a loop around what is a one-word change to the command.
Features
TypeScript types
Verified by tests
Command-line interface
