mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
b153459aaf
This script is intended to be inlined in the HTML and thus IIFE should be preffered. PR Close #55377
46 lines
979 B
Python
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,
|
|
)
|