forked from angular/tsickle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE
38 lines (29 loc) · 1.29 KB
/
WORKSPACE
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
34
35
36
37
38
workspace(
name = "tsickle",
managed_directories = {"@npm": ["node_modules"]},
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "3b0116a8a91a75678a57ba676c246ac0fa9c90dc3d46daef305b11b54ed4467e",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.33.1/rules_nodejs-0.33.1.tar.gz"],
)
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
# Force developers to use the same Bazel version as CircleCI, to prevent different
# local behavior than CI.
check_bazel_version("0.28.0")
# Run yarn install to create a node_modules tree for Bazel's use
# In a future release, this will install into the dev's node_modules folder
# but for now, you must also run yarn install locally for the editor to find
# things like @types files
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
# Install all Bazel dependencies needed for npm packages that supply Bazel rules
# In particular this installs the TypeScript rules
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()