From 7c1a835a93f499c6859e10d1aca794d3e2905fe4 Mon Sep 17 00:00:00 2001 From: Casey Date: Wed, 3 Nov 2021 17:31:32 -0700 Subject: [PATCH 1/2] Update multiple files example --- docs/generating_stardoc.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/generating_stardoc.md b/docs/generating_stardoc.md index 88a37bd5..37278322 100644 --- a/docs/generating_stardoc.md +++ b/docs/generating_stardoc.md @@ -138,9 +138,13 @@ which loads these files: `doc_hub.bzl`: ```python -load("//foo:foo.bzl", "foo_rule") -load("//bar:bar.bzl", "bar_rule") -load("//baz:baz.bzl", "baz_rule") +load("//foo:foo.bzl", _foo_rule = "foo_rule") +load("//bar:bar.bzl", _bar_rule = "bar_rule") +load("//baz:baz.bzl", _baz_rule = "baz_rule") + +foo_rule = _foo_rule +bar_rule = _bar_rule +baz_rule = _baz_rule # No need for any implementation here. The rules need only be loaded. ``` From ca3a7c13de08d24e8c93c765a01dd8c26bce0290 Mon Sep 17 00:00:00 2001 From: Alexandre Rostovtsev Date: Wed, 23 Mar 2022 11:50:34 -0400 Subject: [PATCH 2/2] Update multiple files explanation --- docs/generating_stardoc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generating_stardoc.md b/docs/generating_stardoc.md index 37278322..33e4c5aa 100644 --- a/docs/generating_stardoc.md +++ b/docs/generating_stardoc.md @@ -133,7 +133,7 @@ like documentation to be generated. For example, you may want to generate documentation for `foo_rule`, `bar_rule`, and `baz_rule`, all in different `.bzl` files. First, you would create a single `.bzl` file -which loads these files: +which loads these files and binds the rules to be documented as globals: `doc_hub.bzl`: