diff --git a/MODULE.bazel b/MODULE.bazel
index f90cd28..11a2762 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -16,3 +16,4 @@ bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependenc
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.36.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True)
+bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
diff --git a/WORKSPACE b/WORKSPACE
index 2871205..42454d5 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -54,6 +54,28 @@ go_register_toolchains(version = "1.19.3")
gazelle_dependencies()
+############################################
+# Stardoc
+load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories")
+
+stardoc_repositories()
+
+load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
+
+rules_jvm_external_deps()
+
+load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
+
+rules_jvm_external_setup()
+
+load("@io_bazel_stardoc//:deps.bzl", "stardoc_external_deps")
+
+stardoc_external_deps()
+
+load("@stardoc_maven//:defs.bzl", stardoc_pinned_maven_install = "pinned_maven_install")
+
+stardoc_pinned_maven_install()
+
# Buildifier
load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps")
diff --git a/docs/rules.md b/docs/rules.md
index 50dc0ec..1583ca1 100644
--- a/docs/rules.md
+++ b/docs/rules.md
@@ -4,7 +4,6 @@ Public API surface is re-exported here.
Users should not load files under "/internal"
-
## webpack_bundle
@@ -23,21 +22,21 @@ Runs the webpack-cli under bazel
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| name | A unique name for this target. | none |
-| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. //:node_modules
.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli | none |
-| srcs | Non-entry point JavaScript source files from the workspace.
You must not repeat file(s) passed to entry_point/entry_points. | []
|
-| args | Command line arguments to pass to Webpack.
These argument passed on the command line before arguments that are added by the rule. Run bazel
with --subcommands
to see what Webpack CLI command line was invoked.
See the [Webpack CLI docs](https://webpack.js.org/api/cli/) for a complete list of supported arguments. | []
|
-| deps | Runtime dependencies which may be loaded during compilation. | []
|
-| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | None
|
-| data | Runtime dependencies to include in binaries/tests that depend on this target.
The transitive npm dependencies, transitive sources, default outputs and runfiles of targets in the data
attribute are added to the runfiles of this target. They should appear in the '*.runfiles' area of any executable which has a runtime dependency on this target. | []
|
-| env | Environment variables of the action.
Subject to $(location)
and make variable expansion. | {}
|
-| output_dir | If True, webpack produces an output directory containing all output files. | False
|
-| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Exactly one of entry_point
to entry_points
must be specified if output_dir
is False
. | None
|
-| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Exactly one of entry_point
to entry_points
must be specified if output_dir
is False
. | {}
|
-| webpack_config | Webpack configuration file.
See https://webpack.js.org/configuration/ | None
|
-| configure_mode | Configure mode
in the generated base webpack config.
mode
is set to production
if the Bazel compilation mode is opt
otherwise it is set to development
.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| configure_devtool | Configure devtool
in the generated base webpack config.
devtool
is set to eval
if the Bazel compilation mode is fastbuild
, eval-source-map
if the Bazel compilation mode is dbg
, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| use_execroot_entry_point | Use the entry_point
script of the webpack
js_binary
that is in the execroot output tree instead of the copy that is in runfiles.
When set, runfiles are hoisted to the target platform when this is configured and included as target platform execroot inputs to the action.
Using the entry point script that is in the execroot output tree means that there will be no conflicting runfiles node_modules
in the node_modules resolution path which can confuse npm packages such as next and react that don't like being resolved in multiple node_modules trees. This more closely emulates the environment that tools such as Next.js see when they are run outside of Bazel. | True
|
-| supports_workers | Experimental! Use only with caution.
Allows you to enable the Bazel Worker strategy for this library. | False
|
+| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. `//:node_modules`.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli | none |
+| srcs | Non-entry point JavaScript source files from the workspace.
You must not repeat file(s) passed to entry_point/entry_points. | `[]` |
+| args | Command line arguments to pass to Webpack.
These argument passed on the command line before arguments that are added by the rule. Run `bazel` with `--subcommands` to see what Webpack CLI command line was invoked.
See the [Webpack CLI docs](https://webpack.js.org/api/cli/) for a complete list of supported arguments. | `[]` |
+| deps | Runtime dependencies which may be loaded during compilation. | `[]` |
+| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | `None` |
+| data | Runtime dependencies to include in binaries/tests that depend on this target.
The transitive npm dependencies, transitive sources, default outputs and runfiles of targets in the `data` attribute are added to the runfiles of this target. They should appear in the '*.runfiles' area of any executable which has a runtime dependency on this target. | `[]` |
+| env | Environment variables of the action.
Subject to `$(location)` and make variable expansion. | `{}` |
+| output_dir | If True, webpack produces an output directory containing all output files. | `False` |
+| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Exactly one of `entry_point` to `entry_points` must be specified if `output_dir` is `False`. | `None` |
+| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Exactly one of `entry_point` to `entry_points` must be specified if `output_dir` is `False`. | `{}` |
+| webpack_config | Webpack configuration file.
See https://webpack.js.org/configuration/ | `None` |
+| configure_mode | Configure `mode` in the generated base webpack config.
`mode` is set to `production` if the Bazel compilation mode is `opt` otherwise it is set to `development`.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| configure_devtool | Configure `devtool` in the generated base webpack config.
`devtool` is set to `eval` if the Bazel compilation mode is `fastbuild`, `eval-source-map` if the Bazel compilation mode is `dbg`, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| use_execroot_entry_point | Use the `entry_point` script of the `webpack` `js_binary` that is in the execroot output tree instead of the copy that is in runfiles.
When set, runfiles are hoisted to the target platform when this is configured and included as target platform execroot inputs to the action.
Using the entry point script that is in the execroot output tree means that there will be no conflicting runfiles `node_modules` in the node_modules resolution path which can confuse npm packages such as next and react that don't like being resolved in multiple node_modules trees. This more closely emulates the environment that tools such as Next.js see when they are run outside of Bazel. | `True` |
+| supports_workers | Experimental! Use only with caution.
Allows you to enable the Bazel Worker strategy for this library. | `False` |
| kwargs | Additional arguments | none |
@@ -63,17 +62,17 @@ under the hood.
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| name | A unique name for this target. | none |
-| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. //:node_modules
.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli, webpack-dev-server | none |
-| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | None
|
-| env | Environment variables of the action.
Subject to $(location)
and make variable expansion. | {}
|
-| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Only one of entry_point
to entry_points
must be specified. | None
|
-| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Only one of entry_point
to entry_points
must be specified. | {}
|
-| webpack_config | Webpack configuration file. See https://webpack.js.org/configuration/. | None
|
-| configure_mode | Configure mode
in the generated base webpack config.
mode
is set to production
if the Bazel compilation mode is opt
otherwise it is set to development
.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| configure_devtool | Configure devtool
in the generated base webpack config.
devtool
is set to eval
if the Bazel compilation mode is fastbuild
, eval-source-map
if the Bazel compilation mode is dbg
, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied webpack_config
.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | True
|
-| args | Additional arguments to pass to webpack.
The serve
command, the webpack config file (--config
) and the mode (--mode
) are automatically set. | []
|
-| data | Bundle and runtime dependencies of the program.
Should include the webpack_bundle
rule srcs
and deps
.
The webpack config and entry_point[s] are automatically passed to data and should not be repeated. | []
|
-| mode | The mode to pass to --mode
. | "development"
|
+| node_modules | Label pointing to the linked node_modules target where webpack is linked, e.g. `//:node_modules`.
The following packages must be linked into the node_modules supplied:
webpack, webpack-cli, webpack-dev-server | none |
+| chdir | Working directory to run Webpack under.
This is needed to workaround some buggy resolvers in webpack loaders, which assume that the node_modules tree is located in a parent of the working directory rather than a parent of the script with the require statement.
Note that any relative paths in your configuration may need to be adjusted so they are relative to the new working directory.
See also: https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-chdir | `None` |
+| env | Environment variables of the action.
Subject to `$(location)` and make variable expansion. | `{}` |
+| entry_point | The point where to start the application bundling process.
See https://webpack.js.org/concepts/entry-points/
Only one of `entry_point` to `entry_points` must be specified. | `None` |
+| entry_points | The map of entry points to bundle names.
See https://webpack.js.org/concepts/entry-points/
Only one of `entry_point` to `entry_points` must be specified. | `{}` |
+| webpack_config | Webpack configuration file. See https://webpack.js.org/configuration/. | `None` |
+| configure_mode | Configure `mode` in the generated base webpack config.
`mode` is set to `production` if the Bazel compilation mode is `opt` otherwise it is set to `development`.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| configure_devtool | Configure `devtool` in the generated base webpack config.
`devtool` is set to `eval` if the Bazel compilation mode is `fastbuild`, `eval-source-map` if the Bazel compilation mode is `dbg`, otherwise it is left unset.
The configured value will be overridden if it is set in a supplied `webpack_config`.
See https://bazel.build/docs/user-manual#compilation-mode for more info on how to configure the compilation mode. | `True` |
+| args | Additional arguments to pass to webpack.
The `serve` command, the webpack config file (`--config`) and the mode (`--mode`) are automatically set. | `[]` |
+| data | Bundle and runtime dependencies of the program.
Should include the `webpack_bundle` rule `srcs` and `deps`.
The webpack config and entry_point[s] are automatically passed to data and should not be repeated. | `[]` |
+| mode | The mode to pass to `--mode`. | `"development"` |
| kwargs | Additional arguments. See [js_run_devserver](https://github.com/aspect-build/rules_js/blob/main/docs/js_run_devserver.md). | none |
diff --git a/internal_deps.bzl b/internal_deps.bzl
index 66e3675..2e46a50 100644
--- a/internal_deps.bzl
+++ b/internal_deps.bzl
@@ -38,8 +38,8 @@ def rules_webpack_internal_deps():
http_archive(
name = "io_bazel_stardoc",
- sha256 = "3fd8fec4ddec3c670bd810904e2e33170bedfe12f90adf943508184be458c8bb",
- urls = ["https://github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz"],
+ sha256 = "62bd2e60216b7a6fec3ac79341aa201e0956477e7c8f6ccc286f279ad1d96432",
+ urls = ["https://github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz"],
)
http_archive(