forked from aspect-build/rules_js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
30 lines (25 loc) · 825 Bytes
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
load("//examples/macro:mocha.bzl", "mocha_test")
load("@aspect_bazel_lib//lib:docs.bzl", "stardoc_with_diff_test", "update_docs")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@npm//:defs.bzl", "npm_link_all_packages")
# 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",
],
)
stardoc_with_diff_test(
name = "mocha-docs",
bzl_library_target = ":mocha",
)
update_docs(name = "docs")