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
30 lines
644 B
Python
30 lines
644 B
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
|
|
|
ng_module(
|
|
name = "core",
|
|
srcs = glob(
|
|
[
|
|
"*.ts",
|
|
"src/**/*.ts",
|
|
],
|
|
),
|
|
module_name = "@angular/core",
|
|
deps = [
|
|
"//packages:types",
|
|
"@rxjs",
|
|
],
|
|
)
|
|
|
|
ng_package(
|
|
name = "npm_package",
|
|
srcs = glob(["**/*.externs.js"] + ["**/package.json"]) + ["//packages/core/testing:npm_package_assets"],
|
|
entry_point = "packages/core/index.js",
|
|
secondary_entry_points = ["testing"],
|
|
deps = [
|
|
":core",
|
|
"//packages/core/testing",
|
|
],
|
|
)
|