build: convert entry_point to label (#30627)

PR Close #30627
This commit is contained in:
Alex Eagle 2019-06-07 13:38:06 -07:00 committed by Igor Minar
parent a794143820
commit ef0b2cc74d
56 changed files with 108 additions and 3786 deletions

View File

@ -72,13 +72,13 @@ yarn_install(
"//:tools/yarn/check-yarn.js", "//:tools/yarn/check-yarn.js",
], ],
package_json = "//:package.json", package_json = "//:package.json",
yarn_lock = "//:yarn.lock", # Don't install devDependencies, they are large and not used under Bazel
prod_only = True,
# Temporarily disable node_modules symlinking until the fix for # Temporarily disable node_modules symlinking until the fix for
# https://github.com/bazelbuild/bazel/issues/8487 makes it into a # https://github.com/bazelbuild/bazel/issues/8487 makes it into a
# future Bazel release # future Bazel release
symlink_node_modules = False, symlink_node_modules = False,
# Don't install devDependencies, they are large and not used under Bazel yarn_lock = "//:yarn.lock",
prod_only = True,
) )
# Install all bazel dependencies of the @npm npm packages # Install all bazel dependencies of the @npm npm packages

View File

@ -13,11 +13,11 @@ http_archive(
) )
# Fetch sass rules for compiling sass files # Fetch sass rules for compiling sass files
# TODO: change back to upstream release after https://github.com/bazelbuild/rules_sass/pull/87 merged and released
http_archive( http_archive(
name = "io_bazel_rules_sass", name = "io_bazel_rules_sass",
sha256 = "4c87befcb17282b039ba8341df9a6cc45f461bf05776dcf35c7e40c7e79ce374", strip_prefix = "rules_sass-9862dfc96a4a1f66fe171ef5e043b29853e8445b",
strip_prefix = "rules_sass-3a4f31c74513ccfacce3f955b5c006352f7e9587", url = "https://github.com/manekinekko/rules_sass/archive/9862dfc96a4a1f66fe171ef5e043b29853e8445b.zip",
url = "https://github.com/bazelbuild/rules_sass/archive/3a4f31c74513ccfacce3f955b5c006352f7e9587.zip",
) )
# Check the bazel version and download npm dependencies # Check the bazel version and download npm dependencies

View File

