Add support for -r (recursive) flag in the Linux CLI
- Dominant language
- TypeScript
- Stars
- 14.9k
- Forks
- 1.4k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
I'm pre-zipping static content before bundling it in a Docker container.
This allows me to serve static content gzipped if there's an `accept-encoding` header that contains `gzip` without putting extra load on the CPU when serving gzipped content.
`gzip -rk9 ./build/processedResources/jvm/main/static/* || exit
`
I wanted to add support for Brotli if the `accept-encoding` header contains `br` and then serve whichever one is smaller, file.ext.br or file.ext.gz
`brotli -rk9 ./build/processedResources/jvm/main/static/* || exit
`
Turns out `-k` and `-9` does exactly the same as `gzip`, but the `-r` flag is not supported which caught me by surprise.
Short-term workaround is to use `find ... | args ... | brotli -k9` after I've extensively studied the `find` and `xargs` man pages, long-term, it would be nice if I can just do `-r` and save the hassle of using 3 commands to do one thing.
Contributor guide
Assessment
This issue has not been assessed yet.