|
1 | 1 | workspace(name = "angular_devkit")
|
2 | 2 |
|
3 |
| -BAZEL_SKYLIB_VERSION = "0.3.1" |
| 3 | +# We get Buildifier from here. |
4 | 4 | http_archive(
|
5 |
| - name = "bazel_skylib", |
6 |
| - url = "https://github.com/bazelbuild/bazel-skylib/archive/%s.zip" % BAZEL_SKYLIB_VERSION, |
7 |
| - strip_prefix = "bazel-skylib-%s" % BAZEL_SKYLIB_VERSION, |
8 |
| - sha256 = "95518adafc9a2b656667bbf517a952e54ce7f350779d0dd95133db4eb5c27fb1", |
9 |
| -) |
10 |
| - |
11 |
| -RULES_NODEJS_VERSION = "caae26b8cfc29838969e0614ebcb551a0e39ba26" |
12 |
| -http_archive( |
13 |
| - name = "build_bazel_rules_nodejs", |
14 |
| - url = "https://github.com/bazelbuild/rules_nodejs/archive/%s.zip" % RULES_NODEJS_VERSION, |
15 |
| - strip_prefix = "rules_nodejs-%s" % RULES_NODEJS_VERSION, |
16 |
| - sha256 = "8b6978d03f58e9ce8e3c0034afd879d621f9387f693f5a8e1888241b0538a61f", |
| 5 | + name = "com_github_bazelbuild_buildtools", |
| 6 | + url = "https://github.com/bazelbuild/buildtools/archive/0.15.0.zip", |
| 7 | + strip_prefix = "buildtools-0.15.0", |
| 8 | + sha256 = "76d1837a86fa6ef5b4a07438f8489f00bfa1b841e5643b618e01232ba884b1fe", |
17 | 9 | )
|
18 | 10 |
|
19 |
| -load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories") |
20 |
| - |
21 |
| -check_bazel_version("0.15.0") |
22 |
| - |
23 |
| -node_repositories(package_json = ["//:package.json"]) |
24 |
| - |
25 |
| -local_repository( |
26 |
| - name = "rxjs", |
27 |
| - path = "node_modules/rxjs/src", |
28 |
| -) |
| 11 | +load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies") |
| 12 | +buildifier_dependencies() |
29 | 13 |
|
30 |
| -RULES_WEBTESTING_VERSION = "0.2.1" |
| 14 | +# The Go toolchain is used for Buildifier. |
| 15 | +# rules_typescript_dependencies() also tries to load it but we add it explicitely so we |
| 16 | +# don't have hidden dependencies. |
| 17 | +# This also means we need to load it before rules_typescript_dependencies(). |
31 | 18 | http_archive(
|
32 |
| - name = "io_bazel_rules_webtesting", |
33 |
| - url = "https://github.com/bazelbuild/rules_webtesting/archive/%s.zip" % RULES_WEBTESTING_VERSION, |
34 |
| - strip_prefix = "rules_webtesting-%s" % RULES_WEBTESTING_VERSION, |
35 |
| - sha256 = "7d490aadff9b5262e5251fa69427ab2ffd1548422467cb9f9e1d110e2c36f0fa", |
| 19 | + name = "io_bazel_rules_go", |
| 20 | + url = "https://github.com/bazelbuild/rules_go/archive/0.14.0.zip", |
| 21 | + strip_prefix = "rules_go-0.14.0", |
| 22 | + sha256 = "9bd7c2743f014e4e112b671098ba1da6aec036fe07093b10ca39a9f81ec5cc33", |
36 | 23 | )
|
37 | 24 |
|
38 |
| -RULES_TYPESCRIPT_VERSION = "0.15.3" |
| 25 | +load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies") |
| 26 | +go_rules_dependencies() |
| 27 | +go_register_toolchains() |
| 28 | + |
| 29 | +# Load the TypeScript rules, its dependencies, and setup the workspace. |
39 | 30 | http_archive(
|
40 | 31 | name = "build_bazel_rules_typescript",
|
41 |
| - url = "https://github.com/bazelbuild/rules_typescript/archive/%s.zip" % RULES_TYPESCRIPT_VERSION, |
42 |
| - strip_prefix = "rules_typescript-%s" % RULES_TYPESCRIPT_VERSION, |
43 |
| - sha256 = "a2b26ac3fc13036011196063db1bf7f1eae81334449201dc28087ebfa3708c99", |
| 32 | + url = "https://github.com/bazelbuild/rules_typescript/archive/0.16.1.zip", |
| 33 | + strip_prefix = "rules_typescript-0.16.1", |
| 34 | + sha256 = "5b2b0bc63cfcffe7bf97cad2dad3b26a73362f806de66207051f66c87956a995", |
44 | 35 | )
|
45 | 36 |
|
46 |
| -load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") |
| 37 | +load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies") |
| 38 | +# build_bazel_rules_nodejs is loaded transitively through rules_typescript_dependencies. |
| 39 | +rules_typescript_dependencies() |
47 | 40 |
|
| 41 | +load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") |
48 | 42 | ts_setup_workspace()
|
49 | 43 |
|
50 |
| -# We get tools like Buildifier from here |
51 |
| -BAZEL_BUILDTOOLS_VERSION = "0.15.0" |
52 |
| -http_archive( |
53 |
| - name = "com_github_bazelbuild_buildtools", |
54 |
| - url = "https://github.com/bazelbuild/buildtools/archive/%s.zip" % BAZEL_BUILDTOOLS_VERSION, |
55 |
| - strip_prefix = "buildtools-%s" % BAZEL_BUILDTOOLS_VERSION, |
56 |
| - sha256 = "76d1837a86fa6ef5b4a07438f8489f00bfa1b841e5643b618e01232ba884b1fe", |
57 |
| -) |
| 44 | +# Load the nodejs dependencies, check minimum Bazel version, and define the local node_modules. |
| 45 | +load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies") |
| 46 | +rules_nodejs_dependencies() |
58 | 47 |
|
59 |
| -# The Go toolchain is used for Buildifier and some TypeScript tooling. |
60 |
| -# We need to use this commit to include Windows path fixes. |
61 |
| -RULES_GO_VERSION = "0.14.0" |
62 |
| -http_archive( |
63 |
| - name = "io_bazel_rules_go", |
64 |
| - url = "https://github.com/bazelbuild/rules_go/archive/%s.zip" % RULES_GO_VERSION, |
65 |
| - strip_prefix = "rules_go-%s" % RULES_GO_VERSION, |
66 |
| - sha256 = "9bd7c2743f014e4e112b671098ba1da6aec036fe07093b10ca39a9f81ec5cc33", |
67 |
| -) |
68 |
| - |
69 |
| -load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies") |
70 |
| - |
71 |
| -go_rules_dependencies() |
| 48 | +load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories") |
| 49 | +check_bazel_version("0.15.0") |
| 50 | +node_repositories(package_json = ["//:package.json"]) |
72 | 51 |
|
73 |
| -go_register_toolchains() |
| 52 | +local_repository( |
| 53 | + name = "rxjs", |
| 54 | + path = "node_modules/rxjs/src", |
| 55 | +) |
0 commit comments