@ -47,7 +47,7 @@ ts_devserver(
rollup_bundle( rollup_bundle(
name = "bundle", name = "bundle",
entry_point = "src/main", entry_point = ":main.ts",
deps = [ deps = [
"//src", "//src",
# TODO(kyliau): These are not necessary. Bundle compiles fine without # TODO(kyliau): These are not necessary. Bundle compiles fine without

View File

@ -25,7 +25,7 @@ ng_module(
ng_package( ng_package(
name = "npm_package", name = "npm_package",
entry_point = "src/hello-world/index.js", entry_point = ":index.ts",
deps = [":hello-world"], deps = [":hello-world"],
) )

File diff suppressed because it is too large Load Diff

View File

@ -30,12 +30,12 @@
rxjs "6.4.0" rxjs "6.4.0"
"@angular/animations@file:../../dist/packages-dist/animations": "@angular/animations@file:../../dist/packages-dist/animations":
version "8.0.0-rc.0" version "8.1.0-beta.0"
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@angular/bazel@file:../../dist/packages-dist/bazel": "@angular/bazel@file:../../dist/packages-dist/bazel":
version "8.0.0-rc.0" version "0.0.0"
dependencies: dependencies:
"@angular-devkit/architect" "^0.800.0-beta.15" "@angular-devkit/architect" "^0.800.0-beta.15"
"@angular-devkit/core" "^8.0.0-beta.15" "@angular-devkit/core" "^8.0.0-beta.15"
@ -48,12 +48,12 @@
tsickle "^0.35.0" tsickle "^0.35.0"
"@angular/common@file:../../dist/packages-dist/common": "@angular/common@file:../../dist/packages-dist/common":
version "8.0.0-rc.0" version "8.1.0-beta.0"
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli": "@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli":
version "8.0.0-rc.0" version "0.0.0"
dependencies: dependencies:
canonical-path "1.0.0" canonical-path "1.0.0"
chokidar "^2.1.1" chokidar "^2.1.1"
@ -68,51 +68,51 @@
yargs "13.1.0" yargs "13.1.0"
"@angular/compiler@file:../../dist/packages-dist/compiler": "@angular/compiler@file:../../dist/packages-dist/compiler":
version "8.0.0-rc.0" version "8.1.0-beta.0"
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@angular/core@file:../../dist/packages-dist/core": "@angular/core@file:../../dist/packages-dist/core":
version "8.0.0-rc.0" version "8.1.0-beta.0"
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic": "@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic":
version "8.0.0-rc.0" version "8.1.0-beta.0"
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@angular/platform-browser@file:../../dist/packages-dist/platform-browser": "@angular/platform-browser@file:../../dist/packages-dist/platform-browser":
version "8.0.0-rc.0" version "8.1.0-beta.0"
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@angular/router@file:../../dist/packages-dist/router": "@angular/router@file:../../dist/packages-dist/router":
version "8.0.0-rc.0" version "8.1.0-beta.0"
dependencies: dependencies:
tslib "^1.9.0" tslib "^1.9.0"
"@bazel/bazel-darwin_x64@0.26.0-rc13": "@bazel/bazel-darwin_x64@0.26.0":
version "0.26.0-rc13" version "0.26.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.26.0-rc13.tgz#b580f470e2e221a3dd0e449c2b652ebfda661644" resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.26.0.tgz#24660853a01e286359636025618a1fda1aa978e1"
integrity sha512-I1TvJuD49UtiE8yt8vRcejvG/ISX09MdFTXRIhHKnB+soRZF2zbUtqs0H4ugMK2fzb80T/QK3QmXbjSfcZbx2w== integrity sha512-9qcRlTW9g8TPJ1PWYIkNDUMsEjdhN4sJz5fDjva3GM7mnIST0sgJiRRW5Y9L3Ksv9+jNWmIOlj5wsibAUYyb5w==
"@bazel/bazel-linux_x64@0.26.0-rc13": "@bazel/bazel-linux_x64@0.26.0":
version "0.26.0-rc13" version "0.26.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.26.0-rc13.tgz#2b794b23b8954fe08b3c5f8a8b50c69e26ac08aa" resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.26.0.tgz#9302b6df4363b5c492f2755174988935b84fb076"
integrity sha512-VIyJMR18ItGZFwMSRxYU+5bTohsn45yfrpjFdVP+aVcIl2c4KuPAyM4dTKwjGUUeDDGUDMb809PjyTgsRe5x3w== integrity sha512-v9RTFIZb/A8Ej0Q1uCc/uTCRFZIRGqQpBVLO9Vqkbg4kScND9FxAI2RO0bv3Zhz7YTXBvJ8+kSfd/DY+0azwsA==
"@bazel/bazel-win32_x64@0.26.0-rc13": "@bazel/bazel-win32_x64@0.26.0":
version "0.26.0-rc13" version "0.26.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.26.0-rc13.tgz#fe862c700c35a41d43ee3223f8dbe5f735395e68" resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.26.0.tgz#ae878cf2aae0ad9799141e554c47417f426c1aa7"
integrity sha512-8nAntbZTFp9xv504L5u4aLMKgkq2rhgqW+fJwcNmVz9Wg3cKVMxl+G49cYzImGxqrv9MFLe3lD1ldBYdoEvNqg== integrity sha512-hmhuWQUzTmVLDusSt701LFzkWoRdEsakDtEGKgIuQuAJ7zqwH8QUn3PpWIg5BA0qF0gxJBKMfTHGvNhMft3pmg==
"@bazel/bazel@file:../../node_modules/@bazel/bazel": "@bazel/bazel@file:../../node_modules/@bazel/bazel":
version "0.26.0-rc13" version "0.26.0"
optionalDependencies: optionalDependencies:
"@bazel/bazel-darwin_x64" "0.26.0-rc13" "@bazel/bazel-darwin_x64" "0.26.0"
"@bazel/bazel-linux_x64" "0.26.0-rc13" "@bazel/bazel-linux_x64" "0.26.0"
"@bazel/bazel-win32_x64" "0.26.0-rc13" "@bazel/bazel-win32_x64" "0.26.0"
"@bazel/karma@0.30.1": "@bazel/karma@0.30.1":
version "0.30.1" version "0.30.1"

View File

@ -32,7 +32,7 @@ ts_library(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
entry_point = "modules/benchmarks/src/expanding_rows/index.js", entry_point = ":index.ts",
deps = [ deps = [
":application_lib", ":application_lib",
"@npm//rxjs", "@npm//rxjs",

View File

@ -20,7 +20,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
entry_point = "modules/benchmarks/src/largetable/render3/index.js", entry_point = ":index.ts",
tags = ["ivy-only"], tags = ["ivy-only"],
deps = [ deps = [
":largetable_lib", ":largetable_lib",

View File

@ -19,7 +19,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
entry_point = "modules/benchmarks/src/tree/render3/index.js", entry_point = ":index.ts",
tags = ["ivy-only"], tags = ["ivy-only"],
deps = [ deps = [
":tree_lib", ":tree_lib",

View File

@ -22,7 +22,7 @@ ng_package(
"//packages/animations/browser:package.json", "//packages/animations/browser:package.json",
"//packages/animations/browser/testing:package.json", "//packages/animations/browser/testing:package.json",
], ],
entry_point = "packages/animations/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -22,7 +22,7 @@ nodejs_binary(
"@npm//rollup-plugin-node-resolve", "@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-sourcemaps", "@npm//rollup-plugin-sourcemaps",
], ],
entry_point = "npm/node_modules/rollup/bin/rollup", entry_point = "@npm//node_modules/rollup:bin/rollup",
install_source_map_support = False, install_source_map_support = False,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -35,7 +35,7 @@ filegroup(
nodejs_binary( nodejs_binary(
name = "modify_tsconfig", name = "modify_tsconfig",
data = ["modify_tsconfig.js"], data = ["modify_tsconfig.js"],
entry_point = "angular/packages/bazel/src/modify_tsconfig.js", entry_point = ":modify_tsconfig.js",
install_source_map_support = False, install_source_map_support = False,
node_modules = ":empty_node_modules", node_modules = ":empty_node_modules",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],

View File

@ -25,7 +25,7 @@ nodejs_binary(
"@npm//@bazel/typescript", "@npm//@bazel/typescript",
"@npm//@microsoft/api-extractor", "@npm//@microsoft/api-extractor",
], ],
entry_point = "angular/packages/bazel/src/api-extractor/index.js", entry_point = ":index.ts",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )

View File

@ -106,9 +106,15 @@ def _esm5_outputs_aspect(target, ctx):
else: else:
fail("Unknown replay compiler", target.typescript.replay_params.compiler.path) fail("Unknown replay compiler", target.typescript.replay_params.compiler.path)
inputs = [tsconfig]
if (type(target.typescript.replay_params.inputs) == type([])):
inputs.extend(target.typescript.replay_params.inputs)
else:
inputs.extend(target.typescript.replay_params.inputs.to_list())
ctx.actions.run( ctx.actions.run(
progress_message = "Compiling TypeScript (ES5 with ES Modules) %s" % target.label, progress_message = "Compiling TypeScript (ES5 with ES Modules) %s" % target.label,
inputs = target.typescript.replay_params.inputs.to_list() + [tsconfig], inputs = inputs,
outputs = outputs, outputs = outputs,
arguments = [tsconfig.path], arguments = [tsconfig.path],
executable = compiler, executable = compiler,

View File

@ -447,7 +447,7 @@ def ngc_compile_action(
if _should_produce_flat_module_outs(ctx): if _should_produce_flat_module_outs(ctx):
dts_entry_points = ["%s.d.ts" % _flat_module_out_file(ctx)] dts_entry_points = ["%s.d.ts" % _flat_module_out_file(ctx)]
else: else:
dts_entry_points = [ctx.attr.entry_point.replace(".ts", ".d.ts")] dts_entry_points = [ctx.attr.entry_point.label.name.replace(".ts", ".d.ts")]
if _should_produce_r3_symbols_bundle(ctx): if _should_produce_r3_symbols_bundle(ctx):
dts_entry_points.append(_R3_SYMBOLS_DTS_FILE) dts_entry_points.append(_R3_SYMBOLS_DTS_FILE)
@ -719,7 +719,7 @@ NG_MODULE_RULE_ATTRS = dict(dict(COMMON_ATTRIBUTES, **NG_MODULE_ATTRIBUTES), **{
""", """,
default = Label("@npm//typescript:typescript__typings"), default = Label("@npm//typescript:typescript__typings"),
), ),
"entry_point": attr.string(), "entry_point": attr.label(allow_single_file = True),
# Default is %{name}_public_index # Default is %{name}_public_index
# The suffix points to the generated "bundle index" files that users import from # The suffix points to the generated "bundle index" files that users import from

View File

@ -23,7 +23,7 @@ nodejs_binary(
"lib", "lib",
"@npm//shelljs", "@npm//shelljs",
], ],
entry_point = "angular/packages/bazel/src/ng_package/packager.js", entry_point = ":packager.ts",
install_source_map_support = False, install_source_map_support = False,
) )

View File

@ -455,13 +455,20 @@ def primary_entry_point_name(name, entry_point, entry_point_name):
Returns: Returns:
name of the entry point, which will appear in the name of generated bundles name of the entry point, which will appear in the name of generated bundles
""" """
if (type(entry_point) == "Target"):
ep = entry_point.label
elif (type(entry_point) == "Label"):
ep = entry_point
else:
fail("entry_point should be a Target or Label but got %s" % type(entry_point))
if entry_point_name: if entry_point_name:
# If an explicit entry_point_name is given, use that. # If an explicit entry_point_name is given, use that.
return entry_point_name return entry_point_name
elif entry_point.find("/") >= 0: elif ep.package.find("/") >= 0:
# If the entry_point has multiple path segments, use the second one. # If the entry_point package has multiple path segments, use the last one.
# E.g., for "@angular/cdk/a11y", use "cdk". # E.g., for "//packages/angular/cdk:a11y", use "cdk".
return entry_point.split("/")[-2] return ep.package.split("/")[-1]
else: else:
# Fall back to the name of the ng_package rule. # Fall back to the name of the ng_package rule.
return name return name

View File

@ -36,7 +36,7 @@ nodejs_binary(
"@npm//source-map-support", "@npm//source-map-support",
"@npm//tslib", "@npm//tslib",
], ],
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js", entry_point = ":index.ts",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -46,7 +46,7 @@ nodejs_binary(
":ngc_lib", ":ngc_lib",
"@npm//source-map-support", "@npm//source-map-support",
], ],
entry_point = "angular/packages/bazel/src/ngc-wrapped/extract_i18n.js", entry_point = ":extract_i18n.ts",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )

View File

@ -80,6 +80,6 @@ nodejs_binary(
"//packages/bazel/test/ng_package/example:npm_package", "//packages/bazel/test/ng_package/example:npm_package",
"@npm//diff", "@npm//diff",
], ],
entry_point = "angular/packages/bazel/test/ng_package/example_package.spec.js", entry_point = ":example_package.spec.ts",
templated_args = ["--accept"], templated_args = ["--accept"],
) )

View File

@ -23,7 +23,7 @@ ng_package(
":arbitrary_genfiles_file", ":arbitrary_genfiles_file",
":extra-styles.css", ":extra-styles.css",
], ],
entry_point = "packages/bazel/test/ng_package/example/index.js", entry_point = ":index.ts",
entry_point_name = "waffels", entry_point_name = "waffels",
packages = [ packages = [
":arbitrary_npm_package", ":arbitrary_npm_package",

View File

@ -24,7 +24,7 @@ ts_devserver(
rollup_bundle( rollup_bundle(
name = "bundle", name = "bundle",
entry_point = "packages/bazel/test/protractor-2/app", entry_point = ":app.ts",
deps = [":app"], deps = [":app"],
) )

View File

@ -16,7 +16,7 @@ nodejs_binary(
"fake-devserver.js", "fake-devserver.js",
"@npm//minimist", "@npm//minimist",
], ],
entry_point = "angular/packages/bazel/test/protractor-utils/fake-devserver.js", entry_point = ":fake-devserver.ts",
) )
jasmine_node_test( jasmine_node_test(

View File

@ -25,7 +25,7 @@ ng_package(
"//packages/common/testing:package.json", "//packages/common/testing:package.json",
"//packages/common/upgrade:package.json", "//packages/common/upgrade:package.json",
], ],
entry_point = "packages/common/index.js", entry_point = ":index.ts",
packages = ["//packages/common/locales:package"], packages = ["//packages/common/locales:package"],
tags = [ tags = [
"release-with-framework", "release-with-framework",

View File

@ -10,7 +10,7 @@ nodejs_binary(
"@npm//chokidar", "@npm//chokidar",
"@npm//reflect-metadata", "@npm//reflect-metadata",
], ],
entry_point = "angular/packages/compiler-cli/src/main.js", entry_point = "//packages/compiler-cli:src/main.ts",
) )
nodejs_binary( nodejs_binary(
@ -20,7 +20,7 @@ nodejs_binary(
"@npm//chokidar", "@npm//chokidar",
"@npm//reflect-metadata", "@npm//reflect-metadata",
], ],
entry_point = "angular/packages/compiler-cli/src/extract_i18n.js", entry_point = "//packages/compiler-cli:src/extract_i18n.ts",
) )
nodejs_test( nodejs_test(
@ -54,6 +54,6 @@ nodejs_test(
"//packages/platform-server:npm_package", "//packages/platform-server:npm_package",
"//packages/router:npm_package", "//packages/router:npm_package",
] + glob(["**/*"]), ] + glob(["**/*"]),
entry_point = "angular/packages/compiler-cli/integrationtest/test.js", entry_point = "//packages/compiler-cli/integrationtest:test.ts",
tags = ["no-ivy-aot"], tags = ["no-ivy-aot"],
) )

