-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWORKSPACE.bazel
25 lines (19 loc) · 969 Bytes
/
WORKSPACE.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
workspace(
# How this workspace would be referenced with absolute labels from another workspace
name = "bazel-ts-monorepo",
# Map the @npm bazel workspace to the node_modules directory. This lets Bazel use the same node_modules as other local tooling.
managed_directories = {"@npm": ["node_modules"]},
)
load("//tools:bazel_deps.bzl", "fetch_build_bazel_rules_nodejs")
fetch_build_bazel_rules_nodejs()
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
build_bazel_rules_nodejs_dependencies()
# The yarn_install rule runs yarn anytime the package.json or yarn.lock file changes.
# It also extracts any Bazel rules distributed in an npm package.
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
yarn_install(
name = "npm", # Name this "npm" so that Bazel Label references look like @npm//package
package_json = "//:package.json",
quiet = False,
yarn_lock = "//:yarn.lock",
)