package(default_visibility = ["//visibility:public"])

filegroup(
    name = "package_assets",
    srcs = glob(["*"]),
    visibility = ["//packages/bazel:__subpackages__"],
)

load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")

exports_files(["rollup.config.js"])

ts_library(
    name = "lib",
    srcs = glob(["*.ts"]),
    node_modules = "@angular_packager_deps//:node_modules",
    tsconfig = ":tsconfig.json",
)

nodejs_binary(
    name = "packager",
    data = ["lib"],
    entry_point = "angular/packages/bazel/src/ng_package/packager.js",
    node_modules = "@angular_packager_deps//:node_modules",
)
