This produces a directory following the Angular Package layout spec. Includes integration test coverage by making a minimal ng_package in integration/bazel. Unit tests verify the content of the @angular/core and @angular/common packages. This doesn't totally match our current output, but is good enough to unblock some early adopters. It re-uses logic from the rollup_bundle rule in rules_nodejs. It should also eventually have the .pack and .publish secondary targets like npm_package rule. PR Close #22221
25 lines
541 B
Python
25 lines
541 B
Python
load("//packages/bazel:index.bzl", "ng_module")
|
|
|
|
ng_module(
|
|
name = "test_module",
|
|
srcs = glob(["*.ts"]),
|
|
entry_point = "index.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"],
|
|
)
|