1 # Copyright 2019 The Pigweed Authors
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 # use this file except in compliance with the License. You may obtain a copy of
7 # https://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations under
17 managed_directories = {"@npm": ["node_modules"]},
20 # Set up build_bazel_rules_nodejs
21 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
23 name = "build_bazel_rules_nodejs",
24 sha256 = "4952ef879704ab4ad6729a29007e7094aef213ea79e9f2e94cbe1c9a753e63ef",
25 urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.0/rules_nodejs-2.2.0.tar.gz"],
27 # Get the latest LTS version of Node
28 load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
29 node_repositories(package_json = ["//:package.json"])
31 # Install packages with yarn
32 load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
35 package_json = "//:package.json",
36 yarn_lock = "//:yarn.lock",
40 load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies")
41 npm_bazel_karma_dependencies()
43 load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
44 web_test_repositories()
46 load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")