https://github.com/bzlparty/rules_html
Bazel Rules for HTML
https://github.com/bzlparty/rules_html
bazel bazel-rules bazel-tools html
Last synced: 8 months ago
JSON representation
Bazel Rules for HTML
- Host: GitHub
- URL: https://github.com/bzlparty/rules_html
- Owner: bzlparty
- License: gpl-3.0
- Created: 2024-01-02T09:29:33.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-09T22:17:00.000Z (over 1 year ago)
- Last Synced: 2025-01-22T23:41:19.024Z (10 months ago)
- Topics: bazel, bazel-rules, bazel-tools, html
- Language: Starlark
- Size: 82 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bazel Rules for HTML
[](https://github.com/bzlparty/rules_html/actions/workflows/test.yaml)
## Installation
See install instructions on the [release page](https://github.com/bzlparty/rules_html/releases).
## Usage
Generate an HTML file:
```starlark
load("@bzlparty_rules_html//:defs.bzl", "html_file")
html_file(
name = "index",
out = "index.html",
body = [
"
Hello, World!
",
"":
],
title = "Hello, World!",
data = [
":hello_world.js",
],
)
```
Bundle an HTML file:
```starlark
load("@bzlparty_rules_html//:defs.bzl", "html_bundle")
html_bundle(
name = "bundle",
out = "bundle.html",
endtry_point = ":index.html",
)
```
## Development
Install git hooks:
```bash
pre-commit install
```
## License
[GNU GPL 3.0](/LICENSE)