2021-11-10 14:34:00 +00:00
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
Public API for docs helpers
2022-06-10 20:05:19 +00:00
< a id = "stardoc_with_diff_test" > < / a >
2021-11-10 14:34:00 +00:00
## stardoc_with_diff_test
< pre >
2022-05-26 01:47:32 +00:00
stardoc_with_diff_test(< a href = "#stardoc_with_diff_test-name" > name< / a > , < a href = "#stardoc_with_diff_test-bzl_library_target" > bzl_library_target< / a > , < a href = "#stardoc_with_diff_test-kwargs" > kwargs< / a > )
2021-11-10 14:34:00 +00:00
< / pre >
2022-05-26 01:47:32 +00:00
Creates a stardoc target that can be auto-detected by update_docs to write the generated doc to the source tree and test that it's up to date.
2021-11-10 14:34:00 +00:00
This is helpful for minimizing boilerplate in repos wih lots of stardoc targets.
**PARAMETERS**
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
2022-03-03 00:00:53 +00:00
| < a id = "stardoc_with_diff_test-name" > < / a > name | the name of the stardoc file to be written to the current source directory (.md will be appended to the name). Call bazel run on this target to update the file. | none |
2021-11-10 14:34:00 +00:00
| < a id = "stardoc_with_diff_test-bzl_library_target" > < / a > bzl_library_target | the label of the < code > bzl_library< / code > target to generate documentation for | none |
2022-04-28 00:22:30 +00:00
| < a id = "stardoc_with_diff_test-kwargs" > < / a > kwargs | additional attributes passed to the stardoc() rule, such as for overriding the templates | none |
2021-11-10 14:34:00 +00:00
2022-06-10 20:05:19 +00:00
< a id = "update_docs" > < / a >
2021-11-10 14:34:00 +00:00
## update_docs
< pre >
2023-02-19 04:09:27 +00:00
update_docs(< a href = "#update_docs-name" > name< / a > , < a href = "#update_docs-kwargs" > kwargs< / a > )
2021-11-10 14:34:00 +00:00
< / pre >
2022-03-03 00:00:53 +00:00
Stamps an executable run for writing all stardocs declared with stardoc_with_diff_test to the source tree.
2021-11-10 14:34:00 +00:00
This is to be used in tandem with `stardoc_with_diff_test()` to produce a convenient workflow
for generating, testing, and updating all doc files as follows:
``` bash
bazel build //{docs_folder}/... & & bazel test //{docs_folder}/... & & bazel run //{docs_folder}:update
```
eg.
``` bash
bazel build //docs/... & & bazel test //docs/... & & bazel run //docs:update
```
**PARAMETERS**
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
2022-03-03 00:00:53 +00:00
| < a id = "update_docs-name" > < / a > name | the name of executable target | < code > "update"< / code > |
2023-02-19 04:09:27 +00:00
| < a id = "update_docs-kwargs" > < / a > kwargs | Other common named parameters such as < code > tags< / code > or < code > visibility< / code > | none |
2021-11-10 14:34:00 +00:00