fix: improve jq usage docs
diff --git a/docs/jq.md b/docs/jq.md index 4b3d0ad..1562887 100755 --- a/docs/jq.md +++ b/docs/jq.md
@@ -14,9 +14,18 @@ For jq documentation, see https://stedolan.github.io/jq/. +To use this rule you must register the jq toolchain in your WORKSPACE: + +```starlark +load("@aspect_bazel_lib//lib:repositories.bzl", "register_jq_toolchains") +register_jq_toolchains(version = "1.6") +``` + Usage examples: ```starlark +load("@aspect_bazel_lib//lib:jq.bzl", "jq") + # Remove fields from package.json jq( name = "no_dev_deps",
diff --git a/lib/jq.bzl b/lib/jq.bzl index 0a4de5a..326ea28 100644 --- a/lib/jq.bzl +++ b/lib/jq.bzl
@@ -13,9 +13,18 @@ For jq documentation, see https://stedolan.github.io/jq/. + To use this rule you must register the jq toolchain in your WORKSPACE: + + ```starlark + load("@aspect_bazel_lib//lib:repositories.bzl", "register_jq_toolchains") + register_jq_toolchains(version = "1.6") + ``` + Usage examples: ```starlark + load("@aspect_bazel_lib//lib:jq.bzl", "jq") + # Remove fields from package.json jq( name = "no_dev_deps",