-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from player-ui/doc-gen
Generate docs for all rules
- Loading branch information
Showing
13 changed files
with
467 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
load("@aspect_bazel_lib//lib:docs.bzl", "stardoc_with_diff_test", "update_docs") | ||
|
||
stardoc_with_diff_test( | ||
name = "rules", | ||
name = "javascript", | ||
bzl_library_target = "//javascript:defs", | ||
) | ||
|
||
update_docs(name = "update") | ||
stardoc_with_diff_test( | ||
name = "kotlin", | ||
bzl_library_target = "//kotlin:defs", | ||
) | ||
|
||
stardoc_with_diff_test( | ||
name = "ios", | ||
bzl_library_target = "//ios:defs", | ||
) | ||
|
||
stardoc_with_diff_test( | ||
name = "player", | ||
bzl_library_target = "//player:defs", | ||
) | ||
|
||
update_docs(name = "update") |
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
<!-- Generated with Stardoc: http://skydoc.bazel.build --> | ||
|
||
|
||
Public API for Kotlin based project rules | ||
|
||
|
||
<a id="distribution"></a> | ||
|
||
## distribution | ||
|
||
<pre> | ||
distribution(<a href="#distribution-name">name</a>, <a href="#distribution-maven_coordinates">maven_coordinates</a>, <a href="#distribution-lib_name">lib_name</a>, <a href="#distribution-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
|
||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="distribution-name"></a>name | <p align="center"> - </p> | none | | ||
| <a id="distribution-maven_coordinates"></a>maven_coordinates | <p align="center"> - </p> | none | | ||
| <a id="distribution-lib_name"></a>lib_name | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="distribution-kwargs"></a>kwargs | <p align="center"> - </p> | none | | ||
|
||
|
||
<a id="kt_jvm"></a> | ||
|
||
## kt_jvm | ||
|
||
<pre> | ||
kt_jvm(<a href="#kt_jvm-name">name</a>, <a href="#kt_jvm-lint_config">lint_config</a>, <a href="#kt_jvm-group">group</a>, <a href="#kt_jvm-version">version</a>, <a href="#kt_jvm-deploy_env">deploy_env</a>, <a href="#kt_jvm-excluded_workspaces">excluded_workspaces</a>, <a href="#kt_jvm-pom_template">pom_template</a>, | ||
<a href="#kt_jvm-module_name">module_name</a>, <a href="#kt_jvm-main_opts">main_opts</a>, <a href="#kt_jvm-main_srcs">main_srcs</a>, <a href="#kt_jvm-main_resources">main_resources</a>, <a href="#kt_jvm-main_resource_jars">main_resource_jars</a>, | ||
<a href="#kt_jvm-main_resource_strip_prefix">main_resource_strip_prefix</a>, <a href="#kt_jvm-main_associates">main_associates</a>, <a href="#kt_jvm-main_deps">main_deps</a>, <a href="#kt_jvm-main_exports">main_exports</a>, <a href="#kt_jvm-main_runtime_deps">main_runtime_deps</a>, | ||
<a href="#kt_jvm-test_package">test_package</a>, <a href="#kt_jvm-test_opts">test_opts</a>, <a href="#kt_jvm-test_srcs">test_srcs</a>, <a href="#kt_jvm-test_resources">test_resources</a>, <a href="#kt_jvm-test_resource_jars">test_resource_jars</a>, | ||
<a href="#kt_jvm-test_resource_strip_prefix">test_resource_strip_prefix</a>, <a href="#kt_jvm-test_associates">test_associates</a>, <a href="#kt_jvm-test_deps">test_deps</a>, <a href="#kt_jvm-test_runtime_deps">test_runtime_deps</a>) | ||
</pre> | ||
|
||
Generic Kotlin JVM macro for conditionally configuring build & test targets, linting, and publishing. | ||
|
||
# Building + Testing | ||
|
||
Most kt_jvm_library parameters can be forwarded for either the main or test | ||
set by prefixing the paremeter with `main` or `test`, i.e. `main_srcs`, `test_deps` | ||
|
||
If `srcs` or `resources` are undefined, they will default to globbing the | ||
files grouped under Maven convention, i.e. `src/main/kotlin` and `src/main/resources` | ||
|
||
# Linting | ||
|
||
If a `lint_config` target it provided, a lint test and lint fix target will be | ||
generated. | ||
|
||
# Publishing | ||
|
||
Distribution requires a group and version to use for Maven coordinates. | ||
|
||
If either of these properties are provided, publishing targets will be attempted to be | ||
created, but will error out if any of the other required properties are missing. | ||
|
||
Three targets are created for publishing: | ||
- {name}-assemble: Package artifact and generate POM | ||
- {name}-deploy: Executable target for actually deploying to a Maven repo | ||
- {name}-install: Exectuable target to locally install the artifacts | ||
|
||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="kt_jvm-name"></a>name | used for the underlying <code>kt_jvm_library</code> rule | none | | ||
| <a id="kt_jvm-lint_config"></a>lint_config | project level KtLint config | <code>None</code> | | ||
| <a id="kt_jvm-group"></a>group | (optional) group identifier for publishing | <code>None</code> | | ||
| <a id="kt_jvm-version"></a>version | (optional) version to publish under | <code>None</code> | | ||
| <a id="kt_jvm-deploy_env"></a>deploy_env | (optional) collection of targets to exclude from transitive closure | <code>None</code> | | ||
| <a id="kt_jvm-excluded_workspaces"></a>excluded_workspaces | (optional) dict of workspace names to replace, or remove, from transitive closure | <code>None</code> | | ||
| <a id="kt_jvm-pom_template"></a>pom_template | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="kt_jvm-module_name"></a>module_name | (optional) Kotlin module name | <code>None</code> | | ||
| <a id="kt_jvm-main_opts"></a>main_opts | (optional) Kotlin compiler options used to compile the main source set | <code>None</code> | | ||
| <a id="kt_jvm-main_srcs"></a>main_srcs | (optional) main source set -- defaults to <code>glob(["src/main/kotlin/**/*.kt"])</code> | <code>None</code> | | ||
| <a id="kt_jvm-main_resources"></a>main_resources | (optional) main resources -- defaults to <code>glob(["src/main/resources/**/*"])</code> | <code>None</code> | | ||
| <a id="kt_jvm-main_resource_jars"></a>main_resource_jars | (optional) additional resource JARs for the main sources | <code>None</code> | | ||
| <a id="kt_jvm-main_resource_strip_prefix"></a>main_resource_strip_prefix | (optional) remove prefix from resources | <code>None</code> | | ||
| <a id="kt_jvm-main_associates"></a>main_associates | (optional) Kotlin module dependencies to treat as associates of the same module | <code>None</code> | | ||
| <a id="kt_jvm-main_deps"></a>main_deps | (optional) dependencies of the main source set | <code>None</code> | | ||
| <a id="kt_jvm-main_exports"></a>main_exports | (optional) dependencies that should be exported as apart of this module | <code>None</code> | | ||
| <a id="kt_jvm-main_runtime_deps"></a>main_runtime_deps | (optional) depencies of the main source set that are provided at runtime | <code>None</code> | | ||
| <a id="kt_jvm-test_package"></a>test_package | (required if test sources are provided) package containing tests | <code>None</code> | | ||
| <a id="kt_jvm-test_opts"></a>test_opts | (optional) Kotlin compiler options used to compile the test source set | <code>None</code> | | ||
| <a id="kt_jvm-test_srcs"></a>test_srcs | (optional) test source set -- defaults to <code>glob(["src/test/kotlin/**/*.kt"])</code> | <code>None</code> | | ||
| <a id="kt_jvm-test_resources"></a>test_resources | (optional) main resources -- defaults to <code>glob(["src/test/resources/**/*"])</code> | <code>None</code> | | ||
| <a id="kt_jvm-test_resource_jars"></a>test_resource_jars | (optional) additional resource JARs for the test sources | <code>None</code> | | ||
| <a id="kt_jvm-test_resource_strip_prefix"></a>test_resource_strip_prefix | (optional) remove prefix from resources | <code>None</code> | | ||
| <a id="kt_jvm-test_associates"></a>test_associates | (optional) Kotlin module dependencies to treat as associates of the same module | <code>None</code> | | ||
| <a id="kt_jvm-test_deps"></a>test_deps | (optional) dependencies of the test source set | <code>None</code> | | ||
| <a id="kt_jvm-test_runtime_deps"></a>test_runtime_deps | (optional) depencies of the test source set that are provided at runtime | <code>None</code> | | ||
|
||
|
||
<a id="kt_jvm_junit5_test"></a> | ||
|
||
## kt_jvm_junit5_test | ||
|
||
<pre> | ||
kt_jvm_junit5_test(<a href="#kt_jvm_junit5_test-name">name</a>, <a href="#kt_jvm_junit5_test-srcs">srcs</a>, <a href="#kt_jvm_junit5_test-test_package">test_package</a>, <a href="#kt_jvm_junit5_test-deps">deps</a>, <a href="#kt_jvm_junit5_test-runtime_deps">runtime_deps</a>, <a href="#kt_jvm_junit5_test-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
|
||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="kt_jvm_junit5_test-name"></a>name | <p align="center"> - </p> | none | | ||
| <a id="kt_jvm_junit5_test-srcs"></a>srcs | <p align="center"> - </p> | none | | ||
| <a id="kt_jvm_junit5_test-test_package"></a>test_package | <p align="center"> - </p> | none | | ||
| <a id="kt_jvm_junit5_test-deps"></a>deps | <p align="center"> - </p> | <code>[]</code> | | ||
| <a id="kt_jvm_junit5_test-runtime_deps"></a>runtime_deps | <p align="center"> - </p> | <code>[]</code> | | ||
| <a id="kt_jvm_junit5_test-kwargs"></a>kwargs | <p align="center"> - </p> | none | | ||
|
||
|
||
<a id="lint"></a> | ||
|
||
## lint | ||
|
||
<pre> | ||
lint(<a href="#lint-name">name</a>, <a href="#lint-srcs">srcs</a>, <a href="#lint-lint_config">lint_config</a>) | ||
</pre> | ||
|
||
|
||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="lint-name"></a>name | <p align="center"> - </p> | none | | ||
| <a id="lint-srcs"></a>srcs | <p align="center"> - </p> | none | | ||
| <a id="lint-lint_config"></a>lint_config | <p align="center"> - </p> | none | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<!-- Generated with Stardoc: http://skydoc.bazel.build --> | ||
|
||
|
||
Public API for player Bazel rules. | ||
|
||
|
||
<a id="create_base_config"></a> | ||
|
||
## create_base_config | ||
|
||
<pre> | ||
create_base_config(<a href="#create_base_config-name">name</a>, <a href="#create_base_config-plugins">plugins</a>, <a href="#create_base_config-presets">presets</a>) | ||
</pre> | ||
|
||
|
||
|
||
**ATTRIBUTES** | ||
|
||
|
||
| Name | Description | Type | Mandatory | Default | | ||
| :------------- | :------------- | :------------- | :------------- | :------------- | | ||
| <a id="create_base_config-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | | ||
| <a id="create_base_config-plugins"></a>plugins | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> | | ||
| <a id="create_base_config-presets"></a>presets | - | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> | | ||
|
||
|
||
<a id="compile"></a> | ||
|
||
## compile | ||
|
||
<pre> | ||
compile(<a href="#compile-name">name</a>, <a href="#compile-node_modules">node_modules</a>, <a href="#compile-srcs">srcs</a>, <a href="#compile-input_dir">input_dir</a>, <a href="#compile-output_dir">output_dir</a>, <a href="#compile-data">data</a>, <a href="#compile-config">config</a>, <a href="#compile-skip_test">skip_test</a>, <a href="#compile-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
Run the src or src_dir through the player compiler. | ||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="compile-name"></a>name | The name of the target. | none | | ||
| <a id="compile-node_modules"></a>node_modules | The node_modules target to use. | <code>"//:node_modules"</code> | | ||
| <a id="compile-srcs"></a>srcs | The source files to compile. | <code>None</code> | | ||
| <a id="compile-input_dir"></a>input_dir | <p align="center"> - </p> | <code>"src"</code> | | ||
| <a id="compile-output_dir"></a>output_dir | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="compile-data"></a>data | <p align="center"> - </p> | <code>[]</code> | | ||
| <a id="compile-config"></a>config | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="compile-skip_test"></a>skip_test | <p align="center"> - </p> | <code>False</code> | | ||
| <a id="compile-kwargs"></a>kwargs | <p align="center"> - </p> | none | | ||
|
||
|
||
<a id="dsl_compile"></a> | ||
|
||
## dsl_compile | ||
|
||
<pre> | ||
dsl_compile(<a href="#dsl_compile-name">name</a>, <a href="#dsl_compile-node_modules">node_modules</a>, <a href="#dsl_compile-srcs">srcs</a>, <a href="#dsl_compile-input_dir">input_dir</a>, <a href="#dsl_compile-output_dir">output_dir</a>, <a href="#dsl_compile-data">data</a>, <a href="#dsl_compile-config">config</a>, <a href="#dsl_compile-skip_test">skip_test</a>, <a href="#dsl_compile-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
Run the src or src_dir through the player compiler. | ||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="dsl_compile-name"></a>name | The name of the target. | none | | ||
| <a id="dsl_compile-node_modules"></a>node_modules | The node_modules target to use. | <code>"//:node_modules"</code> | | ||
| <a id="dsl_compile-srcs"></a>srcs | The source files to compile. | <code>None</code> | | ||
| <a id="dsl_compile-input_dir"></a>input_dir | <p align="center"> - </p> | <code>"src"</code> | | ||
| <a id="dsl_compile-output_dir"></a>output_dir | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="dsl_compile-data"></a>data | <p align="center"> - </p> | <code>[]</code> | | ||
| <a id="dsl_compile-config"></a>config | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="dsl_compile-skip_test"></a>skip_test | <p align="center"> - </p> | <code>False</code> | | ||
| <a id="dsl_compile-kwargs"></a>kwargs | <p align="center"> - </p> | none | | ||
|
||
|
||
<a id="js_xlr_pipeline"></a> | ||
|
||
## js_xlr_pipeline | ||
|
||
<pre> | ||
js_xlr_pipeline(<a href="#js_xlr_pipeline-name">name</a>, <a href="#js_xlr_pipeline-xlr_mode">xlr_mode</a>, <a href="#js_xlr_pipeline-xlr_input_dir">xlr_input_dir</a>, <a href="#js_xlr_pipeline-srcs">srcs</a>, <a href="#js_xlr_pipeline-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
A rule for compiling player flows with xlr mode. | ||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="js_xlr_pipeline-name"></a>name | The name of the target. | <code>None</code> | | ||
| <a id="js_xlr_pipeline-xlr_mode"></a>xlr_mode | The mode to use when compiling with XLR. Defaults to "plugin". | <code>"plugin"</code> | | ||
| <a id="js_xlr_pipeline-xlr_input_dir"></a>xlr_input_dir | <p align="center"> - </p> | <code>"src"</code> | | ||
| <a id="js_xlr_pipeline-srcs"></a>srcs | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="js_xlr_pipeline-kwargs"></a>kwargs | <p align="center"> - </p> | none | | ||
|
||
|
||
<a id="xlr_compile"></a> | ||
|
||
## xlr_compile | ||
|
||
<pre> | ||
xlr_compile(<a href="#xlr_compile-name">name</a>, <a href="#xlr_compile-node_modules">node_modules</a>, <a href="#xlr_compile-srcs">srcs</a>, <a href="#xlr_compile-data">data</a>, <a href="#xlr_compile-config">config</a>, <a href="#xlr_compile-input_dir">input_dir</a>, <a href="#xlr_compile-mode">mode</a>, <a href="#xlr_compile-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
|
||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="xlr_compile-name"></a>name | <p align="center"> - </p> | none | | ||
| <a id="xlr_compile-node_modules"></a>node_modules | <p align="center"> - </p> | <code>"//:node_modules"</code> | | ||
| <a id="xlr_compile-srcs"></a>srcs | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="xlr_compile-data"></a>data | <p align="center"> - </p> | <code>[]</code> | | ||
| <a id="xlr_compile-config"></a>config | <p align="center"> - </p> | <code>None</code> | | ||
| <a id="xlr_compile-input_dir"></a>input_dir | <p align="center"> - </p> | <code>"src"</code> | | ||
| <a id="xlr_compile-mode"></a>mode | <p align="center"> - </p> | <code>"plugin"</code> | | ||
| <a id="xlr_compile-kwargs"></a>kwargs | <p align="center"> - </p> | none | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.