2017-08-22 16:56:29 -07:00
|
|
|
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
|
|
|
|
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
2017-07-21 14:20:34 -07:00
|
|
|
|
2018-03-07 09:04:27 -08:00
|
|
|
filegroup(
|
|
|
|
name = "package_assets",
|
|
|
|
srcs = glob(["*"]),
|
|
|
|
visibility = ["//packages/bazel:__subpackages__"],
|
|
|
|
)
|
|
|
|
|
2017-07-21 14:20:34 -07:00
|
|
|
ts_library(
|
|
|
|
name = "ngc_lib",
|
2017-09-27 07:38:36 -07:00
|
|
|
srcs = [
|
|
|
|
"extract_i18n.ts",
|
2017-12-06 06:56:49 -08:00
|
|
|
"index.ts",
|
2017-09-27 07:38:36 -07:00
|
|
|
],
|
2017-10-13 09:03:28 -07:00
|
|
|
module_name = "@angular/bazel",
|
2017-12-06 06:56:49 -08:00
|
|
|
tsconfig = ":tsconfig.json",
|
2017-12-19 15:03:29 -08:00
|
|
|
visibility = ["//packages/bazel/test/ngc-wrapped:__subpackages__"],
|
2017-07-21 14:20:34 -07:00
|
|
|
deps = [
|
2017-08-21 08:23:47 -07:00
|
|
|
# BEGIN-INTERNAL
|
2018-02-13 08:19:33 -08:00
|
|
|
# Only needed when compiling within the Angular repo.
|
|
|
|
# Users will get this dependency from node_modules.
|
2017-12-19 15:03:29 -08:00
|
|
|
"//packages/compiler-cli",
|
2017-08-21 08:23:47 -07:00
|
|
|
# END-INTERNAL
|
2018-03-02 10:10:59 -08:00
|
|
|
"@build_bazel_rules_typescript//internal:tsc_wrapped",
|
2017-07-21 14:20:34 -07:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
nodejs_binary(
|
|
|
|
name = "ngc-wrapped",
|
2017-08-29 22:09:55 -07:00
|
|
|
data = [
|
|
|
|
":ngc_lib",
|
2018-07-27 11:32:51 -07:00
|
|
|
"@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
|
2017-08-29 22:09:55 -07:00
|
|
|
],
|
2017-12-19 15:03:29 -08:00
|
|
|
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js",
|
2018-09-11 18:11:32 -07:00
|
|
|
node_modules = "@//:node_modules",
|
2017-07-21 14:20:34 -07:00
|
|
|
visibility = ["//visibility:public"],
|
2017-09-27 07:38:36 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
nodejs_binary(
|
|
|
|
name = "xi18n",
|
|
|
|
data = [
|
|
|
|
":ngc_lib",
|
|
|
|
],
|
2017-12-19 15:03:29 -08:00
|
|
|
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js/extract_i18n.js",
|
2018-09-11 18:11:32 -07:00
|
|
|
node_modules = "@//:node_modules",
|
2017-09-27 07:38:36 -07:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|