Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brightspace/rules_brotli
A Bazel rule and helper function for compressing files with Brotli
https://github.com/brightspace/rules_brotli
bazel bazel-rules brotli
Last synced: 5 days ago
JSON representation
A Bazel rule and helper function for compressing files with Brotli
- Host: GitHub
- URL: https://github.com/brightspace/rules_brotli
- Owner: Brightspace
- License: apache-2.0
- Created: 2019-12-19T06:41:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T16:34:03.000Z (over 3 years ago)
- Last Synced: 2024-04-11T00:43:21.335Z (7 months ago)
- Topics: bazel, bazel-rules, brotli
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 7
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rules_brotli
A [Bazel](https://bazel.build) rule and function for compressing files with [Brotli](https://github.com/google/brotli).
## Setup
To use this library, add the following to your `WORKSPACE` file:
```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")http_archive(
name = "d2l_rules_brotli",
sha256 = "bef45321ba8030e11c4e9935591c5a656d5da3a6147ab8558c31af8f764e3a92",
strip_prefix = "rules_brotli-56bcb605599c1b5ef23bc68aef7b0985bfda7c76",
urls = [
"https://github.com/brightspace/rules_brotli/archive/56bcb605599c1b5ef23bc68aef7b0985bfda7c76.tar.gz",
],
)load("@d2l_rules_brotli", "brotli_repositories")
brotli_repositories()
```## Overview
The rule [`brotli_compressed_files`](docs/APIReference.md#brotli_compressed_files) can be used to compress a set of files.
See [`examples/BUILD`](examples/BUILD) for an example of using it.If you want to use Brotli inside your own rules, the [`brotli_compress_file`](docs/APIReference.md#brotli_compress_file) function can be used inside your rule implementation to create that action.
See the [implementation of the `brotli_compressed_files` rule](brotli/private/rules.bzl) for an example of using it.See the [API Reference](docs/APIReference.md) for the full details.