forked from ngrx/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
81 lines (62 loc) · 2.63 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# The WORKSPACE file tells Bazel that this directory is a "workspace", which is like a project root.
# The content of this file specifies all the external dependencies Bazel needs to perform a build.
####################################
# ESModule imports (and TypeScript imports) can be absolute starting with the workspace name.
# The name of the workspace should match the npm package where we publish, so that these
# imports also make sense when referencing the published package.
workspace(name = "ngrx")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Rules for NodeJS
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "6bcef105e75cac3c5f8212e0d0431b6ec1aaa1963e093b0091474ab98ecf29d2",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.2.2/rules_nodejs-1.2.2.tar.gz"],
)
# Rules for web testing
http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "f1f4d2c2f88d2beac64c82499a1e762b037966675dd892da89c87e39d72b33f6",
urls = [
"https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.2/rules_webtesting.tar.gz",
],
)
# Rules for compiling sass
http_archive(
name = "io_bazel_rules_sass",
sha256 = "77e241148f26d5dbb98f96fe0029d8f221c6cb75edbb83e781e08ac7f5322c5f",
strip_prefix = "rules_sass-1.24.0",
urls = [
"https://github.com/bazelbuild/rules_sass/archive/1.24.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.24.0.zip",
],
)
####################################
# Load and install our dependencies downloaded above.
load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version", "yarn_install")
check_bazel_version(
message = "The minimum bazel version to use with this repo is 1.0.0",
minimum_bazel_version = "1.1.0",
)
yarn_install(
name = "npm",
data = ["//:angular-metadata.tsconfig.json"],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
# Install all bazel dependencies of the @ngdeps npm packages
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()
# Setup web testing
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
web_test_repositories()
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")
browser_repositories(
chromium = True,
firefox = True,
)
# Setup TypeScript Bazel workspace
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()
# Setup the Sass rule repositories
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
sass_repositories()