blob: ff934f595f58d7ebdf51247431369f4311689075 [file] [log] [blame]
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//examples/macro:mocha.bzl", "mocha_test")
# Link all direct dependencies in /examples/macro/package.json to
# bazel-bin/examples/macro/node_modules
npm_link_all_packages(name = "node_modules")
mocha_test(
name = "test",
srcs = ["test.js"],
)
bzl_library(
name = "mocha",
srcs = ["mocha.bzl"],
deps = [
"@aspect_bazel_lib//lib:copy_to_bin",
# this is a bzl_library target, exposing the package_json.bzl file we depend on
"@npm//examples/macro:mocha_bzl_library",
],
)
# TODO(derek): stardoc doesn't work under bzlmod with these
# targets when working against an overridden version of bazel-lib.
# Remove comments of the released version of bazel-lib succeeds.
#
# stardoc_with_diff_test(
# name = "mocha-docs",
# bzl_library_target = ":mocha",
# )
#
# update_docs(
# name = "docs",
# )