precompress
12.0.0
CLI将文件压缩到GZIP和Brotli。文件是有效地压缩的。现有的输出文件将始终被覆盖。
# compress all files in the "build" directory using node
npx precompress ./build
# same with bun
bunx precompress ./build
usage: precompress [options] <files,dirs,...>
Options:
-t, --types <type,...> Types of files to generate. Default: gz,br
-i, --include <glob,...> Only include given globs. Default: unset
-e, --exclude <glob,...> Exclude given globs. Default: **.gz,**.br
-m, --mtime Skip creating existing files when source file is newer
-f, --follow Follow symbolic links
-d, --delete Delete source file after compression
-o, --outdir Output directory, will preserve relative path structure
-b, --basedir Base directory to derive output path, use with --outdir
-E, --extensionless Do not output a extension, use with single --type and --outdir
-s, --silent Do not print anything
-S, --sensitive Treat include and exclude patterns case-sensitively
-c, --concurrency <num> Number of concurrent operations. Default: auto
-V, --verbose Print individual file compression times
-h, --help Show this text
-v, --version Show the version
Examples:
$ precompress ./build
©Silverwind,根据BSD许可发行