Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bzlparty/rules_html
Bazel Rules for HTML
https://github.com/bzlparty/rules_html
bazel bazel-rules bazel-tools html
Last synced: about 1 month 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 (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-09T22:17:00.000Z (11 months ago)
- Last Synced: 2024-02-09T23:26:34.863Z (11 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
[![Test](https://github.com/bzlparty/rules_html/actions/workflows/test.yaml/badge.svg?branch=main&event=push)](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)