workspace( name = "angular", managed_directories = {"@npm": ["node_modules"]}, ) load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Fetch rules_nodejs so we can install our npm dependencies http_archive( name = "build_bazel_rules_nodejs", 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"], ) # 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") check_rules_nodejs_version(minimum_version_string = "2.2.0") # Setup the Node.js toolchain node_repositories( node_version = "14.16.1", package_json = ["//:package.json"], ) load("//integration:angular_integration_test.bzl", "npm_package_archives") yarn_install( name = "npm", manual_build_file_contents = npm_package_archives(), package_json = "//:package.json", yarn_lock = "//:yarn.lock", ) # Load protractor dependencies load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies") npm_bazel_protractor_dependencies() # Setup the rules_webtesting toolchain load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") web_test_repositories() load("//dev-infra/bazel/browsers:browser_repositories.bzl", "browser_repositories") browser_repositories()