2025-07-02 20:36:19 +00:00
|
|
|
load(
|
|
|
|
|
"//tools:defaults2.bzl",
|
|
|
|
|
_ng_project = "ng_project",
|
|
|
|
|
_ng_web_test_suite = "ng_web_test_suite",
|
|
|
|
|
_ts_project = "ts_project",
|
|
|
|
|
)
|
2025-05-14 15:43:30 +00:00
|
|
|
|
2025-07-01 20:04:04 +00:00
|
|
|
def ts_project(name, tsconfig = None, testonly = False, enable_runtime_rnjs_interop = False, **kwargs):
|
2025-05-14 15:43:30 +00:00
|
|
|
if tsconfig == None:
|
|
|
|
|
if native.package_name().startswith("adev/shared-docs"):
|
|
|
|
|
tsconfig = "//adev/shared-docs:tsconfig_test" if testonly else "//adev/shared-docs:tsconfig_build"
|
|
|
|
|
|
|
|
|
|
_ts_project(
|
|
|
|
|
name = name,
|
2025-07-01 20:04:04 +00:00
|
|
|
enable_runtime_rnjs_interop = enable_runtime_rnjs_interop,
|
2025-05-14 15:43:30 +00:00
|
|
|
tsconfig = tsconfig,
|
|
|
|
|
testonly = testonly,
|
|
|
|
|
**kwargs
|
|
|
|
|
)
|
|
|
|
|
|
2025-07-01 20:04:04 +00:00
|
|
|
def ng_project(name, tsconfig = None, testonly = False, enable_runtime_rnjs_interop = False, **kwargs):
|
2025-05-14 15:43:30 +00:00
|
|
|
if tsconfig == None:
|
|
|
|
|
if native.package_name().startswith("adev/shared-docs"):
|
|
|
|
|
tsconfig = "//adev/shared-docs:tsconfig_test" if testonly else "//adev/shared-docs:tsconfig_build"
|
|
|
|
|
|
|
|
|
|
_ng_project(
|
|
|
|
|
name = name,
|
2025-07-01 20:04:04 +00:00
|
|
|
enable_runtime_rnjs_interop = enable_runtime_rnjs_interop,
|
2025-05-14 15:43:30 +00:00
|
|
|
tsconfig = tsconfig,
|
|
|
|
|
testonly = testonly,
|
|
|
|
|
**kwargs
|
|
|
|
|
)
|
2025-07-02 20:36:19 +00:00
|
|
|
|
|
|
|
|
def ng_web_test_suite(deps = [], **kwargs):
|
|
|
|
|
# Provide required modules for the imports in //tools/testing/browser_tests.init.mts
|
|
|
|
|
deps = deps + [
|
|
|
|
|
"//:node_modules/@angular/compiler",
|
|
|
|
|
"//:node_modules/@angular/core",
|
|
|
|
|
"//:node_modules/@angular/platform-browser",
|
|
|
|
|
]
|
|
|
|
|
_ng_web_test_suite(
|
|
|
|
|
deps = deps,
|
|
|
|
|
tsconfig = "//adev/shared-docs:tsconfig_test",
|
|
|
|
|
**kwargs
|
|
|
|
|
)
|