Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

precompress

6.2.5 • Public • Published

precompress

Generate pre-compressed .gz and .br files for static web servers

Compresses files for use with web servers like nginx with the gzip_static and brotli_static directives. Files are compressed in parallel, using the available CPU cores efficiently. Existing output files will always be overridden.

Installation

npm i precompress

Usage

usage: precompress [options] <files,dirs,...>

  Options:
    -t, --types <type,...>   Types of files to generate. Default: gz,br
    -c, --concurrency <num>  Number of concurrent operations. Default: auto
    -i, --include <ext,...>  Only include given file extensions
    -e, --exclude <ext,...>  Exclude given file extensions
    -f, --follow             Follow symbolic links
    -s, --silent             Do not print compression times
    -h, --help               Show this text
    -v, --version            Show the version

  Examples:
    $ precompress build

© silverwind, distributed under BSD licence

Install

npm i precompress

DownloadsWeekly Downloads

458

Version

6.2.5

License

BSD-2-Clause

Unpacked Size

36.7 kB

Total Files

4

Last publish

Collaborators

  • avatar