build(bazel): use ng_package entry_point_name for umd bundles (#23132)

This change also requires updating the package gold test to work with
multiple test packages.

PR Close #23132
This commit is contained in:
Jeremy Elbourn
2018-04-02 16:52:13 -07:00
committed by Igor Minar
parent 628303d2cb
commit ae8a0092bd
5 changed files with 1153 additions and 119 deletions

View File

@ -166,7 +166,8 @@ def _ng_package_impl(ctx):
if entry_point:
# TODO jasonaden says there is no particular reason these filenames differ
umd_output_filename = "-".join([ctx.label.package.split("/")[-1]] + entry_point.split("/"))
prefix = primary_entry_point_name(ctx.attr.name, ctx.attr.entry_point, ctx.attr.entry_point_name)
umd_output_filename = "-".join([prefix] + entry_point.split("/"))
fesm_output_filename = entry_point.replace("/", "__")
fesm2015_output = ctx.actions.declare_file("fesm2015/%s.js" % fesm_output_filename)
fesm5_output = ctx.actions.declare_file("%s.js" % fesm_output_filename)