feat(bazel): ng_module produces bundle index (#22176)
It creates the bundle index .d.ts and .metadata.json files. The names are based on the ng_module target. PR Close #22176
This commit is contained in:

committed by
Victor Berchet

parent
bba65e0f41
commit
029dbf0e18
@ -0,0 +1,23 @@
|
||||
load("//packages/bazel:index.bzl", "ng_module")
|
||||
|
||||
ng_module(
|
||||
name = "test_module",
|
||||
srcs = glob(["*.ts"]),
|
||||
module_name = "some_npm_module",
|
||||
deps = ["//packages/core"],
|
||||
)
|
||||
|
||||
load(":extract_flat_module_index.bzl", "extract_flat_module_index")
|
||||
|
||||
extract_flat_module_index(
|
||||
name = "flat_module_index",
|
||||
deps = [":test_module"],
|
||||
)
|
||||
|
||||
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
||||
|
||||
jasmine_node_test(
|
||||
name = "test",
|
||||
srcs = ["spec.js"],
|
||||
data = [":flat_module_index"],
|
||||
)
|
Reference in New Issue
Block a user