2019-05-22 20:28:42 -04:00
|
|
|
workspace(
|
|
|
|
name = "angular",
|
|
|
|
managed_directories = {"@npm": ["node_modules"]},
|
|
|
|
)
|
2017-09-25 15:40:22 -04:00
|
|
|
|
2018-12-05 15:16:14 -05:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
2018-12-01 19:08:15 -05:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Fetch rules_nodejs so we can install our npm dependencies
|
|
|
|
http_archive(
|
|
|
|
name = "build_bazel_rules_nodejs",
|
2021-07-06 09:45:55 -04:00
|
|
|
sha256 = "5c40083120eadec50a3497084f99bc75a85400ea727e82e0b2f422720573130f",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0-beta.0/rules_nodejs-4.0.0-beta.0.tar.gz"],
|
2018-06-25 14:22:23 -04:00
|
|
|
)
|
|
|
|
|
2020-02-04 19:14:21 -05:00
|
|
|
# Check the rules_nodejs version and download npm dependencies
|
|
|
|
# Note: bazel (version 2 and after) will check the .bazelversion file so we don't need to
|
|
|
|
# assert on that.
|
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2020-06-25 04:32:41 -04:00
|
|
|
check_rules_nodejs_version(minimum_version_string = "2.2.0")
|
2019-02-20 12:54:42 -05:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Setup the Node.js toolchain
|
2018-05-11 02:35:21 -04:00
|
|
|
node_repositories(
|
2021-04-12 15:01:58 -04:00
|
|
|
node_version = "14.16.1",
|
2018-09-11 21:11:32 -04:00
|
|
|
package_json = ["//:package.json"],
|
2018-05-11 02:35:21 -04:00
|
|
|
)
|
2018-05-10 16:12:30 -04:00
|
|
|
|
2020-02-04 14:45:40 -05:00
|
|
|
load("//integration:angular_integration_test.bzl", "npm_package_archives")
|
|
|
|
|
2019-02-20 12:54:42 -05:00
|
|
|
yarn_install(
|
|
|
|
name = "npm",
|
2020-02-04 14:45:40 -05:00
|
|
|
manual_build_file_contents = npm_package_archives(),
|
2019-02-20 12:54:42 -05:00
|
|
|
package_json = "//:package.json",
|
2019-06-07 16:38:06 -04:00
|
|
|
yarn_lock = "//:yarn.lock",
|
2019-02-20 12:54:42 -05:00
|
|
|
)
|
2019-02-04 18:53:32 -05:00
|
|
|
|
2019-07-24 11:52:26 -04:00
|
|
|
# Load protractor dependencies
|
2020-06-25 04:32:41 -04:00
|
|
|
load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")
|
2019-07-24 11:52:26 -04:00
|
|
|
|
|
|
|
npm_bazel_protractor_dependencies()
|
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Setup the rules_webtesting toolchain
|
2019-02-13 12:33:48 -05:00
|
|
|
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
|
2018-05-10 16:12:30 -04:00
|
|
|
|
|
|
|
web_test_repositories()
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2021-05-24 10:17:27 -04:00
|
|
|
load("//dev-infra/bazel/browsers:browser_repositories.bzl", "browser_repositories")
|
2019-02-13 12:33:48 -05:00
|
|
|
|
2019-11-01 14:17:10 -04:00
|
|
|
browser_repositories()
|