build: upgrade bazel rules to latest (#20768)
Add enough BUILD files to make it possible to `bazel build packages/core/test` Also re-format BUILD.bazel files with Buildifier. Add a CI lint check that they stay formatted. PR Close #20768
This commit is contained in:
18
packages/animations/browser/BUILD.bazel
Normal file
18
packages/animations/browser/BUILD.bazel
Normal file
@ -0,0 +1,18 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "browser",
|
||||
srcs = glob(
|
||||
[
|
||||
"*.ts",
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/animations/browser",
|
||||
tsconfig = "//packages:tsconfig",
|
||||
deps = [
|
||||
"//packages/animations",
|
||||
],
|
||||
)
|
17
packages/animations/browser/test/BUILD.bazel
Normal file
17
packages/animations/browser/test/BUILD.bazel
Normal file
@ -0,0 +1,17 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "test",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
tsconfig = "//packages:tsconfig",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/animations",
|
||||
"//packages/animations/browser",
|
||||
"//packages/animations/browser/testing",
|
||||
"//packages/core",
|
||||
],
|
||||
)
|
@ -53,13 +53,13 @@ export function main() {
|
||||
player.onStart(() => log.push('started'));
|
||||
player.onDone(() => log.push('done'));
|
||||
|
||||
player.triggerCallback('start');
|
||||
(player as any).triggerCallback('start');
|
||||
expect(log).toEqual(['started']);
|
||||
|
||||
player.play();
|
||||
expect(log).toEqual(['started']);
|
||||
|
||||
player.triggerCallback('done');
|
||||
(player as any).triggerCallback('done');
|
||||
expect(log).toEqual(['started', 'done']);
|
||||
|
||||
player.finish();
|
||||
|
15
packages/animations/browser/testing/BUILD.bazel
Normal file
15
packages/animations/browser/testing/BUILD.bazel
Normal file
@ -0,0 +1,15 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/animations/browser/testing",
|
||||
tsconfig = "//packages:tsconfig",
|
||||
deps = [
|
||||
"//packages/animations",
|
||||
"//packages/animations/browser",
|
||||
],
|
||||
)
|
Reference in New Issue
Block a user