Skip to content

Commit 3eaa988

Browse files
alexeaglehansl
authored andcommitted
build: Update to latest bazel rules
1 parent fa72c56 commit 3eaa988

File tree

9 files changed

+27
-12
lines changed

9 files changed

+27
-12
lines changed

WORKSPACE

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
workspace(name = "angular_devkit")
22

3-
git_repository(
3+
http_archive(
44
name = "build_bazel_rules_nodejs",
5-
remote = "https://github.com/bazelbuild/rules_nodejs.git",
6-
tag = "0.3.1",
5+
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.4.1.zip",
6+
strip_prefix = "rules_nodejs-0.4.1",
7+
sha256 = "e9bc013417272b17f302dc169ad597f05561bb277451f010043f4da493417607",
78
)
89

910
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
1011

1112
check_bazel_version("0.9.0")
1213
node_repositories(package_json = ["//:package.json"])
1314

14-
git_repository(
15+
http_archive(
1516
name = "build_bazel_rules_typescript",
16-
remote = "https://github.com/bazelbuild/rules_typescript.git",
17-
tag = "0.7.1",
17+
url = "https://github.com/bazelbuild/rules_typescript/archive/0.10.1.zip",
18+
strip_prefix = "rules_typescript-0.10.1",
19+
sha256 = "a2c81776a4a492ff9f878f9705639f5647bef345f7f3e1da09c9eeb8dec80485",
1820
)
1921

20-
load("@build_bazel_rules_typescript//:setup.bzl", "ts_setup_workspace")
22+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
2123

22-
ts_setup_workspace(default_tsconfig = "@angular_devkit//:tsconfig.json")
24+
ts_setup_workspace()
2325

2426
# We get tools like Buildifier from here
2527
git_repository(

packages/angular_devkit/build_optimizer/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
licenses(["notice"]) # MIT
77

8-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
8+
load("//tools:defaults.bzl", "ts_library")
99

1010
package(default_visibility = ["//visibility:public"])
1111

packages/angular_devkit/core/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# found in the LICENSE file at https://angular.io/license
55
package(default_visibility = ["//visibility:public"])
66

7-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
7+
load("//tools:defaults.bzl", "ts_library")
88

99
licenses(["notice"]) # MIT License
1010

packages/angular_devkit/schematics/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# found in the LICENSE file at https://angular.io/license
55
package(default_visibility = ["//visibility:public"])
66

7-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
7+
load("//tools:defaults.bzl", "ts_library")
88

99
licenses(["notice"]) # MIT License
1010

packages/angular_devkit/schematics_cli/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# found in the LICENSE file at https://angular.io/license
55
package(default_visibility = ["//visibility:public"])
66

7-
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
7+
load("//tools:defaults.bzl", "ts_library")
88

99
licenses(["notice"]) # MIT License
1010

tools/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Marker file indicating this directory is a Bazel package
File renamed without changes.

tools/defaults.bzl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""Re-export of some bazel rules with repository-wide defaults."""
2+
load("@build_bazel_rules_typescript//:defs.bzl", _ts_library = "ts_library")
3+
4+
DEFAULT_TSCONFIG = "//:tsconfig.json"
5+
6+
def ts_library(tsconfig = None, **kwargs):
7+
if not tsconfig:
8+
tsconfig = DEFAULT_TSCONFIG
9+
_ts_library(tsconfig = tsconfig, **kwargs)

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"@angular-devkit/build_optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ]
4747
}
4848
},
49+
"bazelOptions": {
50+
"suppressTsconfigOverrideWarnings": true
51+
},
4952
"exclude": [
5053
"bazel-*/**/*",
5154
"dist/**/*",

0 commit comments

Comments
 (0)