2019-12-28 19:37:59 -05:00
|
|
|
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
|
2017-12-16 23:08:49 -05:00
|
|
|
|
2019-01-16 04:19:01 -05:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2017-12-16 23:08:49 -05:00
|
|
|
ts_library(
|
|
|
|
name = "locales",
|
|
|
|
srcs = glob(
|
|
|
|
["**/*.ts"],
|
|
|
|
exclude = ["closure-locale.ts"],
|
|
|
|
),
|
|
|
|
)
|
2018-04-03 17:10:21 -04:00
|
|
|
|
2019-12-28 19:37:59 -05:00
|
|
|
pkg_npm(
|
2018-04-03 17:10:21 -04:00
|
|
|
name = "package",
|
2019-10-31 13:29:41 -04:00
|
|
|
srcs = glob(["global/*.js"]) + ["package.json"],
|
2019-12-28 19:37:59 -05:00
|
|
|
substitutions = {
|
2019-01-16 04:19:01 -05:00
|
|
|
# Workaround for `.d.ts`` containing `/// <amd-module .../>`
|
|
|
|
# which are generated in TypeScript v2.9, but not before.
|
|
|
|
"/// <amd-module name=.*/>": "",
|
2018-04-09 10:17:29 -04:00
|
|
|
# Workaround for https://github.com/angular/angular/issues/23217
|
|
|
|
# Webpack will detect that the UMD outputs from TypeScript pass the
|
|
|
|
# `require` function into the module, and cannot accurately track
|
|
|
|
# dependencies in case require was called.
|
|
|
|
# We don't actually import anything in the locale code so we can
|
|
|
|
# null out the require reference passed into the module.
|
2021-01-26 11:57:44 -05:00
|
|
|
"factory\\(require, exports\\)": "factory(null, exports)",
|
2018-04-09 10:17:29 -04:00
|
|
|
},
|
2018-04-03 17:10:21 -04:00
|
|
|
deps = [":locales"],
|
|
|
|
)
|