APIReference.md
December 19, 2019 ยท View on GitHub
brotli_compressed_files
brotli_compressed_files(name, brotli, compression_level, srcs)
Compress a set of files with Brotli
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| brotli | The Brotli executable | Label | optional | @brotli//:brotli |
| compression_level | A number between 0 and 11 indicating how much effort to put into compressing | Integer | optional | 11 |
| srcs | Files to compress | List of labels | optional | [] |
brotli_compress_file
brotli_compress_file(actions, executable, input, output_name, compression_level)
Emits an Action that compresses a single file with Brotli
This function invokes ctx.actions.run with Brotli on a single file. It is intended to be used inside the implementation of rules.
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| actions | the actions module, usually via ctx.actions inside a rule impl. | none |
| executable | the brotli exe. | none |
| input | - | none |
| output_name | the filename for the output. If not set, defaults to the input filename with a ".br" extension suffix. | None |
| compression_level | a number between 0 and 11 indicating how hard to try. If not set, the brotli exe will choose a default (typically 11). | None |
brotli_repositories
brotli_repositories()
Download and build the Brotli executable.
PARAMETERS