diff options
author | Casey <casey.duquette@snapchat.com> | 2022-03-23 13:39:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 16:39:24 -0400 |
commit | 383aa76ed6c799672dcaaa36b51126309f1b4578 (patch) | |
tree | 890df3af57c2e49f0f4f51fc400ee52116b9e6a0 | |
parent | 4d5b5dae64af3b445c73612e09371a6c0e7fd4fd (diff) | |
download | stardoc-383aa76ed6c799672dcaaa36b51126309f1b4578.tar.gz |
Update multiple files example (#113)
-rw-r--r-- | docs/generating_stardoc.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/generating_stardoc.md b/docs/generating_stardoc.md index 88a37bd..33e4c5a 100644 --- a/docs/generating_stardoc.md +++ b/docs/generating_stardoc.md @@ -133,14 +133,18 @@ 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`: ```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. ``` |