mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
113 lines
3.6 KiB
Python
113 lines
3.6 KiB
Python
workspace(
|
|
name = "angular_cli",
|
|
managed_directories = {"@npm": ["node_modules"]},
|
|
)
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
http_archive(
|
|
name = "bazel_skylib",
|
|
sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
|
|
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
|
|
],
|
|
)
|
|
|
|
http_archive(
|
|
name = "io_bazel_rules_webtesting",
|
|
sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a",
|
|
urls = ["https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz"],
|
|
)
|
|
|
|
http_archive(
|
|
name = "build_bazel_rules_nodejs",
|
|
sha256 = "94070eff79305be05b7699207fbac5d2608054dd53e6109f7d00d923919ff45a",
|
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.2/rules_nodejs-5.8.2.tar.gz"],
|
|
)
|
|
|
|
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
|
|
|
|
build_bazel_rules_nodejs_dependencies()
|
|
|
|
http_archive(
|
|
name = "rules_pkg",
|
|
sha256 = "8c20f74bca25d2d442b327ae26768c02cf3c99e93fad0381f32be9aab1967675",
|
|
urls = ["https://github.com/bazelbuild/rules_pkg/releases/download/0.8.1/rules_pkg-0.8.1.tar.gz"],
|
|
)
|
|
|
|
load("@bazel_tools//tools/sh:sh_configure.bzl", "sh_configure")
|
|
|
|
sh_configure()
|
|
|
|
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
|
|
|
bazel_skylib_workspace()
|
|
|
|
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
|
|
|
|
rules_pkg_dependencies()
|
|
|
|
# Setup the Node.js toolchain
|
|
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
|
|
|
|
nodejs_register_toolchains(
|
|
name = "node16",
|
|
node_version = "16.14.2",
|
|
)
|
|
|
|
nodejs_register_toolchains(
|
|
name = "node18",
|
|
node_version = "18.10.0",
|
|
)
|
|
|
|
# Set the default nodejs toolchain to the latest supported major version
|
|
nodejs_register_toolchains(
|
|
name = "nodejs",
|
|
node_version = "18.10.0",
|
|
)
|
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
|
|
|
|
yarn_install(
|
|
name = "npm",
|
|
data = [
|
|
"//:.yarn/releases/yarn-1.22.17.cjs",
|
|
"//:.yarnrc",
|
|
],
|
|
# Currently disabled due to:
|
|
# 1. Missing Windows support currently.
|
|
# 2. Incompatibilites with the `ts_library` rule.
|
|
exports_directories_only = False,
|
|
package_json = "//:package.json",
|
|
# We prefer to symlink the `node_modules` to only maintain a single install.
|
|
# See https://github.com/angular/dev-infra/pull/446#issuecomment-1059820287 for details.
|
|
symlink_node_modules = True,
|
|
yarn = "//:.yarn/releases/yarn-1.22.17.cjs",
|
|
yarn_lock = "//:yarn.lock",
|
|
)
|
|
|
|
http_archive(
|
|
name = "aspect_bazel_lib",
|
|
sha256 = "e3151d87910f69cf1fc88755392d7c878034a69d6499b287bcfc00b1cf9bb415",
|
|
strip_prefix = "bazel-lib-1.32.1",
|
|
url = "https://github.com/aspect-build/bazel-lib/archive/v1.32.1.tar.gz",
|
|
)
|
|
|
|
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_jq_toolchains")
|
|
|
|
aspect_bazel_lib_dependencies()
|
|
|
|
register_jq_toolchains(version = "1.6")
|
|
|
|
register_toolchains(
|
|
"@npm//@angular/build-tooling/bazel/git-toolchain:git_linux_toolchain",
|
|
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_x86_toolchain",
|
|
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_arm64_toolchain",
|
|
"@npm//@angular/build-tooling/bazel/git-toolchain:git_windows_toolchain",
|
|
)
|
|
|
|
load("@npm//@angular/build-tooling/bazel/browsers:browser_repositories.bzl", "browser_repositories")
|
|
|
|
browser_repositories()
|