View File

@ -50,8 +50,10 @@ const requiredNodeModules = {
// Fine grained dependencies which are used by the integration test Angular modules, and // Fine grained dependencies which are used by the integration test Angular modules, and
// need to be symlinked so that they can be resolved by NodeJS or NGC. // need to be symlinked so that they can be resolved by NodeJS or NGC.
'buffer-from': resolveNpmTreeArtifact('npm/node_modules/buffer-from'),
'reflect-metadata': resolveNpmTreeArtifact('npm/node_modules/reflect-metadata'), 'reflect-metadata': resolveNpmTreeArtifact('npm/node_modules/reflect-metadata'),
'rxjs': resolveNpmTreeArtifact('npm/node_modules/rxjs'), 'rxjs': resolveNpmTreeArtifact('npm/node_modules/rxjs'),
'source-map': resolveNpmTreeArtifact('npm/node_modules/source-map'),
'source-map-support': resolveNpmTreeArtifact('npm/node_modules/source-map-support'), 'source-map-support': resolveNpmTreeArtifact('npm/node_modules/source-map-support'),
'typescript': resolveNpmTreeArtifact('npm/node_modules/typescript'), 'typescript': resolveNpmTreeArtifact('npm/node_modules/typescript'),
'zone.js': resolveNpmTreeArtifact('npm/node_modules/zone.js'), 'zone.js': resolveNpmTreeArtifact('npm/node_modules/zone.js'),

View File

@ -15,7 +15,7 @@ ng_package(
srcs = [ srcs = [
"package.json", "package.json",
], ],
entry_point = "packages/fake_core/index.js", entry_point = ":index.ts",
deps = [ deps = [
":fake_core", ":fake_core",
], ],

View File

@ -18,7 +18,7 @@ ng_package(
"package.json", "package.json",
"//packages/compiler/testing:package.json", "//packages/compiler/testing:package.json",
], ],
entry_point = "packages/compiler/compiler.js", entry_point = ":compiler.ts",
include_devmode_srcs = True, include_devmode_srcs = True,
tags = [ tags = [
"release-with-framework", "release-with-framework",

View File

@ -28,7 +28,7 @@ ng_package(
"package.json", "package.json",
"//packages/core/testing:package.json", "//packages/core/testing:package.json",
], ],
entry_point = "packages/core/index.js", entry_point = ":index.ts",
packages = [ packages = [
"//packages/core/schematics:npm_package", "//packages/core/schematics:npm_package",
], ],

View File

@ -19,13 +19,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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/animation_world/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -14,7 +14,7 @@ ts_library(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
entry_point = "packages/core/test/bundling/core_all/index.js", entry_point = ":index.ts",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -20,13 +20,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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/cyclic_import/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -17,13 +17,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -13,13 +13,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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"], tags = ["ivy-only"],
deps = [ deps = [
":hello_world_i18n", ":hello_world_i18n",

View File

@ -17,13 +17,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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_r2/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -19,13 +19,7 @@ ts_library(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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/injection/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -20,13 +20,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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/todo/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -22,13 +22,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = ":index.ts",
# 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/todo_i18n/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -21,13 +21,7 @@ ng_module(
ng_rollup_bundle( ng_rollup_bundle(
name = "bundle", name = "bundle",
# TODO(alexeagle): This is inconsistent. entry_point = "index.ts",
# 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/todo_r2/index.js",
tags = [ tags = [
"ivy-only", "ivy-only",
], ],

View File

@ -23,7 +23,7 @@ ng_package(
"**/*.externs.js", "**/*.externs.js",
"**/package.json", "**/package.json",
]), ]),
entry_point = "packages/elements/index.js", entry_point = ":index.ts",
packages = [ packages = [
"//packages/elements/schematics:npm_package", "//packages/elements/schematics:npm_package",
], ],

View File

@ -21,7 +21,7 @@ ng_module(
ng_package( ng_package(
name = "npm_package", name = "npm_package",
srcs = ["package.json"], srcs = ["package.json"],
entry_point = "packages/forms/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -23,7 +23,7 @@ ng_package(
"package.json", "package.json",
"//packages/http/testing:package.json", "//packages/http/testing:package.json",
], ],
entry_point = "packages/http/index.js", entry_point = ":index.ts",
tags = [ tags = [
# Currently the plan for Angular v8 is to exclude @angular/http package from publishing # Currently the plan for Angular v8 is to exclude @angular/http package from publishing
# "release-with-framework", # "release-with-framework",

View File

@ -2,7 +2,7 @@ load(":rollup.bzl", "ls_rollup_bundle")
ls_rollup_bundle( ls_rollup_bundle(
name = "language-service", name = "language-service",
entry_point = "packages/language-service/index.js", entry_point = "//packages/language-service:index.ts",
globals = { globals = {
"fs": "fs", "fs": "fs",
"path": "path", "path": "path",

View File

@ -25,7 +25,7 @@ ng_package(
"package.json", "package.json",
"//packages/platform-browser-dynamic/testing:package.json", "//packages/platform-browser-dynamic/testing:package.json",
], ],
entry_point = "packages/platform-browser-dynamic/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -26,7 +26,7 @@ ng_package(
"//packages/platform-browser/animations:package.json", "//packages/platform-browser/animations:package.json",
"//packages/platform-browser/testing:package.json", "//packages/platform-browser/testing:package.json",
], ],
entry_point = "packages/platform-browser/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -31,7 +31,7 @@ ng_package(
"package.json", "package.json",
"//packages/platform-server/testing:package.json", "//packages/platform-server/testing:package.json",
], ],
entry_point = "packages/platform-server/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -22,7 +22,7 @@ ng_module(
ng_package( ng_package(
name = "npm_package", name = "npm_package",
srcs = ["package.json"], srcs = ["package.json"],
entry_point = "packages/platform-webworker-dynamic/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -23,7 +23,7 @@ ng_module(
ng_package( ng_package(
name = "npm_package", name = "npm_package",
srcs = ["package.json"], srcs = ["package.json"],
entry_point = "packages/platform-webworker/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -25,7 +25,7 @@ ng_package(
"//packages/router/testing:package.json", "//packages/router/testing:package.json",
"//packages/router/upgrade:package.json", "//packages/router/upgrade:package.json",
], ],
entry_point = "packages/router/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -46,7 +46,7 @@ ng_package(
"//packages/service-worker/config", "//packages/service-worker/config",
"//packages/service-worker/config:schema.json", "//packages/service-worker/config:schema.json",
], ],
entry_point = "packages/service-worker/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -16,7 +16,7 @@ ts_library(
ng_rollup_bundle( ng_rollup_bundle(
name = "ngsw_config", name = "ngsw_config",
entry_point = "packages/service-worker/cli/main.js", entry_point = ":main.ts",
deps = [ deps = [
":cli", ":cli",
], ],

View File

@ -24,7 +24,7 @@ ts_library(
ng_rollup_bundle( ng_rollup_bundle(
name = "ngsw_worker", name = "ngsw_worker",
entry_point = "packages/service-worker/worker/main.js", entry_point = ":main.ts",
deps = [ deps = [
":main", ":main",
], ],

View File

@ -24,7 +24,7 @@ ng_package(
"package.json", "package.json",
"//packages/upgrade/static:package.json", "//packages/upgrade/static:package.json",
], ],
entry_point = "packages/upgrade/index.js", entry_point = ":index.ts",
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],

View File

@ -6,6 +6,6 @@ nodejs_binary(
"cli.js", "cli.js",
"@npm//brotli", "@npm//brotli",
], ],
entry_point = "angular/tools/brotli-cli/cli.js", entry_point = ":cli.js",
visibility = ["//:__subpackages__"], visibility = ["//:__subpackages__"],
) )

View File

@ -25,7 +25,7 @@ def js_size_tracking_test(
"@npm//source-map", "@npm//source-map",
"@npm//chalk", "@npm//chalk",
] ]
entry_point = "angular/tools/size-tracking/index.js" entry_point = ":index.ts"
nodejs_test( nodejs_test(
name = name, name = name,

View File

@ -18,7 +18,7 @@ def js_expected_symbol_test(name, src, golden, data = [], **kwargs):
Label("//tools/symbol-extractor:lib"), Label("//tools/symbol-extractor:lib"),
Label("@npm//typescript"), Label("@npm//typescript"),
] ]
entry_point = "angular/tools/symbol-extractor/cli.js" entry_point = "//tools/symbol-extractor:cli.ts"
nodejs_test( nodejs_test(
name = name, name = name,

View File

@ -89,3 +89,6 @@ filegroup(
srcs = glob(["lib/*.js"]) + ["bin/ts-api-guardian"], srcs = glob(["lib/*.js"]) + ["bin/ts-api-guardian"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
# Exported to be referenced as entry_point of the nodejs_binary
exports_files(["bin/ts-api-guardian"])

View File

@ -61,7 +61,7 @@ def ts_api_guardian_test(
nodejs_test( nodejs_test(
name = name, name = name,
data = data, data = data,
entry_point = "angular/tools/ts-api-guardian/bin/ts-api-guardian", entry_point = "//tools/ts-api-guardian:bin/ts-api-guardian",
templated_args = args + ["--verify", golden, actual], templated_args = args + ["--verify", golden, actual],
**kwargs **kwargs
) )
@ -70,7 +70,7 @@ def ts_api_guardian_test(
name = name + ".accept", name = name + ".accept",
testonly = True, testonly = True,
data = data, data = data,
entry_point = "angular/tools/ts-api-guardian/bin/ts-api-guardian", entry_point = "//tools/ts-api-guardian:bin/ts-api-guardian",
templated_args = args + ["--out", golden, actual], templated_args = args + ["--out", golden, actual],
**kwargs **kwargs
) )