fix: improve jq usage docs

This commit is contained in:
Derek Cormier 2022-02-04 12:13:10 -08:00 committed by Greg Magolan
parent c54981857a
commit 8a287def7c
2 changed files with 18 additions and 0 deletions

View File

@ -14,9 +14,18 @@ Invoke jq with a filter on a set of json input files.
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",

View File

@ -13,9 +13,18 @@ def jq(name, srcs, filter = None, filter_file = None, args = [], out = None, **k
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",