angular-docs-cn/packages/zone.js/dist/BUILD.bazel

63 lines
1.5 KiB
Python

load("//packages/zone.js:bundles.bzl", "ES2015_BUNDLES", "ES5_BUNDLES", "ES5_GLOBAL_BUNDLES")
load("//packages/zone.js/dist:tools.bzl", "generate_dist", "zone_rollup_bundle")
package(default_visibility = ["//visibility:public"])
# copy this file from //lib to //dist
genrule(
name = "zone_externs",
srcs = ["//packages/zone.js/lib:closure/zone_externs.js"],
outs = ["zone_externs.js"],
cmd = "cp $< $@",
)
genrule(
name = "zone_js_d_ts",
srcs = ["//packages/zone.js/lib:zone_d_ts"],
outs = ["zone.js.d.ts"],
cmd = "cp $< $@",
)
genrule(
name = "zone_extensions_d_ts",
srcs = ["//packages/zone.js/lib:zone.api.extensions.ts"],
outs = ["zone.api.extensions.ts"],
cmd = "cp $< $@",
)
genrule(
name = "zone_configurations_d_ts",
srcs = ["//packages/zone.js/lib:zone.configurations.api.ts"],
outs = ["zone.configurations.api.ts"],
cmd = "cp $< $@",
)
filegroup(
name = "zone_d_ts",
srcs = [
":zone_configurations_d_ts",
":zone_extensions_d_ts",
":zone_js_d_ts",
],
)
zone_rollup_bundle(
bundles = ES5_BUNDLES.items(),
config_file = "//packages/zone.js:rollup-es5.config.js",
)
zone_rollup_bundle(
bundles = ES5_GLOBAL_BUNDLES.items() + ES2015_BUNDLES.items(),
config_file = "//packages/zone.js:rollup-es5_global-es2015.config.js",
)
generate_dist(
bundles = ES5_BUNDLES.items() + ES5_GLOBAL_BUNDLES.items(),
module = "es5",
)
generate_dist(
bundles = ES2015_BUNDLES.items(),
module = "",
)