blob: 44d301e17be17a87bb1c04c0e789c1f555cb8705 [file] [log] [blame]
Sean Condon6a6f9a02020-01-09 14:09:36 +00001# WARNING: This file is generated and it's not meant to be edited.
2# Before making any changes, please read Bazel documentation.
3# https://docs.bazel.build/versions/master/be/workspace.html
4# The WORKSPACE file tells Bazel that this directory is a "workspace", which is like a project root.
5# The content of this file specifies all the external dependencies Bazel needs to perform a build.
6
7####################################
8# ESModule imports (and TypeScript imports) can be absolute starting with the workspace name.
9# The name of the workspace should match the npm package where we publish, so that these
10# imports also make sense when referencing the published package.
11workspace(
12 name = "project",
13 managed_directories = {"@npm": ["node_modules"]},
14)
15
16load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17
Sean Condon0bd777c2021-01-01 14:23:29 +000018RULES_NODEJS_VERSION = "3.0.0"
Sean Condon6a6f9a02020-01-09 14:09:36 +000019
Sean Condon0bd777c2021-01-01 14:23:29 +000020RULES_NODEJS_SHA256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d"
Sean Condon6a6f9a02020-01-09 14:09:36 +000021
22http_archive(
23 name = "build_bazel_rules_nodejs",
24 sha256 = RULES_NODEJS_SHA256,
25 url = "https://github.com/bazelbuild/rules_nodejs/releases/download/%s/rules_nodejs-%s.tar.gz" % (RULES_NODEJS_VERSION, RULES_NODEJS_VERSION),
26)
27
28# Rules for compiling sass
Sean Condon0bd777c2021-01-01 14:23:29 +000029RULES_SASS_VERSION = "1.30.0"
Sean Condon6a6f9a02020-01-09 14:09:36 +000030
Sean Condon0bd777c2021-01-01 14:23:29 +000031RULES_SASS_SHA256 = "8392cf8910db2b1dc3b488ea18113bfe4fd666037bf8ec30d2a3f08fc602a6d8"
Sean Condon6a6f9a02020-01-09 14:09:36 +000032
33http_archive(
34 name = "io_bazel_rules_sass",
Sean Condon0bd777c2021-01-01 14:23:29 +000035 patch_args = ["-p1"],
36 patches = ["@build_bazel_rules_nodejs//:rules_sass.issue127.patch"],
Sean Condon6a6f9a02020-01-09 14:09:36 +000037 sha256 = RULES_SASS_SHA256,
38 strip_prefix = "rules_sass-%s" % RULES_SASS_VERSION,
39 urls = [
40 "https://github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
41 "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
42 ],
43)
44
45####################################
46# Load and install our dependencies downloaded above.
47
48load(
49 "@build_bazel_rules_nodejs//:index.bzl",
50 "check_bazel_version",
51 "node_repositories",
52 "yarn_install",
53)
54
55check_bazel_version(
56 message = """
57You no longer need to install Bazel on your machine.
58Your project should have a dependency on the @bazel/bazel package which supplies it.
59Try running `yarn bazel` instead.
60 (If you did run that, check that you've got a fresh `yarn install`)
61
62""",
63 minimum_bazel_version = "0.27.0",
64)
65
66# Setup the Node repositories. We need a NodeJS version that is more recent than v10.15.0
67# because "selenium-webdriver" which is required for "ng e2e" cannot be installed.
68# TODO: remove the custom repositories once "rules_nodejs" supports v10.16.0 by default.
69node_repositories(
70 node_repositories = {
Sean Condon0bd777c2021-01-01 14:23:29 +000071 "10.16.0-linux_arm64": ("node-v10.16.0-linux-arm64.tar.gz", "node-v10.16.0-linux-arm64", "2d84a777318bc95dd2a201ab8d700aea7e20641b3ece0c048399398dc645cbd7"),
Sean Condon6a6f9a02020-01-09 14:09:36 +000072 "10.16.0-darwin_amd64": ("node-v10.16.0-darwin-x64.tar.gz", "node-v10.16.0-darwin-x64", "6c009df1b724026d84ae9a838c5b382662e30f6c5563a0995532f2bece39fa9c"),
73 "10.16.0-linux_amd64": ("node-v10.16.0-linux-x64.tar.xz", "node-v10.16.0-linux-x64", "1827f5b99084740234de0c506f4dd2202a696ed60f76059696747c34339b9d48"),
74 "10.16.0-windows_amd64": ("node-v10.16.0-win-x64.zip", "node-v10.16.0-win-x64", "aa22cb357f0fb54ccbc06b19b60e37eefea5d7dd9940912675d3ed988bf9a059"),
75 },
76 node_version = "10.16.0",
77)
78
79yarn_install(
80 name = "npm",
81 package_json = "//:package.json",
82 yarn_lock = "//:yarn.lock",
83)
84
85load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
86
87install_bazel_dependencies()
88
Sean Condon0bd777c2021-01-01 14:23:29 +000089load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")
Sean Condon6a6f9a02020-01-09 14:09:36 +000090
91npm_bazel_protractor_dependencies()
92
Sean Condon0bd777c2021-01-01 14:23:29 +000093load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies")
Sean Condon6a6f9a02020-01-09 14:09:36 +000094
95npm_bazel_karma_dependencies()
96
97load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
98
99web_test_repositories()
100
101load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")
102
103browser_repositories(
104 firefox = True,
105)
106
Sean Condon0bd777c2021-01-01 14:23:29 +0000107load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")
Sean Condon6a6f9a02020-01-09 14:09:36 +0000108
109ts_setup_workspace()
110
111load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
112
113sass_repositories()