@@ -5,42 +5,20 @@ http_archive(
5
5
name = "build_bazel_rules_nodejs" ,
6
6
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.15.3.zip" ,
7
7
strip_prefix = "rules_nodejs-0.15.3" ,
8
- sha256 = "05afbbc13b0b7d5056e412d66c98853978bd46a94bc8e7b71c7fba4349b77eef" ,
9
8
)
10
9
11
10
# Add TypeScript rules
12
11
http_archive (
13
12
name = "build_bazel_rules_typescript" ,
14
- url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip" ,
15
- strip_prefix = "rules_typescript-0.20.3" ,
16
- sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3" ,
13
+ url = "https://github.com/bazelbuild/rules_typescript/archive/8ea1a55cf5cf8be84ddfeefc0940769b80da792f.zip" ,
14
+ strip_prefix = "rules_typescript-8ea1a55cf5cf8be84ddfeefc0940769b80da792f" ,
17
15
)
18
16
19
- # Fetch transient dependencies of the TypeScript bazel rules.
20
- load ("@build_bazel_rules_typescript//:package.bzl" , "rules_typescript_dependencies" )
21
- rules_typescript_dependencies ()
22
-
23
- # Add sass rules
24
- http_archive (
25
- name = "io_bazel_rules_sass" ,
26
- url = "https://github.com/bazelbuild/rules_sass/archive/1.14.1.zip" ,
27
- strip_prefix = "rules_sass-1.14.1" ,
28
- sha256 = "d8b89e47b05092a6eed3fa199f2de7cf671a4b9165d0bf38f12a0363dda928d3" ,
29
- )
30
-
31
- load ("@io_bazel_rules_sass//sass:sass_repositories.bzl" , "sass_repositories" )
32
- sass_repositories ()
33
-
34
17
# Add Angular source and Bazel rules.
35
18
http_archive (
36
19
name = "angular" ,
37
- # Locked to commit "07b89902d5178afefeedeb18d316f4a1c77c6025" that has been merged after v7.0.0
38
- # has been released. This explicitly used version of angular/angular includes the latest changes
39
- # to @angular/bazel that have been merged from the `bazel` branch into `master.`
40
- # TODO(devversion): start using release archives once 7.0.1 is available w/ the Bazel changes.
41
- url = "https://github.com/angular/angular/archive/07b89902d5178afefeedeb18d316f4a1c77c6025.zip" ,
42
- strip_prefix = "angular-07b89902d5178afefeedeb18d316f4a1c77c6025" ,
43
- sha256 = "6439dcd01afa5ef3456f9f454ba546a385f7fc56bbc8b6e4ec990dbd9773ba8f" ,
20
+ url = "https://github.com/angular/angular/archive/7.0.1.zip" ,
21
+ strip_prefix = "angular-7.0.1" ,
44
22
)
45
23
46
24
# Add RxJS as repository because those are needed in order to build Angular from source.
@@ -53,10 +31,40 @@ http_archive(
53
31
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403" ,
54
32
)
55
33
34
+ # Add sass rules
35
+ http_archive (
36
+ name = "io_bazel_rules_sass" ,
37
+ url = "https://github.com/bazelbuild/rules_sass/archive/1.14.1.zip" ,
38
+ strip_prefix = "rules_sass-1.14.1" ,
39
+ )
40
+
41
+ # Since we are explitly fetching @build_bazel_rules_typescript, we should explicly
42
+ # ask for its transitive deps from the version we fetched since
43
+ # rules_angular_dependencies() will load transitive deps for the version
44
+ # it would fetch transitively
45
+ load ("@build_bazel_rules_typescript//:package.bzl" , "rules_typescript_dependencies" )
46
+ rules_typescript_dependencies ()
47
+
48
+ # Since we are explitly fetching @build_bazel_rules_nodejs, we should explicly
49
+ # ask for its transitive deps from the version we fetched since
50
+ # rules_angular_dependencies() will load transitive deps for the version
51
+ # it would fetch transitively
52
+ load ("@build_bazel_rules_nodejs//:package.bzl" , "rules_nodejs_dependencies" )
53
+ rules_nodejs_dependencies ()
54
+
55
+ # Fetch @angular repo transitive deps that are not already fetched above
56
+ load ("@angular//packages/bazel:package.bzl" , "rules_angular_dependencies" )
57
+ rules_angular_dependencies ()
58
+
59
+ load ("@io_bazel_rules_sass//sass:sass_repositories.bzl" , "sass_repositories" )
60
+ sass_repositories ()
61
+
56
62
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
57
63
# your npm dependencies. You must still run the package manager.
58
- load ("@build_bazel_rules_nodejs//:defs.bzl" , "node_repositories" , "yarn_install" )
64
+ load ("@build_bazel_rules_nodejs//:defs.bzl" , "check_bazel_version" , " node_repositories" , "yarn_install" )
59
65
66
+ # The minimum bazel version to use with this repo is 0.18.0
67
+ check_bazel_version ("0.18.0" )
60
68
node_repositories (
61
69
# For deterministic builds, specify explicit NodeJS and Yarn versions. Keep the Yarn version
62
70
# in sync with the version of Travis.
@@ -76,10 +84,6 @@ yarn_install(
76
84
load ("@build_bazel_rules_typescript//:defs.bzl" , "ts_setup_workspace" )
77
85
ts_setup_workspace ()
78
86
79
- # Setup Angular bazel rules
80
- load ("@angular//packages/bazel:package.bzl" , "rules_angular_dependencies" )
81
- rules_angular_dependencies ()
82
-
83
87
# Setup Angular workspace for building (Bazel managed node modules)
84
88
load ("@angular//:index.bzl" , "ng_setup_workspace" )
85
89
ng_setup_workspace ()
@@ -91,8 +95,7 @@ go_register_toolchains()
91
95
92
96
# Setup web testing. We need to setup a browser because the web testing rules for TypeScript need
93
97
# a reference to a registered browser (ideally that's a hermetic version of a browser)
94
- load ("@io_bazel_rules_webtesting//web:repositories.bzl" , "browser_repositories" ,
95
- "web_test_repositories" )
98
+ load ("@io_bazel_rules_webtesting//web:repositories.bzl" , "browser_repositories" , "web_test_repositories" )
96
99
97
100
web_test_repositories ()
98
101
browser_repositories (
0 commit comments