Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 1 | # 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. |
| 11 | workspace( |
| 12 | name = "project", |
| 13 | managed_directories = {"@npm": ["node_modules"]}, |
| 14 | ) |
| 15 | |
| 16 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 17 | |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 18 | RULES_NODEJS_VERSION = "3.0.0" |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 19 | |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 20 | RULES_NODEJS_SHA256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d" |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 21 | |
| 22 | http_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 Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 29 | RULES_SASS_VERSION = "1.30.0" |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 30 | |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 31 | RULES_SASS_SHA256 = "8392cf8910db2b1dc3b488ea18113bfe4fd666037bf8ec30d2a3f08fc602a6d8" |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 32 | |
| 33 | http_archive( |
| 34 | name = "io_bazel_rules_sass", |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 35 | patch_args = ["-p1"], |
| 36 | patches = ["@build_bazel_rules_nodejs//:rules_sass.issue127.patch"], |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 37 | 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 | |
| 48 | load( |
| 49 | "@build_bazel_rules_nodejs//:index.bzl", |
| 50 | "check_bazel_version", |
| 51 | "node_repositories", |
| 52 | "yarn_install", |
| 53 | ) |
| 54 | |
| 55 | check_bazel_version( |
| 56 | message = """ |
| 57 | You no longer need to install Bazel on your machine. |
| 58 | Your project should have a dependency on the @bazel/bazel package which supplies it. |
| 59 | Try 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. |
| 69 | node_repositories( |
| 70 | node_repositories = { |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 71 | "10.16.0-linux_arm64": ("node-v10.16.0-linux-arm64.tar.gz", "node-v10.16.0-linux-arm64", "2d84a777318bc95dd2a201ab8d700aea7e20641b3ece0c048399398dc645cbd7"), |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 72 | "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 | |
| 79 | yarn_install( |
| 80 | name = "npm", |
| 81 | package_json = "//:package.json", |
| 82 | yarn_lock = "//:yarn.lock", |
| 83 | ) |
| 84 | |
| 85 | load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") |
| 86 | |
| 87 | install_bazel_dependencies() |
| 88 | |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 89 | load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies") |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 90 | |
| 91 | npm_bazel_protractor_dependencies() |
| 92 | |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 93 | load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies") |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 94 | |
| 95 | npm_bazel_karma_dependencies() |
| 96 | |
| 97 | load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") |
| 98 | |
| 99 | web_test_repositories() |
| 100 | |
| 101 | load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories") |
| 102 | |
| 103 | browser_repositories( |
| 104 | firefox = True, |
| 105 | ) |
| 106 | |
Sean Condon | 0bd777c | 2021-01-01 14:23:29 +0000 | [diff] [blame^] | 107 | load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace") |
Sean Condon | 6a6f9a0 | 2020-01-09 14:09:36 +0000 | [diff] [blame] | 108 | |
| 109 | ts_setup_workspace() |
| 110 | |
| 111 | load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") |
| 112 | |
| 113 | sass_repositories() |