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

load("//tools:defaults.bzl", "ivy_ng_module", "ng_rollup_bundle", "ts_library")
load("//tools/http-server:http_server.bzl", "http_server")

ivy_ng_module(
    name = "hello_world_i18n",
    srcs = ["index.ts"],
    tags = ["ivy-only"],
    deps = [
        "//packages/core",
    ],
)

ng_rollup_bundle(
    name = "bundle",
    # TODO(alexeagle): This is inconsistent.
    # We try to teach users to always have their workspace at the start of a
    # path, to disambiguate from other workspaces.
    # Here, the rule implementation is looking in an execroot where the layout
    # has an "external" directory for external dependencies.
    # This should probably start with "angular/" and let the rule deal with it.
    entry_point = "packages/core/test/bundling/hello_world_i18n/index.js",
    tags = ["ivy-only"],
    deps = [
        ":hello_world_i18n",
        "//packages/core",
    ],
)

http_server(
    name = "prodserver",
    data = [
        "index.html",
        ":bundle.min.js",
        ":bundle.min_debug.js",
    ],
    tags = ["ivy-only"],
)
