2021-11-07 18:57:52 -05:00
|
|
|
"""Helper macros for compiling typescript with consistent config"""
|
|
|
|
|
|
2021-12-16 02:00:43 -05:00
|
|
|
load("//tools:defaults.bzl", _ts_library = "ts_library")
|
2021-11-07 18:57:52 -05:00
|
|
|
|
2021-12-16 02:00:43 -05:00
|
|
|
def ts_library(name, tsconfig = "//devtools:tsconfig.json", **kwargs):
|
|
|
|
|
_ts_library(
|
2021-11-07 18:57:52 -05:00
|
|
|
name = name,
|
|
|
|
|
tsconfig = tsconfig,
|
|
|
|
|
**kwargs
|
|
|
|
|
)
|
|
|
|
|
|
2021-12-16 02:00:43 -05:00
|
|
|
def ts_test_library(name, tsconfig = "//devtools:tsconfig.json", deps = [], **kwargs):
|
|
|
|
|
_ts_library(
|
2021-11-07 18:57:52 -05:00
|
|
|
name = name,
|
2021-12-16 02:00:43 -05:00
|
|
|
tsconfig = tsconfig,
|
2021-11-07 18:57:52 -05:00
|
|
|
testonly = 1,
|
2021-12-16 02:00:43 -05:00
|
|
|
deps = deps,
|
2021-11-07 18:57:52 -05:00
|
|
|
**kwargs
|
|
|
|
|
)
|