Files
Alan Agius b153459aaf build: update event dispatch contract to be outputted in IIFE (#55377)
This script is intended to be inlined in the HTML and thus IIFE should be preffered.

PR Close #55377
2024-04-22 11:35:48 -07:00

46 lines
979 B
Python

load("//tools:defaults.bzl", "ts_library", "tsec_test")
load("@npm//@bazel/rollup:index.bzl", "rollup_bundle")
load("@npm//@bazel/terser:index.bzl", "terser_minified")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "event-dispatch",
srcs = glob(
[
"**/*.ts",
],
),
module_name = "@angular/core/primitives/event-dispatch",
)
tsec_test(
name = "tsec_test",
target = "event-dispatch",
tsconfig = "//packages:tsec_config",
)
filegroup(
name = "files_for_docgen",
srcs = glob([
"*.ts",
"src/**/*.ts",
]),
visibility = ["//visibility:public"],
)
rollup_bundle(
name = "contract_bundle",
args = ["--no-sourcemap"],
entry_point = ":contract_binary.ts",
format = "iife",
deps = [":event-dispatch"],
)
terser_minified(
name = "contract_bundle_min",
src = ":contract_bundle",
config_file = ":terser.config.json",
sourcemap = False,
)