-
-
Notifications
You must be signed in to change notification settings - Fork 167
Expand file tree
/
Copy pathBUILD.bazel
More file actions
33 lines (28 loc) · 947 Bytes
/
BUILD.bazel
File metadata and controls
33 lines (28 loc) · 947 Bytes
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
31
32
33
load("@aspect_rules_js//js:defs.bzl", "js_library", "js_test")
load("@npm//:defs.bzl", "npm_link_all_packages")
npm_link_all_packages()
js_test(
name = "stack_traces",
data = [
":library",
# Include the stack-traces library - this could be wrapped in a `js_test` macro
":stack-traces",
],
entry_point = "main.js",
node_options = [
# Load the stack-traces library at node startup time - this could be wrapped in a `js_test` macro
"--require",
"$$JS_BINARY__RUNFILES/$$JS_BINARY__WORKSPACE/examples/stack_traces/stacks.cjs",
],
)
js_library(
name = "library",
srcs = glob(["lib/**/*.js"]),
)
# Put the stacks.cjs in a `js_library` that can also declare any dependencies that
# the --require script may have such as the source-map-support package.
js_library(
name = "stack-traces",
srcs = ["stacks.cjs"],
deps = [":node_modules/source-map-support"],
)